Changed max number of sound channels
parent
c5ae2610b5
commit
d84d38280b
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
|
@ -380,7 +381,8 @@ int ALSound::Play(Sound sound, const Math::Vector &pos, float amplitude, float f
|
|||
|
||||
if (!m_channels[channel]->Play())
|
||||
{
|
||||
GetLogger()->Debug("Changing channel limit to %u.\n", --m_channels_limit);
|
||||
m_channels_limit = std::min(m_channels.size() - 1, m_channels_limit - 1);
|
||||
GetLogger()->Debug("Changing channel limit to %u.\n", m_channels_limit);
|
||||
auto it = m_channels.find(channel);
|
||||
Channel *ch = it->second;
|
||||
m_channels.erase(it);
|
||||
|
|
Loading…
Reference in New Issue