Recording Methods - C++
Start recording audio
This method starts recording in an internal variable the audio which is sent to the output device. These recording are appended to the last one:
1 |
VoicemodSDK::VmError err=VoicemodSDK::StartRecording(); |
If the method is correctly executed the returned value will be 0.
If you don’t want any previous audio recording, you can call the method ClearRecording to clean internal memory:
1 |
VoicemodSDK::ClearRecording(); |
Stop recording audio
This method stops recording processed audio:
1 |
VoicemodSDK::VmError err=VoicemodSDK::StopRecording(); |
If the method is correctly executed the returned value will be 0.
Save recording audio
Call this method to save the recorded audio to a wav audio file:
1 |
VoicemodSDK::VmError err=VoicemodSDK::SaveRecording(path); |
This method requires as input argument the path to the file which will store the audio recorded. If the files doesn’t exist, it will be created.
If the method is correctly executed the returned value will be 0.
Is recording
Use this method to retrieve if the engine is recording the output audio. If the result of the method is 0, the engine is not recording the output audio. If the result is 1, the engine is recording.
1 |
int isrecording=VoicemodSDK::IsRecording(); //{0,1} |