22 #include <QMediaPlayer> 69 static void playSound(
const string& filename);
89 GSound(
const string& filename);
103 static QMediaPlayer* _qmediaPlayer;
105 static void initialize();
static int getVolume()
Returns the overall audio volume from 0 (silence) to 100 (full volume).
Definition: gsound.cpp:35
static long getDuration()
Returns the duration of the sound clip that is currently playing.
Definition: gsound.cpp:30
static void setVolume(int volume)
Sets the overall audio volume from 0 (silence) to 100 (full volume).
Definition: gsound.cpp:73
static void pause()
Pauses playing the sound, if it is playing.
Definition: gsound.cpp:50
GSound(string filename)
Creates a Sound object by reading in the contents of the specified file or URL.
Definition: gsound.cpp:79
static void stop()
Stops playing the sound, if it is playing.
Definition: gsound.cpp:68
This class encapsulates a sound file.
Definition: gsound.h:45
virtual ~GSound()
Frees the memory associated with the sound.
Definition: gsound.cpp:84
static void playSound(string filename)
Starts playing the sound if not playing, or unpauses if paused.
Definition: gsound.cpp:55
void play()
Starts playing the sound.
Definition: gsound.cpp:88