Vizard 8 » Command Index » Vizard modules » viz » <viz>.setDefaultAudioDevice
8.0

<viz>.setDefaultAudioDevice

Set the default audio device to use for audio commands

<viz>.setDefaultAudioDevice(  
device  
)  
device
An audio device object that was retrieved through the <viz>.getAudioDeviceList command or None to use the system default device.

Remarks

Use this command to set the default audio playback device to use for all subsequent audio commands. Use the <viz>.getAudioDeviceList command to get the list of available audio playback devices.

Return Value

None

Example

# Set Oculus Rift headphones as default device for audio commands
for device in viz.getAudioDeviceList():
    if 'rift' in device.name.lower():
        viz.setDefaultAudioDevice(device)
        break
        
# Use default system device for audio commands
viz.setDefaultAudioDevice(None)

See also

<viz>.getAudioDeviceList
<viz>.addAudio
<viz>.addVideo
<viz>.addSoundMixer