Vizard 7 » Command Index » Vizard modules » viz » <viz>.getAudioDeviceList
7.7

<viz>.getAudioDeviceList

Get information about all active audio devices

<viz>.getAudioDeviceList()  

Remarks

This command returns a list of AudioDevice objects containing information about each active audio device on the machine.

The AudioDevice object has the following attributes:

Attribute

Description

id

The 1-based ID number of the device.

name

The name provided by the device.

primary

A True/False value indicating whether this is the primary (default) audio device.

channel_count

The number of channels output by the device.

channel_mask

The mask of channels output by the device.


The AudioDevice object can be used with the <viz>.addSoundMixer, <viz>.addAudio, or <viz>.addVideo commands to specify which device to output audio to.

The AudioDevice object can also be used with the <viz>.setDefaultAudioDevice command to set the default audio playback device for all subsequent audio related commands.

Return Value

List of AudioDevice objects (see remarks)

Example

for device in viz.getAudioDeviceList():
    print(device)

See also

<viz>.setDefaultAudioDevice
<viz>.addAudio
<viz>.addVideo
<viz>.addSoundMixer