Agora RTC Objective-C API Reference Refactor

Public Member Functions
IRecordingDeviceSource Class Referenceabstract

Inherits RefCountInterface.

## Public Member Functions
virtual int | initRecording (const char *deviceName=NULL)=0
virtual int | startRecording ()=0
virtual int | stopRecording ()=0
virtual int | registerAudioFrameObserver (media::IAudioPcmFrameSink *observer)=0
virtual int | unregisterAudioFrameObserver (media::IAudioPcmFrameSink *observer)=0
virtual int | setLoopbackDeviceParameter (const LoopbackRecordingOption &option)=0

## Constructor & Destructor Documentation

## ◆ ~IRecordingDeviceSource()

virtual ~IRecordingDeviceSource | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ initRecording()

virtual int initRecording | ( | const char * | deviceName = `NULL` | ) |
| pure virtual

Initialize the recording device source.

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

## ◆ startRecording()

virtual int startRecording | ( |  | ) |
| pure virtual

Start the recording device.

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

## ◆ stopRecording()

virtual int stopRecording | ( |  | ) |
| pure virtual

Stop the recording device.

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

## ◆ registerAudioFrameObserver()

virtual int registerAudioFrameObserver | ( | media::IAudioPcmFrameSink * | observer | ) |
| pure virtual

Registers an audio frame observer.

Parameters

  observer | The pointer to the IAudioFrameObserver object.

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

## ◆ unregisterAudioFrameObserver()

virtual int unregisterAudioFrameObserver | ( | media::IAudioPcmFrameSink * | observer | ) |
| pure virtual

Releases the registered IAudioFrameObserver object.

Parameters

  observer | The pointer to the IAudioFrameObserver object created by the `registerAudioPcmDataCallback` method.

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

## ◆ setLoopbackDeviceParameter()

virtual int setLoopbackDeviceParameter | ( | const LoopbackRecordingOption & | option | ) |
| pure virtual

Set parameter to object loopback device;

Parameters

  option | 0: Success. < 0: Failure.

## ◆ AddRef()

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

## ◆ Release()

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

## ◆ HasOneRef()

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