12 #include <unordered_map> 13 #include <portaudio.h> 35 unsigned long currentFrame;
36 std::vector<char> data;
42 static bool noOutputDevice;
43 static PaDeviceIndex defaultOutput;
44 static unsigned int numInstances;
46 static int audioCallback(
const void *inputBuffer,
void *outputBuffer,
47 unsigned long framesPerBuffer,
48 const PaStreamCallbackTimeInfo *timeInfo,
49 PaStreamCallbackFlags statusFlags,
51 void load(
const std::string soundFilePath);
64 Sound(
const std::string soundFilePath);
75 void play(
const bool repeat=
false);
Sound()
Default constructor.
Definition: Sound.cpp:76
Sound & operator=(const Sound &other)
Copy assignment.
Definition: Sound.cpp:257
void play(const bool repeat=false)
Play the sound.
Definition: Sound.cpp:208
~Sound()
Destructor.
Definition: Sound.cpp:104
void stop()
Stop playing the sound.
Definition: Sound.cpp:235
Class that loads and plays a sound from an ogg file.
Definition: Sound.hpp:24