Renderd7-nightly  v0.7.0
sound Class Reference

#include <sound.hpp>

Public Member Functions

 sound (const std::string &path, int channel=1, bool toloop=false)
 Construct new Soundeffect. More...
 
 ~sound ()
 
void play ()
 
void stop ()
 

Detailed Description

Sound Class

Constructor & Destructor Documentation

◆ sound()

sound::sound ( const std::string &  path,
int  channel = 1,
bool  toloop = false 
)

Construct new Soundeffect.

Parameters
pathPath to the .wav file
channelthe channel 1-23
tolooptrue:loop the sound, false: don't loop

◆ ~sound()

sound::~sound ( )

deconstruct the sound

Member Function Documentation

◆ play()

void sound::play ( )

play the sound

◆ stop()

void sound::stop ( )

stop the sound


GitHub |