JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Namespaces | Functions
sound.hpp File Reference

Sound related functions. More...

#include "Finally.hpp"
#include <memory>
#include <string>
Include dependency graph for sound.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  jngl
 JNGL's main namespace.
 

Functions

float getVolume ()
 
void play (const std::string &filename)
 Play an OGG audio file once.
 
void stop (const std::string &filename)
 Stop an OGG audio file if it's currently playing.
 
bool isPlaying (const std::string &filename)
 
std::shared_ptr< SoundFileloop (const std::string &filename)
 Play an OGG audio file in a loop.
 
void setPlaybackSpeed (float speed)
 Set global pitch in (0.0f, ∞]. Default is 1.0f.
 
void setVolume (float volume)
 Set global volume in [0, ∞]. Default is 1.0f.
 
Finally pauseAudio ()
 Pauses the playback of all audio; destroying the returned Finally object will resume again.
 

Detailed Description

Sound related functions.

Definition in file sound.hpp.