template<UnsignedInt dimensions>
Magnum::Audio::PlayableGroup class

PlayableGroup.

Manages a group of Playable instances with an ability to control gain, transformation or state for all of them at once. See Playable and Listener documentation for more information.

Base classes

template<UnsignedInt dimensions, class Feature, class T>
class Magnum::SceneGraph::FeatureGroup<dimensions, Playable<dimensions>, Float>
Group of features.

Public functions

auto play() -> PlayableGroup<dimensions>&
Play all sound sources in this group.
auto pause() -> PlayableGroup<dimensions>&
Pause all sound sources in this group.
auto stop() -> PlayableGroup<dimensions>&
Stop all sound sources in this group.
auto gain() const -> Float
Gain.
auto setGain(const Float gain) -> PlayableGroup<dimensions>&
Set gain for all sound sources in this group.
auto soundTransformation() const -> const Matrix4&
Sound transformation.
auto setSoundTransformation(const Matrix4& matrix) -> PlayableGroup&
Set transformation of all sound sources in this group.

Function documentation

template<UnsignedInt dimensions>
PlayableGroup<dimensions>& Magnum::Audio::PlayableGroup<dimensions>::play()

Play all sound sources in this group.

Returns Reference to self (for method chaining)

template<UnsignedInt dimensions>
PlayableGroup<dimensions>& Magnum::Audio::PlayableGroup<dimensions>::pause()

Pause all sound sources in this group.

Returns Reference to self (for method chaining)

template<UnsignedInt dimensions>
PlayableGroup<dimensions>& Magnum::Audio::PlayableGroup<dimensions>::stop()

Stop all sound sources in this group.

Returns Reference to self (for method chaining)

template<UnsignedInt dimensions>
PlayableGroup<dimensions>& Magnum::Audio::PlayableGroup<dimensions>::setGain(const Float gain)

Set gain for all sound sources in this group.

Returns Reference to self (for method chaining)

Will calculate source gain for each source relative to the gain of given Playable and this playable group. The source gain is calculated as sourceGain = playableGain*groupGain. Default group gain is 1.0f.

template<UnsignedInt dimensions>
PlayableGroup& Magnum::Audio::PlayableGroup<dimensions>::setSoundTransformation(const Matrix4& matrix)

Set transformation of all sound sources in this group.

Returns Reference to self (for method chaining)