mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-09 20:32:43 +01:00
Implemented pauseSound method
This commit is contained in:
parent
ad137421fb
commit
2bf0500a34
@ -17,6 +17,7 @@ public:
|
||||
bool loadSound(const std::string& name, const std::string& fileName);
|
||||
bool isLoaded(const std::string& name);
|
||||
void playSound(const std::string& name);
|
||||
void pauseSound(const std::string& name);
|
||||
bool isPlaying(const std::string& name);
|
||||
|
||||
bool playBackground(const std::string& fileName);
|
||||
|
@ -105,6 +105,12 @@ void SoundManager::playSound(const std::string& name)
|
||||
alSourcePlay(sounds[name].buffer.source);
|
||||
}
|
||||
}
|
||||
void SoundManager::pauseSound(const std::string& name)
|
||||
{
|
||||
if (sounds.find(name) != sounds.end()) {
|
||||
alSourcePause(sounds[name].buffer.source);
|
||||
}
|
||||
}
|
||||
bool SoundManager::isPlaying(const std::string& name)
|
||||
{
|
||||
if (sounds.find(name) != sounds.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user