23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

audiorecorder<br />

2audiorecorder<br />

Purpose Create an audio recorder object<br />

Syntax y = audiorecorder<br />

y = audiorecorder(Fs,nbits,channels)<br />

Description Note To use all of the audio recorder object features, your system must have<br />

a properly installed and configured sound card with 8- and 16-bit I/O and<br />

support for sampling rates of up to 48 kHz.<br />

2-72<br />

y = audiorecorder returns a handle to an 8-kHz, 8-bit, mono audio recorder.<br />

y = audiorecorder(Fs,nbits,channels) returns a handle to an audio<br />

recorder using the sampling rate, Fs, in Hz, the sample size of nbits, and the<br />

number of channels. Fs can be any sampling rate supported by the audio<br />

hardware. Common sampling rates are 8000, 11025, 22050, and 44000. The<br />

value of nbits must be 8 or 16. For mono or stereo, channels must be 1 or 2,<br />

respectively.<br />

After you create an audio recorder object, you can use the methods listed below<br />

on that object. y in each function is the name of the returned audio recorder.<br />

Each of these methods can use a “dot” notatation. For example, record(y) and<br />

y.record are equivalent.<br />

Method Description<br />

record(y)<br />

record(y,length)<br />

recordblocking(y)<br />

recordblocking(y,length)<br />

stop(y) Stops recording.<br />

Starts recording.<br />

Records for length number of seconds.<br />

Same as record but does not return<br />

control until recording completes.<br />

pause(y) Pauses recording.<br />

resume(y) Restarts recording from where<br />

recording was paused.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!