Navigation

Operators and Keywords

Function List:

C++ API

Function File: recorder = audiorecorder ()
Function File: recorder = audiorecorder (fs, nbits, channels)
Function File: recorder = audiorecorder (fs, nbits, channels, id)

Create an audiorecorder object recording 8 bit mono audio at 8000 Hz sample rate.

The optional arguments fs, nbits, channels, and id specify the sample rate, bit depth, number of channels and recording device id, respectively. Device IDs may be found using the audiodevinfo function.

Demonstration 1

The following code

 recorder = audiorecorder (44100, 16, 2);
 record (recorder, 1);
 sleep (2);
 player1 = audioplayer (recorder);
 player2 = getplayer (recorder);
 play (player1);
 sleep (2);
 play (player2);
 sleep (2);
 stop (player1);
 stop (player2);

gives an example of how '@audiorecorder/audiorecorder' is used.

Package: octave