output/alsa: explicitly mention all snd_pcm_state() enums
I want a compiler warning when a new state needs to be considered here.
This commit is contained in:
parent
c5cf66402c
commit
4ad0747c78
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user