recordblocking(recorderObj, length)
| Parameter | Description |
|---|---|
| recorderObj | audiorecorder object: audio recorder object created by audiorecorder. |
| length | double: duration of recording in seconds. |
recordblocking(recorderObj, length) records audio from an input device for the specified number of seconds. This method does not return control until recording completes.
The audiorecorder object defines the sample rate, bit depth, and other properties of the recording.
myVoice = audiorecorder;
disp('Start speaking.');
recordblocking(myVoice, 5);
disp('End of recording. Playing back ...');
play(myVoice);
| Version | Description |
|---|---|
| 1.16.0 | initial version |