VuoAudio interface.
Definition in file VuoAudio.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoAudioOut |
Manages sending audio output. | |
typedef void * | VuoAudioIn |
Manages receiving live audio input. | |
Functions | |
void | VuoAudio_use (void) |
Indicates that the caller needs to get notifications about audio devices. | |
void | VuoAudio_disuse (void) |
Indicates that the caller no longer needs notifications about audio devices. | |
void | VuoAudio_addDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoAudioInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoAudioOutputDevice)) |
Adds a trigger callback, to be invoked whenever the list of known audio devices changes. | |
void | VuoAudio_removeDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoAudioInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoAudioOutputDevice)) |
Removes a trigger callback previously added by VuoAudio_addDevicesChangedTriggers. | |
VuoList_VuoAudioInputDevice | VuoAudio_getInputDevices (void) |
Returns a list of the available audio input devices. | |
VuoList_VuoAudioOutputDevice | VuoAudio_getOutputDevices (void) |
Returns a list of the available audio output devices. | |
bool | VuoAudioInputDevice_realize (VuoAudioInputDevice device, VuoAudioInputDevice *realizedDevice) VuoWarnUnusedResult |
If device 's channel count is unknown (zero): | |
bool | VuoAudioOutputDevice_realize (VuoAudioOutputDevice device, VuoAudioOutputDevice *realizedDevice) VuoWarnUnusedResult |
If device 's channel count is unknown (zero): | |
VuoAudioOut | VuoAudioOut_useShared (VuoAudioOutputDevice aod) |
Returns a shared object for the specified key, allocating it if necessary. | |
void | VuoAudioOut_disuseShared (VuoAudioOut ao) |
Indicates that the caller is done using the shared object. | |
void | VuoAudioOut_sendChannels (VuoAudioOut ao, VuoList_VuoAudioSamples channels, void *id) |
Enqueues channels for eventual playback. | |
void | VuoAudioOut_addTrigger (VuoAudioOut ao, VuoOutputTrigger(requestedChannels, VuoReal)) |
Sets up the audio output device to call the trigger functions when it receives an event. | |
void | VuoAudioOut_removeTrigger (VuoAudioOut ao, VuoOutputTrigger(requestedChannels, VuoReal)) |
Stops the audio output device from calling trigger functions when it receives an event. | |
VuoAudioIn | VuoAudioIn_useShared (VuoAudioInputDevice aid) |
Returns a shared object for the specified key, allocating it if necessary. | |
void | VuoAudioIn_disuseShared (VuoAudioIn ai) |
Indicates that the caller is done using the shared object. | |
void | VuoAudioIn_addTrigger (VuoAudioIn ai, VuoOutputTrigger(receivedChannels, VuoList_VuoAudioSamples)) |
Sets up the audio input device to call the trigger functions when it receives an event. | |
void | VuoAudioIn_removeTrigger (VuoAudioIn ai, VuoOutputTrigger(receivedChannels, VuoList_VuoAudioSamples)) |
Stops the audio input device from calling trigger functions when it receives an event. | |
typedef void* VuoAudioIn |
Manages receiving live audio input.
Definition at line 58 of file VuoAudio.h.
typedef void* VuoAudioOut |
Manages sending audio output.
Definition at line 37 of file VuoAudio.h.
void VuoAudio_addDevicesChangedTriggers | ( | VuoOutputTrigger(inputDevices, VuoList_VuoAudioInputDevice) | , |
VuoOutputTrigger(outputDevices, VuoList_VuoAudioOutputDevice) | |||
) |
Adds a trigger callback, to be invoked whenever the list of known audio devices changes.
Call VuoAudio_use()
before calling this.
This function may be called from any thread.
Definition at line 177 of file VuoAudio.cc.
void VuoAudio_disuse | ( | void | ) |
Indicates that the caller no longer needs notifications about audio devices.
This function may be called from any thread.
Definition at line 145 of file VuoAudio.cc.
VuoList_VuoAudioInputDevice VuoAudio_getInputDevices | ( | void | ) |
Returns a list of the available audio input devices.
Definition at line 74 of file VuoAudio.cc.
VuoList_VuoAudioOutputDevice VuoAudio_getOutputDevices | ( | void | ) |
Returns a list of the available audio output devices.
Definition at line 91 of file VuoAudio.cc.
void VuoAudio_removeDevicesChangedTriggers | ( | VuoOutputTrigger(inputDevices, VuoList_VuoAudioInputDevice) | , |
VuoOutputTrigger(outputDevices, VuoList_VuoAudioOutputDevice) | |||
) |
Removes a trigger callback previously added by VuoAudio_addDevicesChangedTriggers.
This function may be called from any thread.
Definition at line 191 of file VuoAudio.cc.
void VuoAudio_use | ( | void | ) |
Indicates that the caller needs to get notifications about audio devices.
This function may be called from any thread.
Definition at line 121 of file VuoAudio.cc.
void VuoAudioIn_addTrigger | ( | VuoAudioIn | ai, |
VuoOutputTrigger(receivedChannels, VuoList_VuoAudioSamples) | |||
) |
Sets up the audio input device to call the trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 542 of file VuoAudio.cc.
void VuoAudioIn_disuseShared | ( | VuoAudioIn | ai | ) |
Indicates that the caller is done using the shared object.
This function may be called from any thread.
Definition at line 508 of file VuoAudio.cc.
void VuoAudioIn_removeTrigger | ( | VuoAudioIn | ai, |
VuoOutputTrigger(receivedChannels, VuoList_VuoAudioSamples) | |||
) |
Stops the audio input device from calling trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 578 of file VuoAudio.cc.
VuoAudioIn VuoAudioIn_useShared | ( | VuoAudioInputDevice | aid | ) |
Returns a shared object for the specified key, allocating it if necessary.
The caller must invoke disuseShared
when it's done using it.
The caller may invoke VuoRetain and VuoRelease, but it is not required, and any such calls must be balanced before invoking disuseShared
.
This function may be called from any thread.
Definition at line 492 of file VuoAudio.cc.
bool VuoAudioInputDevice_realize | ( | VuoAudioInputDevice | device, |
VuoAudioInputDevice * | realizedDevice | ||
) |
If device
's channel count is unknown (zero):
realizedDevice
to that device, and returns true.realizedDevice
unset.If device
's channel count is already known (presumably from the List Audio Devices
node), sets realizedDevice
to a copy of device
, and returns true. (Doesn't bother checking whether the device is currently present.)
This function may be called from any thread.
Definition at line 650 of file VuoAudio.cc.
void VuoAudioOut_addTrigger | ( | VuoAudioOut | ao, |
VuoOutputTrigger(requestedChannels, VuoReal) | |||
) |
Sets up the audio output device to call the trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 560 of file VuoAudio.cc.
void VuoAudioOut_disuseShared | ( | VuoAudioOut | ao | ) |
Indicates that the caller is done using the shared object.
This function may be called from any thread.
Definition at line 532 of file VuoAudio.cc.
void VuoAudioOut_removeTrigger | ( | VuoAudioOut | ao, |
VuoOutputTrigger(requestedChannels, VuoReal) | |||
) |
Stops the audio output device from calling trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 596 of file VuoAudio.cc.
void VuoAudioOut_sendChannels | ( | VuoAudioOut | ao, |
VuoList_VuoAudioSamples | channels, | ||
void * | id | ||
) |
Enqueues channels
for eventual playback.
id
should be a unique identifier for the audio stream (e.g., a pointer to the node's instance data).
When multiple sources are simultaneously sending to the same audio device, each is buffered independently — each unique id
gets its own queue, and at output time a single buffer from each source's queue is mixed to form the final output stream.
Definition at line 619 of file VuoAudio.cc.
VuoAudioOut VuoAudioOut_useShared | ( | VuoAudioOutputDevice | aod | ) |
Returns a shared object for the specified key, allocating it if necessary.
The caller must invoke disuseShared
when it's done using it.
The caller may invoke VuoRetain and VuoRelease, but it is not required, and any such calls must be balanced before invoking disuseShared
.
This function may be called from any thread.
Definition at line 516 of file VuoAudio.cc.
bool VuoAudioOutputDevice_realize | ( | VuoAudioOutputDevice | device, |
VuoAudioOutputDevice * | realizedDevice | ||
) |
If device
's channel count is unknown (zero):
realizedDevice
to that device, and returns true.realizedDevice
unset.If device
's channel count is already known (presumably from the List Audio Devices
node), sets realizedDevice
to a copy of device
, and returns true. (Doesn't bother checking whether the device is currently present.)
This function may be called from any thread.
Definition at line 759 of file VuoAudio.cc.