|
Agora RTC Objective-C API Reference
Refactor
|
Inherits <NSObject>.
Instance Methods | |
| (BOOL) | - onRecordAudioFrame:channelId: |
| (BOOL) | - onPlaybackAudioFrame:channelId: |
| (BOOL) | - onMixedAudioFrame:channelId: |
| (BOOL) | - onEarMonitoringAudioFrame: |
| (AgoraAudioFramePosition) | - getObservedAudioFramePosition |
| (BOOL) | - onPlaybackAudioFrameBeforeMixing:channelId:uid: |
|
optional |
Gets the captured audio frame.
To ensure that the format of the cpatured audio frame is as expected, you can choose one of the following two methods to set the audio data format:
setRecordingAudioFrameParametersWithSampleRate:channel:mode:samplesPerCall: to set the audio data format and setAudioFrameDelegate: to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onRecordAudioFrame:channelId: callback according to the sampling interval.setAudioFrameDelegate: to register the audio frame observer object, set the audio data format in the return value of the getObservedAudioFramePosition callback. The SDK then calculates the sampling interval according to the return value of the getRecordAudioParams callback, and triggers the onRecordAudioFrame:channelId: callback according to the sampling interval.| frame | The raw audio data. See AgoraAudioFrame. |
| channelId | The channel ID. |
|
optional |
Gets the raw audio frame for playback.
To ensure that the data format of audio frame for playback is as expected, Agora recommends that you choose one of the following two methods to set the audio data format:
setPlaybackAudioFrameParametersWithSampleRate:channel:mode:samplesPerCall: to set the audio data format and setAudioFrameDelegate: to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame: callback according to the sampling interval.setAudioFrameDelegate: to register the audio frame observer object, set the audio data format in the return value of the getObservedAudioFramePosition callback. The SDK then calculates the sampling interval according to the return value of the getPlaybackAudioParams callback, and triggers the onPlaybackAudioFrame: callback according to the sampling interval.| frame | The raw audio data. See AgoraAudioFrame. |
| channelId | The channel ID. |
|
optional |
Retrieves the mixed captured and playback audio frame.
To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you choose one of the following two ways to set the data format:
setMixedAudioFrameParametersWithSampleRate:channel:samplesPerCall: to set the audio data format and setAudioFrameDelegate: to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onMixedAudioFrame:channelId: callback according to the sampling interval.setAudioFrameDelegate: to register the audio frame observer object, set the audio data format in the return value of the getObservedAudioFramePosition callback. The SDK then calculates the sampling interval according to the return value of the getMixedAudioParams callback, and triggers the onMixedAudioFrame:channelId: callback according to the sampling interval.| frame | The raw audio data. See AgoraAudioFrame. |
| channelId | The channel ID. |
|
optional |
Gets the in-ear monitoring audio frame.
In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you choose one of the following two methods to set the in-ear monitoring-ear audio data format:
setEarMonitoringAudioFrameParametersWithSampleRate:channel:mode:samplesPerCall: to set the audio data format and setAudioFrameDelegate: to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame: callback according to the sampling interval.setAudioFrameDelegate: to register the audio frame observer object, set the audio data format in the return value of the getObservedAudioFramePosition callback. The SDK then calculates the sampling interval according to the return value of the getEarMonitoringAudioParams callback, and triggers the onEarMonitoringAudioFrame: callback according to the sampling interval.| frame | The raw audio data. See AgoraAudioFrame. |
|
optional |
Sets the frame position for the video observer.
After successfully registering the audio data observer, the SDK uses this callback for each specific audio frame processing node to determine whether to trigger the following callbacks:
onRecordAudioFrame:channelId:onPlaybackAudioFrame:onPlaybackAudioFrameBeforeMixing:channelId:uid:onMixedAudioFrame:channelId:onEarMonitoringAudioFrame: You can set one or more positions you need to observe by modifying the return value of getObservedAudioFramePosition based on your scenario requirements: When the annotation observes multiple locations, the | (or operator) is required. To conserve system resources, you can reduce the number of frame positions that you want to observe.onPlaybackAudioFrame: callback.onRecordAudioFrame:channelId: callback.onMixedAudioFrame:channelId: callback.onPlaybackAudioFrameBeforeMixing:channelId:uid: callback.onEarMonitoringAudioFrame: callback.
|
optional |
Retrieves the audio frame before mixing of subscribed remote users.
| channelId | The channel ID. |
| uid | The ID of subscribed remote users. |
| frame | The raw audio data. See AgoraAudioFrame. |