EmitterAttributes#
- class carb.audio.EmitterAttributes#
Bases:
pybind11_object
Spatial attributes of an emitter entity.
Methods
__init__
(self)Attributes
Defines an optional sound cone for an entity.
A set of flags that indicate which of members of this struct are valid.
A vector indicating the direction the listener is currently facing.
The current position of the listener in world units.
A descriptor of the rolloff parameters for this emitter.
A vector indicating the upward direction for the listener.
The current velocity of the listener in world units per second.
- __init__( ) None #
- property cone#
Defines an optional sound cone for an entity. The cone is a segment of a sphere around the entity’s position opening up toward its front vector. The cone is defined by an inner and outer angle, and several DSP values to be interpolated between for those two endpoint angles. This cone is valid if the @ref `ENTITY_FLAG_CONE` flag is set in `flags`.
- property flags#
A set of flags that indicate which of members of this struct are valid. This may be `ENTITY_FLAG_ALL` to indicate that all members contain valid data.
- property forward#
A vector indicating the direction the listener is currently facing. This does not need to be normalized, but should be for simplicity. If the `ENTITY_FLAG_NORMALIZE` flag is set in `flags`, this vector will be normalized internally before being used. This vector should be perpendicular to the `up` vector unless the `ENTITY_FLAG_MAKE_PERP` flag is set in `flags`. This must not be a zero vector unless the `ENTITY_FLAG_FORWARD` flag is not set in `flags`.
- property position#
The current position of the listener in world units. This should only be expressed in meters if the world units scale is set to 1.0 for this context. This value is ignored if the `ENTITY_FLAG_POSITION` flag is not set in `flags`.
- property rolloff#
A descriptor of the rolloff parameters for this emitter. This is valid and accessed only if the `ENTITY_FLAG_ROLLOFF` flag is set in `EmitterAttributes.flags`. The curves (if any) in this descriptor must remain valid for the entire time a voice is playing the sound represented by this emitter.
- property up#
A vector indicating the upward direction for the listener. This does not need to be normalized, but should be for simplicity. If the `ENTITY_FLAG_NORMALIZE` flag is set in `flags`, this vector will be normalized internally before being used. This vector should be perpendicular to the `forward` vector unless the `ENTITY_FLAG_MAKE_PERP` flag is set in `flags`. This must not be a zero vector unless the `ENTITY_FLAG_UP` flag is not set in `flags`.
- property velocity#
The current velocity of the listener in world units per second. This should only be expressed in meters per second if the world units scale is set to 1.0 with for the context. The magnitude of this vector will be taken as the listener’s current speed and the vector’s direction will indicate the listener’s current direction. This vector should not be normalized unless the listener’s speed is actually 1.0 units per second. This may be a zero vector if the listener is not moving. This value is ignored if the `ENTITY_FLAG_VELOCITY` flag is not set in `flags`. This vector will not be modified in any way before use.