From c5ae2610b57e54216ee55214bd74368c9c7e22ee Mon Sep 17 00:00:00 2001 From: erihel Date: Sat, 18 Jan 2014 03:42:07 +0100 Subject: 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 --- src/sound/oalsound/alsound.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sound/oalsound/alsound.h') 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 m_sounds; -- cgit v1.2.3-1-g7c22