aboutsummaryrefslogtreecommitdiff
path: root/sound/mods/paula.cpp
diff options
context:
space:
mode:
authorSven Hesse2007-01-27 17:32:54 +0000
committerSven Hesse2007-01-27 17:32:54 +0000
commit569136db750eb40fdd882ae459ef01c7ce4e9e58 (patch)
tree0b378ed8c6bb068831c835d2bef37206270be8aa /sound/mods/paula.cpp
parent0fdd4b6481617b6c865d1dff9deeb9d0cb006079 (diff)
downloadscummvm-rg350-569136db750eb40fdd882ae459ef01c7ce4e9e58.tar.gz
scummvm-rg350-569136db750eb40fdd882ae459ef01c7ce4e9e58.tar.bz2
scummvm-rg350-569136db750eb40fdd882ae459ef01c7ce4e9e58.zip
Changed ProtrackerStream to inherit from Paula, unifying the mixing
svn-id: r25226
Diffstat (limited to 'sound/mods/paula.cpp')
-rw-r--r--sound/mods/paula.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/mods/paula.cpp b/sound/mods/paula.cpp
index 33a8dd7c2a..c71d6642a3 100644
--- a/sound/mods/paula.cpp
+++ b/sound/mods/paula.cpp
@@ -67,10 +67,6 @@ int Paula::readBuffer(int16 *buffer, const int numSamples) {
int16 *p;
int8 *data;
-// FIXME: Could this code be unified/merged with ProtrackerStream::generateSound?
-// They look very similar. Maybe one could be rewritten to
-// use the other?
-
Common::StackLock lock(_mutex);
memset(buffer, 0, numSamples * 2);
@@ -96,7 +92,7 @@ int Paula::readBuffer(int16 *buffer, const int numSamples) {
data = _voice[voice].data;
p = buffer;
- _voice[voice].volume &= 0x3F;
+ _voice[voice].volume = MIN((byte) 0x40, _voice[voice].volume);
if ((_voice[voice].lengthRepeat > 2) &&
((int)(offset + nSamples * rate) >= sLen)) {
int neededSamples = nSamples;