diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-21 22:28:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-21 22:28:15 +0100 |
| commit | de5037c6ec1a33d17bd0a6029676f8fd39f55b41 (patch) | |
| tree | 923545731a28ccc0e5d2c36ede1c6977560d2305 /src/lib | |
| parent | 3dd20a9131a08bda5f31ee0596573f4c5013c4d8 (diff) | |
Fix incorrect conversion of audio from DCP sources (#642).
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 531a33c03..44450f7d9 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -96,7 +96,7 @@ DCPDecoder::pass () shared_ptr<AudioBuffers> data (new AudioBuffers (channels, frames)); for (int i = 0; i < frames; ++i) { for (int j = 0; j < channels; ++j) { - data->data()[j][i] = float (from[0] | (from[1] << 8) | (from[2] << 16)) / (1 << 23); + data->data()[j][i] = static_cast<int> ((from[0] << 8) | (from[1] << 16) | (from[2] << 24)) / static_cast<float> (INT_MAX - 256); from += 3; } } |
