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.
This commit is contained in:
Max Kellermann 2009-11-11 23:03:20 +01:00
parent ee5d3337a7
commit 59189160e3
2 changed files with 4 additions and 3 deletions

1
NEWS
View File

@ -25,6 +25,7 @@ ver 0.16 (20??/??/??)
- sidplay: implemented songlength database - sidplay: implemented songlength database
- sidplay: support seeking - sidplay: support seeking
- wavpack: activate 32 bit support - wavpack: activate 32 bit support
- wavpack: allow more than 2 channels
* encoders: * encoders:
- twolame: new encoder plugin based on libtwolame - twolame: new encoder plugin based on libtwolame
* output: * output:

View File

@ -139,7 +139,7 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek,
audio_format_init(&audio_format, WavpackGetSampleRate(wpc), audio_format_init(&audio_format, WavpackGetSampleRate(wpc),
WavpackGetBitsPerSample(wpc), WavpackGetBitsPerSample(wpc),
WavpackGetReducedChannels(wpc)); WavpackGetNumChannels(wpc));
/* round bitwidth to 8-bit units */ /* round bitwidth to 8-bit units */
audio_format.bits = (audio_format.bits + 7) & (~7); audio_format.bits = (audio_format.bits + 7) & (~7);
@ -503,7 +503,7 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is)
char error[ERRORLEN]; char error[ERRORLEN];
WavpackContext *wpc; WavpackContext *wpc;
struct input_stream is_wvc; struct input_stream is_wvc;
int open_flags = OPEN_2CH_MAX | OPEN_NORMALIZE; int open_flags = OPEN_NORMALIZE;
struct wavpack_input isp, isp_wvc; struct wavpack_input isp, isp_wvc;
bool can_seek = is->seekable; bool can_seek = is->seekable;
@ -548,7 +548,7 @@ wavpack_filedecode(struct decoder *decoder, const char *fname)
wpc = WavpackOpenFileInput( wpc = WavpackOpenFileInput(
fname, error, fname, error,
OPEN_TAGS | OPEN_WVC | OPEN_2CH_MAX | OPEN_NORMALIZE, 23 OPEN_TAGS | OPEN_WVC | OPEN_NORMALIZE, 23
); );
if (wpc == NULL) { if (wpc == NULL) {
g_warning( g_warning(