diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-09-23 19:43:05 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-09-23 19:43:05 +0200 |
commit | a6d9159439cb2abcedba3a5bf9bd9040ef75a738 (patch) | |
tree | b87e5de121d2eda074848c772c15cdef7b6f5ecd /plugins/mpgmad | |
parent | c23897031cb443b64306ebf4b797b49cc1f6670d (diff) |
fixed mono mp3 hack
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r-- | plugins/mpgmad/mpgmad.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index abdf117e..098d672a 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -362,7 +362,9 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { buffer->samplerate = samplerate; buffer->packetlength = packetlength; buffer->frameduration = dur; - buffer->channels = nchannels; + if (nchannels > buffer->channels) { + buffer->channels = nchannels; + } buffer->bitspersample = 16; //trace ("frame %d mpeg v%d layer %d bitrate %d samplerate %d packetlength %d framedur %f channels %d\n", nframe, ver, layer, bitrate, samplerate, packetlength, dur, nchannels); } @@ -649,8 +651,7 @@ cmp3_init (DB_fileinfo_t *_info, DB_playItem_t *it) { } _info->bps = info->buffer.bitspersample; _info->samplerate = info->buffer.samplerate; - _info->channels = 2;//info->buffer.channels; -// trace ("mpgmad: nchannels: %d\n", _info->channels); + _info->channels = info->buffer.channels; mad_stream_init(&info->stream); mad_stream_options (&info->stream, MAD_OPTION_IGNORECRC); |