OTAudioDevice
Defines an audio device for use in a session. See [OTAudioDeviceManager setAudioDevice:].
Methods
| Name | Description |
|---|---|
setAudioBus:(audioBus) → {BOOL} |
Sets the OTAudioBus instance that this audio device uses. |
captureFormat() → {OTAudioFormat *} |
The capture format used by this device. |
renderFormat() → {OTAudioFormat *} |
The render format used by this device. |
renderingIsAvailable() → {BOOL} |
Used to check if audio rendering is available on the audio device. |
initializeRendering() → {BOOL} |
Requests the audio device to initialize itself for rendering. |
renderingIsInitialized() → {BOOL} |
Checks if audio rendering is initialized. |
startRendering() → {BOOL} |
Requests that the device start rendering audio. |
stopRendering() → {BOOL} |
Requests that the device stop rendering audio. |
isRendering() → {BOOL} |
Checks if audio rendering has started. |
estimatedRenderDelay() → {uint16_t} |
Returns the estimated rendering delay in ms. |
captureIsAvailable() → {BOOL} |
Checks if audio sampling is available on the audio device. |
initializeCapture() → {BOOL} |
Requests the audio device to initialize itself for audio sampling. |
captureIsInitialized() → {BOOL} |
Checks if audio sampling is initialized. |
startCapture() → {BOOL} |
Requests that the device start capturing audio samples. |
stopCapture() → {BOOL} |
Requests that the device stop sampling audio. |
isCapturing() → {BOOL} |
Checks if the device is caputuring audio samples. |
estimatedCaptureDelay() → {uint16_t} |
Returns the estimated capturing delay in ms. |
setAudioBus:(audioBus) → {BOOL}
Sets the OTAudioBus instance that this audio device uses.
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.
Parameters:
| Name | Type | Description |
|---|---|---|
audioBus |
id<OTAudioBus> | An OTAudioBus implementation. |
Returns:
BOOL YES if successful; NO otherwise.
captureFormat() → {OTAudioFormat *}
The capture format used by this device.
Returns:
renderFormat() → {OTAudioFormat *}
The render format used by this device.
Returns:
renderingIsAvailable() → {BOOL}
Used to check if audio rendering is available on the audio device.
Returns:
BOOL YES if rendering is available.
initializeRendering() → {BOOL}
Requests the audio device to initialize itself for rendering. Call this method before attempting to start rendering.
Returns:
BOOL YES if rendering is initialized.
renderingIsInitialized() → {BOOL}
Checks if audio rendering is initialized.
Returns:
BOOL YES if audio rendering is initialized.
startRendering() → {BOOL}
Requests that the device start rendering audio. After successful return from this function, audio samples become available on the audio bus.
Returns:
BOOL YES if rendering starts.
stopRendering() → {BOOL}
Requests that the device stop rendering audio.
Returns:
BOOL YES if rendering stops.
isRendering() → {BOOL}
Checks if audio rendering has started.
Returns:
BOOL YES if rendering has started.
estimatedRenderDelay() → {uint16_t}
Returns the estimated rendering delay in ms. This is used to adjust audio signal processing and rendering.
Returns:
uint16_t
captureIsAvailable() → {BOOL}
Checks if audio sampling is available on the audio device.
Returns:
BOOL YES if audio sampling is available.
initializeCapture() → {BOOL}
Requests the audio device to initialize itself for audio sampling. Call this method before attempting to start sampling.
Returns:
BOOL YES if audio sampling was initialized.
captureIsInitialized() → {BOOL}
Checks if audio sampling is initialized.
Returns:
BOOL YES if sampling is initialized.
startCapture() → {BOOL}
Requests that the device start capturing audio samples. After successful return from this function, the audio bus is ready to receive audio sample data.
Returns:
BOOL YES if audio capture starts.
stopCapture() → {BOOL}
Requests that the device stop sampling audio.
Returns:
BOOL YES if audio sampling stops.
isCapturing() → {BOOL}
Checks if the device is caputuring audio samples.
Returns:
BOOL YES if audio capture is initialized.
estimatedCaptureDelay() → {uint16_t}
Returns the estimated capturing delay in ms. This is used to adjust timing transmission information for encoded audio samples.
Returns:
uint16_t