Callback usage
Review information on each callback and it's usage.
Read time 2 minutesLast updated 7 months ago
pf_on_audio_unit_after_capture_audio_read
pf_on_audio_unit_after_capture_audio_readThis callback is the most appropriate approach to inject audio to replace the captured audio.
pf_on_audio_unit_after_capture_audio_readThe data must be in the following format to be written to the buffer that is pointed to by .
pcm_frames- 16-bit signed integer
- : The number of frames
pcm_frame_count - : The number of channels per frame
channels_per_frame - : The sample rate
audio_frame_rate
pcm_frame_countpf_on_audio_unit_before_capture_audio_sent
pf_on_audio_unit_before_capture_audio_sentThis callback is the most appropriate way for recording applications that are designed to capture a player’s speech.
pf_on_audio_unit_before_capture_audio_sentis_speakingpf_on_audio_unit_before_recv_audio_mixed
pf_on_audio_unit_before_recv_audio_mixedThis callback is the most appropriate for adding Digital Signal Processing (DSP) effects to individual participants on the render side.
This callback is called after receiving the audio from the Vivox server, and prior to mixing the audio down to a single stream. Use this callback to gain access to the per-participant audio data.
If the audio frames are zeroed out in this callback, no events for remote participants in the session are generated because a zeroed-out frame plays silence for that participant.
pf_on_audio_unit_before_recv_audio_rendered
pf_on_audio_unit_before_recv_audio_renderedThis callback is called to record applications that are designed to capture what a player hears. It is also suitable for applying effects to all voice audio, for example, when the listener is underwater or dazed.
pf_on_audio_unit_before_recv_audio_renderedThis callback needs to be defined if a third-party audio package will be used to render all voice chat audio. Setting the audio frames to all zeros prevents the Vivox SDK from rendering audio to any device, but writes to the audio device will still occur. The proper way to disable Vivox’s access to a render audio device while continuing to process audio is to set the Vivox render device to 'No Device' with the request.
vx_req_aux_set_render_device