OTAudioDevice Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | OTAudioKit.h |
Setting the audio bus
– setAudioBus:
required method
Sets the OTAudioBus instance that this audio device uses.
- (BOOL)setAudioBus:(_Nullable id<OTAudioBus>)audioBusParameters
audioBus |
An OTAudioBus implementation. |
|---|
Return Value
BOOL YES if successful; NO otherwise.
Discussion
OTAudioDevice implementors use this bus to send and receive audio samples to and from a session. The implementor should retain this instance for the lifetime of the implementing object.
Declared In
OTAudioKit.h
Adjusting the audio format
– captureFormat
required method
The capture format used by this device.
- (nonnull OTAudioFormat *)captureFormatDeclared In
OTAudioKit.h
– renderFormat
required method
The render format used by this device.
- (nonnull OTAudioFormat *)renderFormatDeclared In
OTAudioKit.h
Rendering audio
– renderingIsAvailable
required method
Used to check if audio rendering is available on the audio device.
- (BOOL)renderingIsAvailableReturn Value
BOOL YES if rendering is available.
Declared In
OTAudioKit.h
– initializeRendering
required method
Requests the audio device to initialize itself for rendering. Call this method before attempting to start rendering.
- (BOOL)initializeRenderingReturn Value
BOOL YES if rendering is initialized.
Declared In
OTAudioKit.h
– renderingIsInitialized
required method
Checks if audio rendering is initialized.
- (BOOL)renderingIsInitializedReturn Value
BOOL YES if audio rendering is initialized.
Declared In
OTAudioKit.h
– startRendering
required method
Requests that the device start rendering audio. After successful return from this function, audio samples become available on the audio bus.
- (BOOL)startRenderingReturn Value
BOOL YES if rendering starts.
Declared In
OTAudioKit.h
– stopRendering
required method
Requests that the device stop rendering audio.
- (BOOL)stopRenderingReturn Value
BOOL YES if rendering stops.
Declared In
OTAudioKit.h
– isRendering
required method
Checks if audio rendering has started.
- (BOOL)isRenderingReturn Value
BOOL YES if rendering has started.
Declared In
OTAudioKit.h
– estimatedRenderDelay
required method
Returns the estimated rendering delay in ms. This is used to adjust audio signal processing and rendering.
- (uint16_t)estimatedRenderDelayReturn Value
uint16_t
Declared In
OTAudioKit.h
Capturing audio
– captureIsAvailable
required method
Checks if audio sampling is available on the audio device.
- (BOOL)captureIsAvailableReturn Value
BOOL YES if audio sampling is available.
Declared In
OTAudioKit.h
– initializeCapture
required method
Requests the audio device to initialize itself for audio sampling. Call this method before attempting to start sampling.
- (BOOL)initializeCaptureReturn Value
BOOL YES if audio sampling was initialized.
Declared In
OTAudioKit.h
– captureIsInitialized
required method
Checks if audio sampling is initialized.
- (BOOL)captureIsInitializedReturn Value
BOOL YES if sampling is initialized.
Declared In
OTAudioKit.h
– startCapture
required method
Requests that the device start capturing audio samples. After successful return from this function, the audio bus is ready to receive audio sample data.
- (BOOL)startCaptureReturn Value
BOOL YES if audio capture starts.
Declared In
OTAudioKit.h
– stopCapture
required method
Requests that the device stop sampling audio.
- (BOOL)stopCaptureReturn Value
BOOL YES if audio sampling stops.
Declared In
OTAudioKit.h
– isCapturing
required method
Checks if the device is caputuring audio samples.
- (BOOL)isCapturingReturn Value
BOOL YES if audio capture is initialized.
Declared In
OTAudioKit.h
– estimatedCaptureDelay
required method
Returns the estimated capturing delay in ms. This is used to adjust timing transmission information for encoded audio samples.
- (uint16_t)estimatedCaptureDelayReturn Value
uint16_t
Declared In
OTAudioKit.h