aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 23:03:20 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 23:03:20 +0100
commit59189160e3b3d6c50f8a56272043c53ff335d7e2 (patch)
treea26776ea9cdb390056dae7747c55dd19eed7f42a
parentee5d3337a776f3d8af5cc6996023320b711f6b95 (diff)
downloadmpd-59189160e3b3d6c50f8a56272043c53ff335d7e2.tar.gz
mpd-59189160e3b3d6c50f8a56272043c53ff335d7e2.tar.xz
mpd-59189160e3b3d6c50f8a56272043c53ff335d7e2.zip
decoder/wavpack: allow more than 2 channels
Remove the OPEN_2CH_MAX option. MPD's support for surround sound is still clunky, but we're working on it.
-rw-r--r--NEWS1
-rw-r--r--src/decoder/wavpack_plugin.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 212f4a688..6cef6bb90 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ ver 0.16 (20??/??/??)
- sidplay: implemented songlength database
- sidplay: support seeking
- wavpack: activate 32 bit support
+ - wavpack: allow more than 2 channels
* encoders:
- twolame: new encoder plugin based on libtwolame
* output:
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index e2f0e9dfb..efffcaeb1 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -139,7 +139,7 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek,
audio_format_init(&audio_format, WavpackGetSampleRate(wpc),
WavpackGetBitsPerSample(wpc),
- WavpackGetReducedChannels(wpc));
+ WavpackGetNumChannels(wpc));
/* round bitwidth to 8-bit units */
audio_format.bits = (audio_format.bits + 7) & (~7);
@@ -503,7 +503,7 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is)
char error[ERRORLEN];
WavpackContext *wpc;
struct input_stream is_wvc;
- int open_flags = OPEN_2CH_MAX | OPEN_NORMALIZE;
+ int open_flags = OPEN_NORMALIZE;
struct wavpack_input isp, isp_wvc;
bool can_seek = is->seekable;
@@ -548,7 +548,7 @@ wavpack_filedecode(struct decoder *decoder, const char *fname)
wpc = WavpackOpenFileInput(
fname, error,
- OPEN_TAGS | OPEN_WVC | OPEN_2CH_MAX | OPEN_NORMALIZE, 23
+ OPEN_TAGS | OPEN_WVC | OPEN_NORMALIZE, 23
);
if (wpc == NULL) {
g_warning(