Agora RTC Objective-C API Reference
Refactor
|
Inherits IAudioTrack.
Data Structures | |
struct | LocalAudioTrackStats |
Public Types | |
enum | AudioFilterPosition { RecordingLocalPlayback, PostAudioProcessing, RemoteUserPlayback, PcmSource, PcmSourceSending, PcmSourceLocalPlayback } |
Public Member Functions | |
virtual void | setEnabled (bool enable)=0 |
virtual bool | isEnabled () const =0 |
virtual LOCAL_AUDIO_STREAM_STATE | getState ()=0 |
virtual LocalAudioTrackStats | GetStats ()=0 |
virtual int | adjustPublishVolume (int volume)=0 |
virtual int | getPublishVolume (int *volume)=0 |
virtual int | enableLocalPlayback (bool enable)=0 |
virtual int | enableEarMonitor (bool enable, int includeAudioFilters)=0 |
virtual int | adjustPlayoutVolume (int volume)=0 |
virtual int | getPlayoutVolume (int *volume)=0 |
virtual bool | addAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position)=0 |
virtual bool | removeAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position)=0 |
virtual int | enableAudioFilter (const char *id, bool enable) |
virtual int | setFilterProperty (const char *id, const char *key, const char *jsonValue) |
virtual agora_refptr< IAudioFilter > | getAudioFilter (const char *name, AudioFilterPosition position) const =0 |
virtual bool | addAudioSink (agora_refptr< IAudioSinkBase > sink, const AudioSinkWants &wants)=0 |
virtual bool | removeAudioSink (agora_refptr< IAudioSinkBase > sink)=0 |
ILocalAudioTrack
is the basic class for local audio tracks, providing main methods of local audio tracks.
You can create a local audio track by calling one of the following methods:
createLocalAudioTrack
createCustomAudioTrack
createMediaPlayerAudioTrack
You can also use the APIs in the IAudioDeviceManager class if multiple recording devices are available in the system.After creating local audio tracks, you can publish one or more local audio tracks by calling publishAudio.
|
inherited |
The position of the audio filter in audio frame.
|
inlineprotected |
|
pure virtual |
Enables or disables the local audio track.
Once the local audio is enabled, the SDK allows for local audio capturing, processing, and encoding.
enable | Whether to enable the audio track:
|
|
pure virtual |
Gets whether the local audio track is enabled.
true
: The local track is enabled.false
: The local track is disabled.
|
pure virtual |
Gets the state of the local audio.
|
pure virtual |
Gets the statistics of the local audio track: LocalAudioTrackStats.
|
pure virtual |
Adjusts the audio volume for publishing.
volume | The volume for publishing. The value ranges between 0 and 100 (default). |
|
pure virtual |
Gets the current volume for publishing.
volume | A pointer to the publishing volume. |
|
pure virtual |
Enables or disables local playback.
enable | Whether to enable local playback:
|
|
pure virtual |
Enables in-ear monitoring (for Android and iOS only).
enabled | Determines whether to enable in-ear monitoring.
|
includeAudioFilters | The type of the ear monitoring: EAR_MONITORING_FILTER_TYPE |
|
pure virtualinherited |
Adjusts the playback volume.
volume | The playback volume. The value ranges between 0 and 100 (default). |
|
pure virtualinherited |
Gets the current playback volume.
volume | A pointer to the playback volume. |
|
pure virtualinherited |
Adds an audio filter.
By adding an audio filter, you can apply various audio effects to the audio, for example, voice change.
filter | A pointer to the audio filter. See IAudioFilter. |
position | The position of the audio filter. See AudioFilterPosition. |
true
: Success.false
: Failure.
|
pure virtualinherited |
Removes the audio filter added by callling addAudioFilter
.
filter | The pointer to the audio filter that you want to remove. See IAudioFilter. |
position | The position of the audio filter. See AudioFilterPosition. |
true
: Success.false
: Failure.
|
inlinevirtualinherited |
Enable / Disable specified audio filter
id | id of the filter |
enable | enable / disable the filter with given id |
|
inlinevirtualinherited |
set the properties of the specified audio filter
id | id of the filter |
key | key of the property |
jsonValue | json str value of the property |
|
pure virtualinherited |
Gets the audio filter by its name.
name | The name of the audio filter. |
position | The position of the audio filter. See AudioFilterPosition. |
|
pure virtualinherited |
Adds an audio sink to get PCM data from the audio track.
sink | The pointer to the audio sink. See IAudioSinkBase. |
wants | The properties an audio frame should have when it is delivered to the sink. See AudioSinkWants. |
true
: Success.false
: Failure.
|
pure virtualinherited |
Removes an audio sink.
sink | The pointer to the audio sink to be removed. See IAudioSinkBase. |
true
: Success.false
: Failure.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |