JNGL
sound.hpp
Go to the documentation of this file.
1 // Copyright 2012-2020 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 #include <memory>
8 #include <string>
9 
10 namespace jngl {
11 
12 class SoundFile;
13 
14 float getVolume();
15 
17 void play(const std::string& filename);
18 
20 void stop(const std::string& filename);
21 
23 bool isPlaying(const std::string& filename);
24 
30 
31 [[deprecated("an OpenAL implementation will always be available")]]
32 bool isOpenALInstalled();
33 
34 void setPlaybackSpeed(float speed);
35 
36 void setVolume(float volume);
37 
38 } // namespace jngl
std::string
std::shared_ptr
jngl::play
void play(const std::string &filename)
Play an OGG audio file once.
jngl
JNGL's main namespace.
Definition: App.hpp:9
memory
jngl::loop
std::shared_ptr< SoundFile > loop(const std::string &filename)
Play an OGG audio file in a loop.
jngl::stop
void stop(const std::string &filename)
Stop an OGG audio file if it's currently playing.
jngl::isPlaying
bool isPlaying(const std::string &filename)
string