summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sound_frame.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sound_frame.cc b/src/sound_frame.cc
index b5a52d02..53d00b38 100644
--- a/src/sound_frame.cc
+++ b/src/sound_frame.cc
@@ -50,7 +50,8 @@ int32_t
SoundFrame::get (int channel, int frame) const
{
uint8_t const * d = data() + (frame * _channels * 3) + (channel * 3);
- return d[0] | (d[1] << 8) | (d[2] << 16);
+ /* This is slightly dubious I think */
+ return (d[0] << 8 | (d[1] << 16) | (d[2] << 24)) >> 8;
}
int