AudioVolumeAttrib

class AudioVolumeAttrib

Bases: RenderAttrib

Applies a scale to audio volume for positional sounds in the scene graph.

Inheritance diagram

Inheritance diagram of AudioVolumeAttrib

static int get_class_slot(void)
static TypeHandle get_class_type(void)
PN_stdfloat get_volume(void) const

Returns the volume to be applied to sounds.

bool has_volume(void) const

Returns true if the AudioVolumeAttrib has a non-identity volume, false otherwise (in which case it might be an off attrib or an identity attrib).

bool is_off(void) const

Returns true if the AudioVolumeAttrib will ignore any color scales inherited from above, false otherwise. This is not the same thing as !has_scale(); a AudioVolumeAttrib may have the “off” flag set and also have another scale specified.

static ConstPointerTo<RenderAttrib> make(PN_stdfloat volume)

Constructs a new AudioVolumeAttrib object that indicates audio volume should be scaled by the indicated factor.

static ConstPointerTo<RenderAttrib> make_default(void)

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

static ConstPointerTo<RenderAttrib> make_identity(void)

Constructs an identity audio volume attrib.

static ConstPointerTo<RenderAttrib> make_off(void)

Constructs a new AudioVolumeAttrib object that ignores any AudioVolumeAttrib inherited from above. You may also specify an additional volume scale to apply to geometry below (using set_volume()).

ConstPointerTo<RenderAttrib> set_volume(PN_stdfloat volume) const

Returns a new AudioVolumeAttrib, just like this one, but with the volume changed to the indicated value.