diff options
author | Max Kellermann <max@duempel.org> | 2011-12-13 21:57:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-12-13 21:57:44 +0100 |
commit | aa4f45b9a56779355f15f867dce9ab0759cb5f7a (patch) | |
tree | e0793dfab38b5540a02c8a8e3d4f2612fe2c3faa /src/output | |
parent | 006b8fa3f07e948cbd277e91546dd815769d7a5e (diff) | |
parent | 96ad5b84446be0bf603895adaf0ec2e97bee11aa (diff) | |
download | mpd-aa4f45b9a56779355f15f867dce9ab0759cb5f7a.tar.gz mpd-aa4f45b9a56779355f15f867dce9ab0759cb5f7a.tar.xz mpd-aa4f45b9a56779355f15f867dce9ab0759cb5f7a.zip |
Merge branch 'v0.16.x'
Conflicts:
NEWS
configure.ac
Diffstat (limited to '')
-rw-r--r-- | src/output/openal_output_plugin.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/output/openal_output_plugin.c b/src/output/openal_output_plugin.c index 622cf559e..0b98dae84 100644 --- a/src/output/openal_output_plugin.c +++ b/src/output/openal_output_plugin.c @@ -61,6 +61,10 @@ openal_output_quark(void) static ALenum openal_audio_format(struct audio_format *audio_format) { + /* note: cannot map SAMPLE_FORMAT_S8 to AL_FORMAT_STEREO8 or + AL_FORMAT_MONO8 since OpenAL expects unsigned 8 bit + samples, while MPD uses signed samples */ + switch (audio_format->format) { case SAMPLE_FORMAT_S16: if (audio_format->channels == 2) @@ -72,16 +76,6 @@ openal_audio_format(struct audio_format *audio_format) 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; - - /* 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; |