logic bug fix
This commit is contained in:
parent
d38d7a1bed
commit
86fbf4fd8f
1 changed files with 5 additions and 5 deletions
|
@ -999,7 +999,7 @@ static bool BufferMusicStream(int index)
|
|||
if (!currentMusic[index].ctx->playing && currentMusic[index].totalSamplesLeft > 0)
|
||||
{
|
||||
UpdateAudioContext(currentMusic[index].ctx, NULL, 0);
|
||||
return true; // it is still active, only it is paused
|
||||
return true; // it is still active but it is paused
|
||||
}
|
||||
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ void UpdateMusicStream(int index)
|
|||
stb_vorbis_seek_start(currentMusic[index].stream);
|
||||
currentMusic[index].totalSamplesLeft = stb_vorbis_stream_length_in_samples(currentMusic[index].stream) * currentMusic[index].ctx->channels;
|
||||
}
|
||||
active = BufferMusicStream(index);
|
||||
active = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ void UpdateMusicStream(int index)
|
|||
|
||||
alGetSourcei(currentMusic[index].ctx->alSource, AL_SOURCE_STATE, &state);
|
||||
|
||||
if ((state != AL_PLAYING) && active) alSourcePlay(currentMusic[index].ctx->alSource);
|
||||
if (state != AL_PLAYING && active && currentMusic[index].ctx->playing) alSourcePlay(currentMusic[index].ctx->alSource);
|
||||
|
||||
if (!active) StopMusicStream(index);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue