mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 11:22:45 +01:00
Implemented playSound method
This commit is contained in:
parent
91c1374b89
commit
59a7189ab3
@ -16,7 +16,7 @@ public:
|
||||
|
||||
bool loadSound(const std::string& name, const std::string& fileName);
|
||||
bool isLoaded(const std::string& name);
|
||||
void playSound(const std::string& fileName);
|
||||
void playSound(const std::string& name);
|
||||
|
||||
bool playBackground(const std::string& fileName);
|
||||
|
||||
|
@ -99,6 +99,12 @@ bool SoundManager::isLoaded(const std::string& name)
|
||||
|
||||
return false;
|
||||
}
|
||||
void SoundManager::playSound(const std::string& name)
|
||||
{
|
||||
if (sounds.find(name) != sounds.end()) {
|
||||
alSourcePlay(sounds[name].buffer.source);
|
||||
}
|
||||
}
|
||||
|
||||
bool SoundManager::playBackground(const std::string& fileName)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user