ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Loading...
Searching...
No Matches
ToyMaker::SoundMixer Class Reference

Class managing a group of sound channels, as many as permitted by the underlying hardware, which this object mixes to produce a single audio output. More...

#include <types.hpp>

Public Member Functions

 SoundMixer ()
 Creates a mixer for the default audio playback device.
float getGainMaster () const
 Returns the gain applied to the mixed sound output applied by this mixer.
void setGainMaster (float gain)
 Sets the factor by which the sound returned by this mixer is multiplied.
void setGainTagged (const std::string &tag, float gain)
 Sets the gain applied to all channels marked with a particular tag.
void stopTagged (const std::string &tag, uint32_t millis)
 Stops the playback of all channels marked with a specific tag.
void pauseTagged (const std::string &tag)
 Pauses playback of all channels marked with a specific tag.
void resumeTagged (const std::string &tag)
 Resumes playback of all channels marked with a specific tag.

Private Attributes

std::unique_ptr< MIX_Mixer, decltype(&MIX_DestroyMixer)> mMixer
 The SDL3_mixer object this class is a wrapper over.

Friends

class SoundChannel

Detailed Description

Class managing a group of sound channels, as many as permitted by the underlying hardware, which this object mixes to produce a single audio output.

Member Function Documentation

◆ setGainTagged()

void SoundMixer::setGainTagged ( const std::string & tag,
float gain )

Sets the gain applied to all channels marked with a particular tag.

@NOTE: This overwrites the individual gain of each channel marked with this tag.


The documentation for this class was generated from the following files:
  • ToyMaker_Main/include/toymaker/engine/sound/types.hpp
  • ToyMaker_Main/src/sound/types.cpp