Content:
- Methods

The AudioRecorder object can be used to listen for sound and record it to a file.

rec = app.CreateAudioRecorder( ) → app object: AudioRecorder

After creation you have to define the recording file with the SetFile Method:
rec.SetFile( "/sdcard/demofile.wav" );

After that you can Start the recording: rec.Start();

The recorded audio will then be written to the specified file.

Finally you can also Stop the recording: rec.Stop();

Example - Example click to expand contents 

Methods

The following methods are available on the AudioRecorder object:

GetData() → List: [ frequencies ]
GetPeak() → Number: float
GetRMS() → Number: float
GetType() → String: “AudioRecorder”
Pause()
Start()
Stop()