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

<viz>.addSoundMixer

Add a sound mixer object

<viz>.addSoundMixer(  
parent = -1  
device = viz.AUTO_COMPUTE  
)  
parent = -1
The parent mixer or -1 to output directly to the specified output device.
device = viz.AUTO_COMPUTE
The device to output audio to.

One of the following device values:

Device Value

Description

viz.AUTO_COMPUTE

Use the device ID specified by the viz.audio.device option or the <viz>.setDefaultAudioDevice command, which defaults to 0.

0

Use the default system audio device (configurable through the Windows Control Panel).

AudioDevice object

An audio device object that was retrieved through the <viz>.getAudioDeviceList command.



The device setting is only used if no parent mixer is specified

Remarks

This command will create a new sound mixer object which can be used to play sound effects.

If a parent mixer is specified, then the output of the mixer will also be affected by the output settings of the parent mixer (e.g. volume, pitch, filter). When the parent mixer is paused, then all child mixers will also be paused as well. If the parent mixer is removed, all child mixers will be removed as well.

If a parent mixer is not specified, then the mixer will output directly to the specified output device, which defaults to the systems primary audio output device.

Return Value

<mixer> object

See also

<mixer>.play