ContextCaps

class carb.audio.ContextCaps

Bases: pybind11_object

The capabilities of the context object. Some of these values are set at the creation time of the context object. Others are updated when speaker positions are set or an output device is opened.

Methods

__init__(*args, **kwargs)

Attributes

max_buses

The maximum number of data buses to process simultaneously.

output

The output target that is currently in use for the context.

selected_device

The info for the connection to the currently selected device.

__init__(*args, **kwargs)
property max_buses

The maximum number of data buses to process simultaneously. This is equivalent to the maximum number of potentially audible sounds that could possibly affect the output on the speakers. If more voices than this are active, the quietest or furthest voice will be deactivated. This value is set at creation time of the context object. This can be changed after creation with `set_bus_count()`.

property output

The output target that is currently in use for the context. This will provide access to any streamer objects in use or the index of the currently active output device. The device index stored in here will match the one in @ref selectedDevice if a real audio device is in use.

property selected_device

The info for the connection to the currently selected device. If no device is selected, its `flags` member will be set to `DEVICE_FLAG_NOT_OPEN`. If a device is selected, its information will be set in here, including its preferred output format. Note that the format information may differ from the information returned by `get_device_caps()` as this is the format that the audio is being processed at before being sent to the device.