To work around this issue, record for a longer period of time, and then analyze the portion of the recorded message in which you are interested. For example, execute the following:
r = audiorecorder(44100, 16, 1);
record(r,5);
stop(r);
p = play(r);
You may still receive the warning message, however, you may ignore this.
This issue is due to latency between the time that the command
record(r)
is entered and when the actual recording starts on your sound card.
The warning
Warning: !JavaAudioRecorder.recordthread.message!
is thrown when recording does not start within 1 second. The fact that data is recorded when you record for 2 seconds by executing
pause(2)
but not when you pause for only 0.5 seconds, further confirms this. Also, the error message
??? Error using ==> audioplayer.audioplayer at 68
Recorder is empty.
occurs when attempting to play an audiorecorder object before recording, since the object does not contain any recorded data.
Refer to the related solution for instructions if you wish to turn off this particular warning message.
Best Answer