From c1d32fb90e84ff8b1ccf49e0e128d78e0fc46bc5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 14 Oct 2011 17:21:48 +0000 Subject: cue plugin: fixed bug with partial sample git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2395 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/cue/decoder_cue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/Input/cue/decoder_cue.cpp b/src/plugins/Input/cue/decoder_cue.cpp index 398db08d7..dd6c90a5f 100644 --- a/src/plugins/Input/cue/decoder_cue.cpp +++ b/src/plugins/Input/cue/decoder_cue.cpp @@ -108,7 +108,7 @@ bool DecoderCUE::initialize() audioParameters().sampleSize() * m_length/1000; m_totalBytes = 0; - m_sz = audioParameters().sampleSize(); + m_sz = audioParameters().sampleSize() * audioParameters().sampleSize(); addMetaData(m_parser->info(m_track)->metaData()); return true; @@ -160,7 +160,7 @@ qint64 DecoderCUE::read(char *data, qint64 size) } qint64 len2 = qMax(qint64(0), length_in_bytes - m_totalBytes); - len2 = (len2 / m_sz) * m_sz; //returned size must contain integer number of samples + len2 = (len2 / m_sz) * m_sz; //whole of samples of each channel m_totalBytes += len2; //save data of the next track if(m_buf) -- cgit v1.2.3-13-gbd6f