summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-01-14 20:48:55 +0100
committerMax Kellermann <max@musicpd.org>2017-01-14 20:49:15 +0100
commit4ad0747c785ebe48e80cf265db595cf8d17f5066 (patch)
tree2c83e24a11efd37eb4b92432be4811528c854f58 /src
parentc5cf66402cbeedb70d441a36bbd2c71d54709ba3 (diff)
output/alsa: explicitly mention all snd_pcm_state() enums
I want a compiler warning when a new state needs to be considered here.
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/AlsaOutputPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index d8168a7d1..83584930b 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -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;