mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +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
|
@ -890,22 +890,25 @@ void CSourceAL::setStreamingBuffersMax(uint buffers)
|
||||||
unqueueBuffers();
|
unqueueBuffers();
|
||||||
removeBuffers();
|
removeBuffers();
|
||||||
|
|
||||||
for(uint i = 0; i < _BuffersMax; ++i)
|
for(uint i = 0; i < _BuffersMax; ++i)
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
// create a new buffer
|
{
|
||||||
CBufferAL *buffer = static_cast<CBufferAL*>(_SoundDriver->createBuffer());
|
// create a new buffer
|
||||||
// use StorageSoftware because buffers will be reused
|
CBufferAL *buffer = static_cast<CBufferAL*>(_SoundDriver->createBuffer());
|
||||||
// deleting and recreating them is a waste of time
|
// use StorageSoftware because buffers will be reused
|
||||||
buffer->setStorageMode(IBuffer::StorageSoftware);
|
// deleting and recreating them is a waste of time
|
||||||
_Buffers[buffer->bufferName()] = buffer;
|
buffer->setStorageMode(IBuffer::StorageSoftware);
|
||||||
} catch(ESoundDriverGenBuf &e) {
|
_Buffers[buffer->bufferName()] = buffer;
|
||||||
nlwarning("Cannot create %d buffers. openal fails after %d buffers", buffers, i);
|
}
|
||||||
_BuffersMax = i;
|
catch(const ESoundDriverGenBuf &e)
|
||||||
_BuffersName.resize(i);
|
{
|
||||||
break;
|
nlwarning("Cannot create %d buffers. openal fails after %d buffers", buffers, i);
|
||||||
}
|
_BuffersMax = i;
|
||||||
}
|
_BuffersName.resize(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the default size for streaming buffers
|
/// Set the default size for streaming buffers
|
||||||
|
|
Loading…
Reference in a new issue