mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 23:36:18 +00:00
Changed: Exceptions catched by reference
This commit is contained in:
parent
e896f53b6b
commit
69bc6a6d4e
1 changed files with 19 additions and 16 deletions
|
@ -892,14 +892,17 @@ void CSourceAL::setStreamingBuffersMax(uint buffers)
|
||||||
|
|
||||||
for(uint i = 0; i < _BuffersMax; ++i)
|
for(uint i = 0; i < _BuffersMax; ++i)
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
// create a new buffer
|
// create a new buffer
|
||||||
CBufferAL *buffer = static_cast<CBufferAL*>(_SoundDriver->createBuffer());
|
CBufferAL *buffer = static_cast<CBufferAL*>(_SoundDriver->createBuffer());
|
||||||
// use StorageSoftware because buffers will be reused
|
// use StorageSoftware because buffers will be reused
|
||||||
// deleting and recreating them is a waste of time
|
// deleting and recreating them is a waste of time
|
||||||
buffer->setStorageMode(IBuffer::StorageSoftware);
|
buffer->setStorageMode(IBuffer::StorageSoftware);
|
||||||
_Buffers[buffer->bufferName()] = buffer;
|
_Buffers[buffer->bufferName()] = buffer;
|
||||||
} catch(ESoundDriverGenBuf &e) {
|
}
|
||||||
|
catch(const ESoundDriverGenBuf &e)
|
||||||
|
{
|
||||||
nlwarning("Cannot create %d buffers. openal fails after %d buffers", buffers, i);
|
nlwarning("Cannot create %d buffers. openal fails after %d buffers", buffers, i);
|
||||||
_BuffersMax = i;
|
_BuffersMax = i;
|
||||||
_BuffersName.resize(i);
|
_BuffersName.resize(i);
|
||||||
|
|
Loading…
Reference in a new issue