Inherits agora_gaming_rtc.IAudioRawDataManager.
The definition of
AudioRawDataManager.
◆ OnMixedAudioFrameHandler()
delegate void agora_gaming_rtc.AudioRawDataManager.OnMixedAudioFrameHandler
|
( |
AudioFrame
|
audioFrame |
) |
|
Retrieves the mixed recorded and playback audio frame.
The SDK triggers this callback once every 10 ms.
- Parameters
-
◆ OnPlaybackAudioFrameBeforeMixingHandler()
delegate void
agora_gaming_rtc.AudioRawDataManager.OnPlaybackAudioFrameBeforeMixingHandler
|
( |
uint |
uid, |
|
|
AudioFrame
|
audioFrame |
|
) |
|
|
Retrieves the audio frame of a specified user before mixing.
The SDK triggers this callback once every 10 ms.
- Parameters
-
◆ OnPlaybackAudioFrameHandler()
delegate void agora_gaming_rtc.AudioRawDataManager.OnPlaybackAudioFrameHandler
|
( |
AudioFrame
|
audioFrame |
) |
|
Retrieves the audio playback frame.
The SDK triggers this callback once every 10 ms.
- Parameters
-
◆ OnRecordAudioFrameHandler()
delegate void agora_gaming_rtc.AudioRawDataManager.OnRecordAudioFrameHandler
|
( |
AudioFrame
|
audioFrame |
) |
|
Retrieves the recorded audio frame.
The SDK triggers this callback once every 10 ms.
- Parameters
-
◆ PullAudioFrame()
override int agora_gaming_rtc.AudioRawDataManager.PullAudioFrame
|
( |
IntPtr |
audioBuffer, |
|
|
int |
type, |
|
|
int |
samples, |
|
|
int |
bytesPerSample, |
|
|
int |
channels, |
|
|
int |
samplesPerSec, |
|
|
long |
renderTimeMs, |
|
|
int |
avsync_type |
|
) |
|
|
Pulls the remote audio data.
Before calling this method, call the
SetExternalAudioSink(enabled: true)
method to enable and set the external audio sink.
After a successful method call, the app pulls the decoded and mixed audio data for
playback.
- Note
-
-
Once you call the
PullAudioFrame
method successfully, the app will
not retrieve any audio data from the
OnPlaybackAudioFrameHandler
callback.
-
The difference between the
OnPlaybackAudioFrameHandler
callback and
the PullAudioFrame
method is as follows:
-
OnPlaybackAudioFrameHandler
: The SDK sends the audio data to the
app through this callback. Any delay in processing the audio frames may result
in audio jitter.
-
PullAudioFrame
: The app pulls the remote audio data. After
setting the audio data parameters, the SDK adjusts the frame buffer and avoids
problems caused by jitter in the external audio playback.
- Parameters
-
audioBuffer |
The data buffer of the audio frame. When the audio frame uses a stereo channel,
the data buffer is interleaved. The size of the data buffer is as follows:
audioBuffer = samples ×
channels × bytesPerSample .
|
type |
The type of the audio frame. See
AUDIO_FRAME_TYPE.
|
samples |
The number of samples per channel in the audio frame. |
bytesPerSample |
The number of bytes per audio sample, which is usually 16-bit (2-byte). |
channels |
The number of audio channels.
- 1: Mono
- 2: Stereo (the data is interleaved)
|
samplesPerSec |
The sample rate. |
renderTimeMs |
The timestamp of the external audio frame. You can use this parameter for the
following purposes:
- Restore the order of the captured audio frame.
-
Synchronize audio and video frames in video-related scenarios, including
where external video sources are used.
|
avsync_type |
The reserved parameter. |
- Returns
-
- 0: Success.
- < 0: Failure.
◆ RegisterAudioRawDataObserver()
override int agora_gaming_rtc.AudioRawDataManager.RegisterAudioRawDataObserver
|
( |
|
) |
|
Registers an audio raw data observer.
- Note
- Ensure that you call this method before joining a channel.
- Returns
-
- 0: Success.
- < 0: Failure.
◆ SetOnMixedAudioFrameCallback()
Listens for the
OnMixedAudioFrameHandler
delegate.
- Note
-
- Parameters
-
action |
The implementation of the OnMixedAudioFrameHandler delegate. |
- Returns
-
- 0: Success.
- < 0: Failure.
◆ SetOnPlaybackAudioFrameBeforeMixingCallback()
Listens for the
OnPlaybackAudioFrameBeforeMixingHandler
delegate.
- Note
-
- Parameters
-
action |
The implementation of the
OnPlaybackAudioFrameBeforeMixingHandler delegate.
|
- Returns
-
- 0: Success.
- < 0: Failure.
◆ SetOnPlaybackAudioFrameCallback()
Listens for the
OnPlaybackAudioFrameHandler
delegate.
- Note
-
- Parameters
-
action |
The implementation of the OnPlaybackAudioFrameHandler delegate.
|
- Returns
-
- 0: Success.
- < 0: Failure.
◆ SetOnRecordAudioFrameCallback()
Listens for the
OnRecordAudioFrameHandler
delegate.
- Note
-
- Parameters
-
action |
The implementation of the OnRecordAudioFrameHandler delegate.
|
- Returns
-
- 0: Success.
- < 0: Failure.
◆ UnRegisterAudioRawDataObserver()
override int agora_gaming_rtc.AudioRawDataManager.UnRegisterAudioRawDataObserver
|
( |
|
) |
|
UnRegisters the audio raw data observer.
- Returns
-
- 0: Success.
- < 0: Failure.
The documentation for this class was generated from the following file: