Added some extra information to OpenAL error messages
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Barotrauma.Sounds
|
||||
AL.BufferData(sound.alBufferId, reader.Channels == 1 ? ALFormat.Mono16 : ALFormat.Stereo16, sound.castBuffer,
|
||||
readSamples * sizeof(short), reader.SampleRate);
|
||||
|
||||
ALHelper.Check();
|
||||
ALHelper.Check(oggFile);
|
||||
}
|
||||
|
||||
//AL.Source(alSourceId, ALSourcei.Buffer, alBufferId);
|
||||
@@ -100,12 +100,12 @@ namespace Barotrauma.Sounds
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//var state = AL.GetSourceState(alSourceId);
|
||||
//if (state == ALSourceState.Playing || state == ALSourceState.Paused)
|
||||
// Stop();
|
||||
System.Diagnostics.Debug.WriteLine(alBufferId);
|
||||
//AL.DeleteSource(alSourceId);
|
||||
AL.DeleteBuffer(alBufferId);
|
||||
if (alBufferId > 0)
|
||||
{
|
||||
AL.DeleteBuffer(alBufferId);
|
||||
alBufferId = 0;
|
||||
}
|
||||
|
||||
//if (ALHelper.Efx.IsInitialized)
|
||||
// ALHelper.Efx.DeleteFilter(alFilterId);
|
||||
|
||||
Reference in New Issue
Block a user