Polygon Dash
Loading...
Searching...
No Matches
AudioRequest Struct Reference

Interfaces with SDL_Mixer to start/stop a sound. More...

Public Member Functions

 this (AudioResource audio, int volume, int loops)
 Create a request for SDL_Mixer to play audio.
 
int Play ()
 Start playing the sound.
 
void Stop ()
 Stop playing the sound.
 

Public Attributes

AudioResource mAudio
 The AudioResource containing the audio data to play.
 
int mVolume
 The volume at which to play the audio.
 
int mLoops
 The number of times to play the sound before terminating.
 

Detailed Description

Interfaces with SDL_Mixer to start/stop a sound.

Not intended to be called outside of AudioManager.

See also
AudioManager

Constructor & Destructor Documentation

◆ this()

AudioRequest::this ( AudioResource audio,
int volume,
int loops )
inline

Create a request for SDL_Mixer to play audio.

Parameters
audiothe AudioResource corresponding to the request
volumehow loud to play the sound
loopsthe number of times to play the sound before terminating

Member Function Documentation

◆ Play()

int AudioRequest::Play ( )
inline

Start playing the sound.

The sound parameters are pulled from mAudio, mVolume, and mLoops.


The documentation for this struct was generated from the following file: