Commit 4ad0747c authored by Max Kellermann's avatar Max Kellermann

output/alsa: explicitly mention all snd_pcm_state() enums

I want a compiler warning when a new state needs to be considered here.
parent c5cf6640
......@@ -803,6 +803,7 @@ AlsaOutput::Recover(int err)
#if GCC_CHECK_VERSION(7,0)
[[fallthrough]];
#endif
case SND_PCM_STATE_OPEN:
case SND_PCM_STATE_SETUP:
case SND_PCM_STATE_XRUN:
period_position = 0;
......@@ -811,12 +812,11 @@ AlsaOutput::Recover(int err)
case SND_PCM_STATE_DISCONNECTED:
break;
/* this is no error, so just keep running */
case SND_PCM_STATE_PREPARED:
case SND_PCM_STATE_RUNNING:
case SND_PCM_STATE_DRAINING:
err = 0;
break;
default:
/* unknown state, do nothing */
break;
}
return err;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment