registerAudioSaveHook
Function Usage
Registers the hook function for saving audio data.
Restrictions
N/A
Prototype
int registerAudioSaveHook(AUDIOSAVEHOOK hook)
Parameters
Field Name |
Input/Output |
Field Type |
Description |
|---|---|---|---|
hook |
Input |
AUDIOSAVEHOOK |
The engine users need to mount the audio data saving function they have implemented to this hook. public interface AUDIOSAVEHOOK { void audioSaveData(byte[] data, int length); }
|
Returns
Data type: int
The value can be:
- VMI_SUCCESS: Success
- VMI_AUDIO_CLIENT_SAVEHOOK_REGISTER_FAIL: The audio engine client fails to register the hook function for saving audio data.
Example Call
1 2 3 4 5 | void Test() { // DataPipe is the class that implements the AUDIOSAVEHOOK API. int ret = AudioTrackPlayer.getInstance().registerAudioSaveHook(DataPipe.getInstance()); } |
Parent topic: External APIs of the Audio Engine Client (Java)