palace
palace.
Device
Audio mix output, via either a system stream or a hardware port.
This can be used as a context manager that calls close upon completion of the block, even if an error occurs.
close
name (str, optional) – The name of the playback device.
fallback (Iterable[str], optional) – Device names to fallback to, default to an empty tuple.
RuntimeError – If device creation fails.
RuntimeWarning – Before each fallback.
See also
device_names
Available device names
alc_version
ALC version supported by this device.
basic_name
Basic name of the device.
clock_time
Current clock time for the device.
Note
This starts relative to the device being opened, and does not increment while there are no contexts nor while processing is paused. Currently, this may not exactly match the rate that sources play at. In the future it may utilize an OpenAL extension to retrieve the audio device’s real clock.
Close and free the device.
All previously-created contexts must first be destroyed.
current_hrtf
Name of the HRTF currently being used by this device.
If HRTF is not currently enabled, this will be None.
None
efx_version
EFX version supported by this device.
If ALC_EXT_EFX extension is unsupported, this will be (0, 0).
ALC_EXT_EFX
frequency
Playback frequency in hertz.
hrtf_enabled
Whether HRTF is enabled on the device.
If ALC_SOFT_HRTF extension is unavailable, this will return False although there could still be HRTF applied at a lower hardware level.
ALC_SOFT_HRTF
hrtf_names
List of available HRTF names.
The order is retained from OpenAL, such that the index of a given name is the ID to use with ALC_HRTF_ID_SOFT.
ALC_HRTF_ID_SOFT
If ALC_SOFT_HRTF extension is unavailable, this will be an empty list.
max_auxiliary_sends
Maximum number of auxiliary source sends.
If ALC_EXT_EFX is unsupported, this will be 0.
name
Name of the device.
pause_dsp
Pause device processing and stop contexts’ updates.
Multiple calls are allowed but it is not reference counted, so the device will resume after one resume_dsp call.
resume_dsp
This requires ALC_SOFT_pause_device extension.
ALC_SOFT_pause_device
query_extension
Return if an ALC extension exists on this device.
Query non-device-specific ALC extension
reset
Reset the device, using the specified attributes.
If ALC_SOFT_HRTF extension is unavailable, this will be a no-op.
Resume device processing and restart contexts’ updates.
Multiple calls are allowed and will no-op.
Read-only namespace of device names by category (basic, full and capture), as tuples of strings whose first item being the default.
basic
full
capture
Return if a non-device-specific ALC extension exists.
Device.query_extension
Query ALC extension on a device