aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Lange2009-07-10 14:30:37 +0000
committerNorbert Lange2009-07-10 14:30:37 +0000
commitc5a3ab2af29d1a03b54de3b61b969c571dbdc922 (patch)
tree4779d764487051581ec249e5af3405a30785dfb8
parentf63c15acc1d77d94e37dc099a000325471544767 (diff)
downloadscummvm-rg350-c5a3ab2af29d1a03b54de3b61b969c571dbdc922.tar.gz
scummvm-rg350-c5a3ab2af29d1a03b54de3b61b969c571dbdc922.tar.bz2
scummvm-rg350-c5a3ab2af29d1a03b54de3b61b969c571dbdc922.zip
changed: period in Paula get set immediately instead of queued
svn-id: r42336
-rw-r--r--sound/mods/paula.cpp7
-rw-r--r--sound/mods/paula.h5
-rw-r--r--tfmx/mxtxplayer.cpp2
3 files changed, 3 insertions, 11 deletions
diff --git a/sound/mods/paula.cpp b/sound/mods/paula.cpp
index c9866e51ab..2e19927d83 100644
--- a/sound/mods/paula.cpp
+++ b/sound/mods/paula.cpp
@@ -56,7 +56,6 @@ void Paula::clearVoice(byte voice) {
_voice[voice].length = 0;
_voice[voice].lengthRepeat = 0;
_voice[voice].period = 0;
- _voice[voice].periodRepeat = 0;
_voice[voice].volume = 0;
_voice[voice].offset = 0;
_voice[voice].dmaCount = 0;
@@ -147,12 +146,6 @@ int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
_voice[voice].data = data = _voice[voice].dataRepeat;
_voice[voice].length = _voice[voice].lengthRepeat;
sLen = intToFrac(_voice[voice].length);
- // TODO: the value in offset shouldnt be dropped but scaled to new rate
-
- if (_voice[voice].period != _voice[voice].periodRepeat) {
- _voice[voice].period = _voice[voice].periodRepeat;
- rate = doubleToFrac(_periodScale / _voice[voice].period);
- }
// If the "rate" exceeds the sample rate, we would have to perform constant
// wrap arounds. So, apply the first step of the euclidean algorithm to
diff --git a/sound/mods/paula.h b/sound/mods/paula.h
index fbc984f121..05bc67cd78 100644
--- a/sound/mods/paula.h
+++ b/sound/mods/paula.h
@@ -80,7 +80,6 @@ protected:
uint32 length;
uint32 lengthRepeat;
int16 period;
- int16 periodRepeat;
byte volume;
frac_t offset;
byte panning; // For stereo mixing: 0 = far left, 255 = far right
@@ -119,12 +118,12 @@ protected:
ch.length = ch.lengthRepeat;
// actually first 2 bytes are dropped?
ch.offset = intToFrac(0);
- ch.period = ch.periodRepeat;
+ // ch.period = ch.periodRepeat;
}
void setChannelPeriod(byte channel, int16 period) {
assert(channel < NUM_VOICES);
- _voice[channel].periodRepeat = period;
+ _voice[channel].period = period;
}
void setChannelVolume(byte channel, byte volume) {
diff --git a/tfmx/mxtxplayer.cpp b/tfmx/mxtxplayer.cpp
index e5200c6584..f3c6887a2b 100644
--- a/tfmx/mxtxplayer.cpp
+++ b/tfmx/mxtxplayer.cpp
@@ -74,7 +74,7 @@ void modcmdmain(const int argc, const char *const argv[]) {
param = atoi(argv[++i]);
debug( "play Song %02X", param);
- player->doSong(0);
+ player->doSong(param);
//player->noteOn(player->_channelCtx[0], 43, 64, 0);