aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/openal_output_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-10-08 14:50:44 +0200
committerMax Kellermann <max@duempel.org>2011-10-08 14:50:44 +0200
commitb43bf4dd741f81239c7ae0c99a048ef0be6286ed (patch)
tree3cb219018da3e22bab9b69c1bb6f94bb312b0329 /src/output/openal_output_plugin.c
parent14424281a0e1407ca04ef05a50541a4178f70e91 (diff)
parent5ed0eb51d16507dcca9764771af8f05f08a078f9 (diff)
downloadmpd-b43bf4dd741f81239c7ae0c99a048ef0be6286ed.tar.gz
mpd-b43bf4dd741f81239c7ae0c99a048ef0be6286ed.tar.xz
mpd-b43bf4dd741f81239c7ae0c99a048ef0be6286ed.zip
Merge branch 'v0.16.x'
Diffstat (limited to 'src/output/openal_output_plugin.c')
-rw-r--r--src/output/openal_output_plugin.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/output/openal_output_plugin.c b/src/output/openal_output_plugin.c
index 1473659f0..622cf559e 100644
--- a/src/output/openal_output_plugin.c
+++ b/src/output/openal_output_plugin.c
@@ -67,26 +67,26 @@ openal_audio_format(struct audio_format *audio_format)
return AL_FORMAT_STEREO16;
if (audio_format->channels == 1)
return AL_FORMAT_MONO16;
- break;
+
+ /* fall back to mono */
+ audio_format->channels = 1;
+ return openal_audio_format(audio_format);
case SAMPLE_FORMAT_S8:
if (audio_format->channels == 2)
return AL_FORMAT_STEREO8;
if (audio_format->channels == 1)
return AL_FORMAT_MONO8;
- break;
+
+ /* fall back to mono */
+ audio_format->channels = 1;
+ return openal_audio_format(audio_format);
default:
/* fall back to 16 bit */
audio_format->format = SAMPLE_FORMAT_S16;
- if (audio_format->channels == 2)
- return AL_FORMAT_STEREO16;
- if (audio_format->channels == 1)
- return AL_FORMAT_MONO16;
- break;
+ return openal_audio_format(audio_format);
}
-
- return 0;
}
static bool