R-Type 0.1
Loading...
Searching...
No Matches
rtype::client::RtkAudioAdapter Class Reference

Adapts the sound manager of the graphical library to the IsAudioManager concept. More...

#include <rtkAudiManagerAdapter.hpp>

Public Member Functions

size_t addSound (const std::string &path)
 Loads a sound file.
 
void playSound (size_t id)
 Plays a loaded sound, unknown ids are ignored.
 
void removeSound (size_t id)
 Unloads a sound, unknown ids are ignored.
 
void update ()
 Ticks the underlying sound manager.
 

Detailed Description

Adapts the sound manager of the graphical library to the IsAudioManager concept.

Member Function Documentation

◆ addSound()

size_t rtype::client::RtkAudioAdapter::addSound ( const std::string & path)
inline

Loads a sound file.

Parameters
pathPath of the sound file.
Returns
The sound id, or size_t(-1) if loading failed.

◆ playSound()

void rtype::client::RtkAudioAdapter::playSound ( size_t id)
inline

Plays a loaded sound, unknown ids are ignored.

Parameters
idSound id returned by addSound().

◆ removeSound()

void rtype::client::RtkAudioAdapter::removeSound ( size_t id)
inline

Unloads a sound, unknown ids are ignored.

Parameters
idSound id returned by addSound().