Agora RTC Objective-C API Reference Refactor

Public Member Functions
IAudioPcmDataSender Class Referenceabstract

Inherits RefCountInterface.

## Public Member Functions
virtual int | sendAudioPcmData (const void *audio_data, uint32_t capture_timestamp, int64_t presentation_ms, const size_t samples_per_channel, const agora::rtc::BYTES_PER_SAMPLE bytes_per_sample, const size_t number_of_channels, const uint32_t sample_rate, aosl_ref_t ares=AOSL_REF_INVALID)=0

## Detailed Description

The IAudioPcmDataSender class.

In scenarios involving custom audio source, you can use the `IAudioPcmDataSender` class to send PCM audio data directly to the audio track. If the audio track is disabled, the sent audio data is automatically discarded.

## Constructor & Destructor Documentation

## ◆ ~IAudioPcmDataSender()

~IAudioPcmDataSender | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ sendAudioPcmData()

virtual int sendAudioPcmData | ( | const void * | audio_data,
|  | uint32_t | capture_timestamp,
|  | int64_t | presentation_ms,
|  | const size_t | samples_per_channel,
|  | const agora::rtc::BYTES_PER_SAMPLE | bytes_per_sample,
|  | const size_t | number_of_channels,
|  | const uint32_t | sample_rate,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| pure virtual

Sends the PCM audio data to the local audio track.

Parameters

  audio_data | The PCM audio data to be sent.
  samples_per_channel | The number of audio samples in 10 ms for each audio channel.
  bytes_per_sample | The number of bytes in each sample.
  number_of_channels | The number of audio channels.
  sample_rate | The sample rate (Hz). The minimum value is 8000.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ AddRef()

virtual void AddRef | ( |  | ) | const
| pure virtual inherited

## ◆ Release()

virtual RefCountReleaseStatus Release | ( |  | ) | const
| pure virtual inherited

## ◆ HasOneRef()

virtual bool HasOneRef | ( |  | ) | const
| pure virtual inherited