Wolf3D
Public Member Functions | List of all members
Sample Class Reference

Public Member Functions

 Sample (const std::string &path, int volume, bool stack=false)
 Construct the Sample object. More...
 
void play ()
 Play the Sample on a free mixer channel.
 
void play (int times)
 Play the Sample on a free mixer channel with a loop of an amount. More...
 
void set_volume (int volume)
 Set the volume of the Sample. More...
 

Constructor & Destructor Documentation

◆ Sample()

Sample::Sample ( const std::string &  path,
int  volume,
bool  stack = false 
)

Construct the Sample object.

Parameters
pathPath to the sound effect
volumeVolume to play the sound effect at
stackIf the audio can stack on top of itself

Member Function Documentation

◆ play()

void Sample::play ( int  times)

Play the Sample on a free mixer channel with a loop of an amount.

Parameters
timesRepeat for this many times

◆ set_volume()

void Sample::set_volume ( int  volume)

Set the volume of the Sample.

Parameters
volume

The documentation for this class was generated from the following files: