Git commit 0c5162941b453bb7af4f3c7c5522bfd6e9ceac61 by Laszlo Papp. Committed on 01/12/2011 at 02:51. Pushed by lpapp into branch 'master'. Divide the sampleSize by 8 for the maxlen since it is in bits M +1 -1 src/qalcontext.cpp http://commits.kde.org/qtopenal/0c5162941b453bb7af4f3c7c5522bfd6e9ceac61 diff --git a/src/qalcontext.cpp b/src/qalcontext.cpp index 4b092a4..0e162f7 100644 --- a/src/qalcontext.cpp +++ b/src/qalcontext.cpp @@ -189,7 +189,7 @@ QALContext::cacheBuffer(const QString& filename) = QByteArray decodedData; QByteArray tmpData; - int maxlen =3D qalSndAudioDecoder.channels() * qalSndAudioDecoder.= sampleRate() * qalSndAudioDecoder.sampleSize(); + int maxlen =3D qalSndAudioDecoder.channels() * qalSndAudioDecoder.= sampleRate() * qalSndAudioDecoder.sampleSize() / 8; = forever { tmpData =3D qalSndAudioDecoder.decode(maxlen);