(e95dff16f) SoundChannel.IsPlaying error tolerance
This commit is contained in:
@@ -325,7 +325,9 @@ namespace Barotrauma.Sounds
|
|||||||
if (ALSourceIndex < 0) return false;
|
if (ALSourceIndex < 0) return false;
|
||||||
if (IsStream && !reachedEndSample) return true;
|
if (IsStream && !reachedEndSample) return true;
|
||||||
int state;
|
int state;
|
||||||
Al.GetSourcei(Sound.Owner.GetSourceFromIndex(Sound.SourcePoolIndex, ALSourceIndex), Al.SourceState, out state);
|
uint alSource = Sound.Owner.GetSourceFromIndex(Sound.SourcePoolIndex, ALSourceIndex);
|
||||||
|
if (!Al.IsSource(alSource)) return false;
|
||||||
|
Al.GetSourcei(alSource, Al.SourceState, out state);
|
||||||
bool playing = state == Al.Playing;
|
bool playing = state == Al.Playing;
|
||||||
int alError = Al.GetError();
|
int alError = Al.GetError();
|
||||||
if (alError != Al.NoError)
|
if (alError != Al.NoError)
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user