mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] audio: fix failure to properly handle restart if draining
This commit is contained in:
parent
b3c81bcedf
commit
c84879717f
@ -179,10 +179,16 @@ void audio_playbackStart(int channels, int sampleRate, PSAudioFormat format,
|
||||
static int lastChannels = 0;
|
||||
static int lastSampleRate = 0;
|
||||
|
||||
if (STREAM_ACTIVE(audio.playback.state))
|
||||
if (audio.playback.state != STREAM_STATE_STOP)
|
||||
{
|
||||
if (channels == lastChannels && sampleRate == lastSampleRate)
|
||||
{
|
||||
// if the stream was still draining and the format matches, return the
|
||||
// stream to the run state
|
||||
if (audio.playback.state == STREAM_STATE_DRAIN)
|
||||
audio.playback.state = STREAM_STATE_RUN;
|
||||
goto no_change;
|
||||
}
|
||||
|
||||
playbackStopNL();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user