diff options
author | erihel <erihel@gmail.com> | 2014-01-18 03:42:07 +0100 |
---|---|---|
committer | erihel <erihel@gmail.com> | 2014-01-18 03:42:07 +0100 |
commit | c5ae2610b57e54216ee55214bd74368c9c7e22ee (patch) | |
tree | 25dae6ea13879af464ffbb807c6d93eff552c66e /src/sound/oalsound/alsound.h | |
parent | 652dc6081df8dc73bc9f57c031420e498be71451 (diff) | |
download | colobot-c5ae2610b57e54216ee55214bd74368c9c7e22ee.tar.gz colobot-c5ae2610b57e54216ee55214bd74368c9c7e22ee.tar.bz2 colobot-c5ae2610b57e54216ee55214bd74368c9c7e22ee.zip |
Minor changes to sound support.
* changed channel limit from 64 to 2048 that will decrease if error is found while trying to play sound
* added id to each channel to avoid collisions when more than 1 object tries to modify a sound
* minor formatting changes
Diffstat (limited to 'src/sound/oalsound/alsound.h')
-rw-r--r-- | src/sound/oalsound/alsound.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h index 6fb832e..4113098 100644 --- a/src/sound/oalsound/alsound.h +++ b/src/sound/oalsound/alsound.h @@ -81,6 +81,8 @@ public: bool PlayPauseMusic(const std::string &filename); void StopPauseMusic(); + bool CheckChannel(int &channel); + private: void CleanUp(); int GetPriority(Sound); @@ -89,6 +91,7 @@ private: bool m_enabled; float m_audioVolume; float m_musicVolume; + unsigned int m_channels_limit; ALCdevice* m_device; ALCcontext* m_context; std::map<Sound, Buffer*> m_sounds; |