Reopen the audio device if the audio format has changed
git-svn-id: https://svn.musicpd.org/mpd/trunk@4584 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
7f4f3010a5
commit
ff0a2543a6
@ -277,6 +277,10 @@ static void syncAudioDeviceStates(void)
|
||||
return;
|
||||
for (i = audioOutputArraySize; --i >= 0; ) {
|
||||
switch (audioDeviceStates[i]) {
|
||||
case DEVICE_ON:
|
||||
/* This will reopen only if the audio format changed */
|
||||
openAudioOutput(&audioOutputArray[i], &audio_format);
|
||||
break;
|
||||
case DEVICE_ENABLE:
|
||||
openAudioOutput(&audioOutputArray[i], &audio_format);
|
||||
audioDeviceStates[i] = DEVICE_ON;
|
||||
|
Loading…
Reference in New Issue
Block a user