Vuo  2.0.2
Typedefs | Functions
VuoAudio.h File Reference

Description

VuoAudio interface.

Definition in file VuoAudio.h.

Go to the source code of this file.

Typedefs

typedef void * VuoAudioOut
 Manages sending audio output. More...
 
typedef void * VuoAudioIn
 Manages receiving live audio input. More...
 

Functions

void VuoAudio_use (void)
 Indicates that the caller needs to get notifications about audio devices. More...
 
void VuoAudio_disuse (void)
 Indicates that the caller no longer needs notifications about audio devices. More...
 
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. More...
 
void VuoAudio_removeDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoAudioInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoAudioOutputDevice))
 Removes a trigger callback previously added by VuoAudio_addDevicesChangedTriggers. More...
 
VuoList_VuoAudioInputDevice VuoAudio_getInputDevices (void)
 Returns a list of the available audio input devices. More...
 
VuoList_VuoAudioOutputDevice VuoAudio_getOutputDevices (void)
 Returns a list of the available audio output devices. More...
 
bool VuoAudioInputDevice_realize (VuoAudioInputDevice device, VuoAudioInputDevice *realizedDevice) VuoWarnUnusedResult
 If device's channel count is unknown (zero): More...
 
bool VuoAudioOutputDevice_realize (VuoAudioOutputDevice device, VuoAudioOutputDevice *realizedDevice) VuoWarnUnusedResult
 If device's channel count is unknown (zero): More...
 
VuoAudioOut VuoAudioOut_getShared (VuoAudioOutputDevice aod)
 Returns the reference-counted object for the specified audio output device. More...
 
void VuoAudioOut_sendChannels (VuoAudioOut ao, VuoList_VuoAudioSamples channels, void *id)
 Enqueues channels for eventual playback. More...
 
void VuoAudioOut_addTrigger (VuoAudioOut ao, VuoOutputTrigger(requestedChannels, VuoReal))
 Sets up the audio output device to call the trigger functions when it receives an event. More...
 
void VuoAudioOut_removeTrigger (VuoAudioOut ao, VuoOutputTrigger(requestedChannels, VuoReal))
 Stops the audio output device from calling trigger functions when it receives an event. More...
 
VuoAudioIn VuoAudioIn_getShared (VuoAudioInputDevice aid)
 Returns the reference-counted object for the specified audio input device. More...
 
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. More...
 
void VuoAudioIn_removeTrigger (VuoAudioIn ai, VuoOutputTrigger(receivedChannels, VuoList_VuoAudioSamples))
 Stops the audio input device from calling trigger functions when it receives an event. More...
 

Typedef Documentation

◆ VuoAudioIn

typedef void* VuoAudioIn

Manages receiving live audio input.

Definition at line 56 of file VuoAudio.h.

◆ VuoAudioOut

typedef void* VuoAudioOut

Manages sending audio output.

Definition at line 37 of file VuoAudio.h.

Function Documentation

◆ VuoAudio_addDevicesChangedTriggers()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 177 of file VuoAudio.cc.

◆ VuoAudio_disuse()

void VuoAudio_disuse ( void  )

Indicates that the caller no longer needs notifications about audio devices.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 145 of file VuoAudio.cc.

◆ VuoAudio_getInputDevices()

VuoList_VuoAudioInputDevice VuoAudio_getInputDevices ( void  )

Returns a list of the available audio input devices.

Definition at line 74 of file VuoAudio.cc.

◆ VuoAudio_getOutputDevices()

VuoList_VuoAudioOutputDevice VuoAudio_getOutputDevices ( void  )

Returns a list of the available audio output devices.

Definition at line 91 of file VuoAudio.cc.

◆ VuoAudio_removeDevicesChangedTriggers()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 191 of file VuoAudio.cc.

◆ VuoAudio_use()

void VuoAudio_use ( void  )

Indicates that the caller needs to get notifications about audio devices.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 121 of file VuoAudio.cc.

◆ VuoAudioIn_addTrigger()

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 519 of file VuoAudio.cc.

◆ VuoAudioIn_getShared()

VuoAudioIn VuoAudioIn_getShared ( VuoAudioInputDevice  aid)

Returns the reference-counted object for the specified audio input device.

Definition at line 484 of file VuoAudio.cc.

◆ VuoAudioIn_removeTrigger()

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 555 of file VuoAudio.cc.

◆ VuoAudioInputDevice_realize()

bool VuoAudioInputDevice_realize ( VuoAudioInputDevice  device,
VuoAudioInputDevice realizedDevice 
)

If device's channel count is unknown (zero):

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving 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 626 of file VuoAudio.cc.

◆ VuoAudioOut_addTrigger()

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 537 of file VuoAudio.cc.

◆ VuoAudioOut_getShared()

VuoAudioOut VuoAudioOut_getShared ( VuoAudioOutputDevice  aod)

Returns the reference-counted object for the specified audio output device.

Definition at line 500 of file VuoAudio.cc.

◆ VuoAudioOut_removeTrigger()

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 573 of file VuoAudio.cc.

◆ VuoAudioOut_sendChannels()

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 595 of file VuoAudio.cc.

◆ VuoAudioOutputDevice_realize()

bool VuoAudioOutputDevice_realize ( VuoAudioOutputDevice  device,
VuoAudioOutputDevice realizedDevice 
)

If device's channel count is unknown (zero):

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving 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 735 of file VuoAudio.cc.