From 54d001e35144317619ca07ec3b2484d633dd4c3b Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 6 Oct 2014 08:22:18 +0000 Subject: refactoring git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4533 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/flac/decoder_flac.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/plugins/Input/flac/decoder_flac.cpp') diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index 4dfca6839..68627a6c0 100644 --- a/src/plugins/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp @@ -393,9 +393,9 @@ bool DecoderFLAC::initialize() data()->ok = 0; return false; } - ChannelMap channel_map = findChannelMap(data()->channels); - if(channel_map.isEmpty()) + ChannelMap chmap = findChannelMap(data()->channels); + if(chmap.isEmpty()) { qWarning("DecoderFLAC: unsupported number of channels: %d", data()->channels); return false; @@ -404,14 +404,14 @@ bool DecoderFLAC::initialize() switch(data()->bits_per_sample) { case 8: - configure(data()->sample_rate, channel_map, Qmmp::PCM_S8); + configure(data()->sample_rate, chmap, Qmmp::PCM_S8); break; case 16: - configure(data()->sample_rate, channel_map, Qmmp::PCM_S16LE); + configure(data()->sample_rate, chmap, Qmmp::PCM_S16LE); break; case 24: case 32: - configure(data()->sample_rate, channel_map, Qmmp::PCM_S32LE); + configure(data()->sample_rate, chmap, Qmmp::PCM_S32LE); break; default: return false; @@ -564,6 +564,7 @@ uint DecoderFLAC::findID3v2(char *data, ulong size) //retuns ID3v2 tag size return 0; } +//https://xiph.org/flac/format.html#frame_header ChannelMap DecoderFLAC::findChannelMap(int channels) { ChannelMap map; -- cgit v1.2.3-13-gbd6f