46 std::shared_ptr<Sound> sound_;
47 std::unique_ptr<SoundParams> params;
48 std::vector<
char> buffer_;
Sound loaded from an OGG file.
SoundFile(const std::string &filename)
Load an OGG file called filename.
void play()
Play the sound once. If called twice the sound would also play twice.
bool isPlaying()
Whether the sound is still playing at least once.
void stop()
Stop the last started sound.
void setPitch(float)
Set pitch in (0.0f, ∞]. Default is 1.0f.
void setVolume(float v)
Set volume in [0, ∞]. Default is 1.0f.
void loop()
Play the sound in a loop. Can also be stopped using stop()