summaryrefslogtreecommitdiffstats
path: root/src/sources
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2021-06-19 23:46:40 +0200
committerUwe Klotz <uklotz@mixxx.org>2021-06-20 00:00:14 +0200
commit6730c3cc19acd31e739a78729df97736f169e6e5 (patch)
tree5be7db7fa01890ce5d3439ed63a6a7099c44b155 /src/sources
parente797991177dbdcaa62530f924537bde2a027924d (diff)
SoundSourceFLAC: Reword comment
Diffstat (limited to 'src/sources')
-rw-r--r--src/sources/soundsourceflac.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sources/soundsourceflac.cpp b/src/sources/soundsourceflac.cpp
index 711df7e6e2..94f19d62de 100644
--- a/src/sources/soundsourceflac.cpp
+++ b/src/sources/soundsourceflac.cpp
@@ -399,10 +399,11 @@ namespace {
// https://bugs.launchpad.net/mixxx/+bug/1769717
// https://hydrogenaud.io/index.php/topic,61792.msg559045.html#msg559045
-// We will shift decoded samples left by (32 - m_bitsPerSample) to
-// get rid of the garbage in the most significant bits before scaling
-// to the range [-CSAMPLE_PEAK, CSAMPLE_PEAK - epsilon] with
-// epsilon = 1 / 2 ^ bitsPerSample.
+// We multiply the decoded samples by 2 ^ (32 - m_bitsPerSample) to
+// get rid of the garbage in the most significant bits which get shifted
+// out to the left. The resulting, upscaled integer value is then scaled
+// down to the floating point range [-CSAMPLE_PEAK, CSAMPLE_PEAK - epsilon]
+// with epsilon = 1 / 2 ^ bitsPerSample.
//
// We have to negate the nominator to compensate for the negative denominator!
// Otherwise the phase would be inverted: https://bugs.launchpad.net/mixxx/+bug/1933001