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 (aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | stopRecording (aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | registerAudioFrameObserver (media::IAudioPcmFrameSink *observer, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | unregisterAudioFrameObserver (media::IAudioPcmFrameSink *observer)=0
virtual int | setLoopbackDeviceParameter (const LoopbackRecordingOption &option, aosl_ref_t ares=AOSL_REF_INVALID)=0

## Constructor & Destructor Documentation

## ◆ ~IRecordingDeviceSource()

virtual ~IRecordingDeviceSource | ( |  | ) |
| inline virtual

## 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 | ( | aosl_ref_t | ares = `AOSL_REF_INVALID` | ) |
| pure virtual

Start the recording device.

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

## ◆ stopRecording()

virtual int stopRecording | ( | aosl_ref_t | ares = `AOSL_REF_INVALID` | ) |
| pure virtual

Stop the recording device.

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

## ◆ registerAudioFrameObserver()

virtual int registerAudioFrameObserver | ( | media::IAudioPcmFrameSink * | observer,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| 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,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| pure virtual

Set parameter to object loopback device;

Parameters

  option | 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