Lua Player Plus Vita
Documentation of lpp-vita
Mic

Module that handles microphone. More...

Functions

int Mic::start (int time, int samplerate)
 Start a microphone recording phase. More...
 
void Mic::stop (string filename)
 Stop microphone recording and save result. More...
 
void Mic::pause (void)
 Pause microphone recording. More...
 
void Mic::resume (void)
 Resume microphone recording. More...
 
bool Mic::isRecording (void)
 Check if the microphone is recording. More...
 

Detailed Description

Module that handles microphone.

Function Documentation

◆ start()

int Mic::start ( int  time,
int  samplerate 
)

Start a microphone recording phase.

Usage example:
Mic.start(5, 32000)
Definition: luaMic.cpp:6
int start(int time, int samplerate)
Start a microphone recording phase.
Parameters
time- The time to record in seconds.
samplerate- The samplerate of the output in Hz.
Note
samplerate must be a multiple of 16000.

◆ stop()

void Mic::stop ( string  filename)

Stop microphone recording and save result.

Usage example:
Mic.stop("ux0:/data/record.wav")
void stop(string filename)
Stop microphone recording and save result.
Parameters
filename- The filename of the resulting WAV file.
Note
The resulting file will always be a mono WAV file.

◆ pause()

void Mic::pause ( void  )

Pause microphone recording.

Usage example:
void pause(void)
Pause microphone recording.

◆ resume()

void Mic::resume ( void  )

Resume microphone recording.

Usage example:
void resume(void)
Resume microphone recording.

◆ isRecording()

bool Mic::isRecording ( void  )

Check if the microphone is recording.

Usage example:
if Mic.isRecording() then
end
bool isRecording(void)
Check if the microphone is recording.
Returns
true if recording, false otherwise.