carb.audio#
Classes Summary:
Possible result codes for audio operations. |
|
The Context object for the audio system. |
|
The capabilities of the context object. Some of these values are set |
|
Common base class for all non-exit exceptions. |
|
Context parameters block. This can potentially contain all of a |
|
Extended context parameters block. This is used to set and retrieve |
|
Common base class for all non-exit exceptions. |
|
Contains information about a single audio input or output device. Note that this information should not be stored since it can change at any time due to user activity (ie: unplugging a device, plugging in a new device, changing system default devices, etc). Device information should only be queried just before deciding which device to select. |
|
Specifies a pair of values that define a DSP value range to be interpolated between based on an emitter-listener angle that is between a cone’s inner and outer angles. For angles that are smaller than the cone’s inner angle, the ‘inner’ DSP value will always be used. Similarly, for angles that are larger than the cone’s outer angle, the ‘outer’ DSP value will always be used. Interpolation will only occur when the emitter-listener angle is between the cone’s inner and outer angles. No specific meaning or value range is attached to the ‘inner’ and ‘outer’ DSP values. These come from the specific purpose that this object is used for. |
|
Spatial attributes of an emitter entity. |
|
Common base class for all non-exit exceptions. |
|
Base spatial attributes of the entity. This includes its position, orientation, and velocity and an optional cone. |
|
Defines a sound cone relative to an entity’s front vector. It is defined by two angles - |
|
An event point parsed from a data file. This contains the ID of the event point, its name |
|
A Python friendly replacement of the carb::Float2 struct. |
|
Representation of a globally unique identifier. This is a 128 bit identifier that is often printed in the format ‘{00000000-0000-0000-0000-000000000000}’. |
|
Sound Data management interface. This allows sounds to be loaded from disk or a blob in |
|
Audio playback interface. This interface and its objects manages all audio playback operations and objects. The main operations in this interface are device discovery and context object creation. Once a context object has been created, all of the playback operations are managed through it. Note that only a limited number of playback contexts can exist in a process at any given time. It is best practice to always explicitlyset the variable holding the context object to `None` when it is no longer needed. This helps prevent other attempts to create a new context from failing while waiting for the object to be garbage collected. |
|
Descriptor of a loop point to set on a voice. This may be specified |
|
Common base class for all non-exit exceptions. |
|
Descriptor of the audio output target to use for an audio context. This may be specified both when creating an audio context and when calling set_output(). An output may only consist of a real audio device from the Python side |
|
Used to retrieve the peak volume information for a sound data object. This contains one volume level per channel in the stream and the frame in the stream at which the peak occurs. |
|
Descriptor used to indicate the options passed to the createContext() function. This determines the how the context will behave. |
|
Common base class for all non-exit exceptions. |
|
Descriptor of the rolloff mode and range. The C++ API allows rolloff curves to be set |
|
Distance based DSP value rolloff curve types. These represent the formula that will be used to calculate the spatial DSP values given the distance between an emitter and the listener. This represents the default attenuation calculation that will be performed for all curves that are not overridden with custom curves. The default rolloff model will follow the inverse square law (ie: `INVERSE`). |
|
the data type for a single sample of raw audio data. This describes how each sample in the data buffer should be interpreted. In general, audio data can only be uncompressed Pulse Code Modulation (PCM) data, or encoded in some kind of compressed format. |
|
Sound data object. This provides storage for a single sound asset. The asset’s data, metadata (if any), and various properties about its format are stored and can be retrieved as needed. There are also helper functions to allow new data to be written to the object’s internal data buffers. |
|
Common base class for all non-exit exceptions. |
|
Provides information about the format of a sound. When a sound is loaded from a file, its format will be implicitly set on load. The actual format can then be retrieved later with get_format() on a sound data object. |
|
Names for each supported standard speaker. Positions are given relative to the unit circle where the listener is at the circle’s center and angles run in the clockwise direction with 0 degrees being directly in front of the listener. Note that some of these speakers may have different positions depending on the overall speaker layout. For example, in a stereo layout the ‘front left’ and ‘front right’ speakers are typically used but are located at 270 and 90 degrees respectively instead of 315 and 45 degrees. |
|
Description of how a size or offset value is defined. |
|
Represents a single instance of a playing sound. A single sound object |
|
Non-spatial sound positioning parameters. These provide pan and fade values for the voice to give the impression that the sound is located closer to one of the quadrants of the acoustic space versus the others. These values are ignored for spatial sounds. |
|
The occlusion factors for a voice. This is valid when the `VOICE_PARAM_OCCLUSION_FACTOR` flag is used. These values control automatic low pass filters that get applied to the spatial sounds to simulate object occlusion between the emitter and listener positions. |
|
Voice parameters block. This can potentially contain all of a voice’s |
Functions Summary:
acquire_data_interface(plugin_name: str = None, library_path: str = None) -> carb.audio._audio.IAudioData |
|
acquire_playback_interface(plugin_name: str = None, library_path: str = None) -> carb.audio._audio.IAudioPlayback |
|
get_force_off_playback_mode_flags(flags: int) -> int |
|
get_force_on_playback_mode_flags(flags: int) -> int |