aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Lange2009-08-07 16:21:30 +0000
committerNorbert Lange2009-08-07 16:21:30 +0000
commitc4047908aa8970c2742544d2186bf0303fe9c9d0 (patch)
tree8e91f07fab60bd2a77664f8558fb6a941dae27c6
parent648bec1d0ccce8738d672b3a7b23933722cd60e6 (diff)
downloadscummvm-rg350-c4047908aa8970c2742544d2186bf0303fe9c9d0.tar.gz
scummvm-rg350-c4047908aa8970c2742544d2186bf0303fe9c9d0.tar.bz2
scummvm-rg350-c4047908aa8970c2742544d2186bf0303fe9c9d0.zip
added stub for setting audio filter in Paula
fixed wrong value for volume in maxtrax svn-id: r43099
-rw-r--r--sound/mods/maxtrax.cpp11
-rw-r--r--sound/mods/maxtrax.h6
-rw-r--r--sound/mods/paula.h4
-rw-r--r--sound/mods/tfmx.cpp1
-rw-r--r--sound/mods/tfmx.h1
5 files changed, 13 insertions, 10 deletions
diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp
index badc39e5a6..60bf715795 100644
--- a/sound/mods/maxtrax.cpp
+++ b/sound/mods/maxtrax.cpp
@@ -57,7 +57,7 @@ MaxTrax::MaxTrax(int rate, bool stereo)
_playerCtx.frameUnit = (uint16)((1000 * (1<<8)) / _playerCtx.vBlankFreq);
_playerCtx.scoreIndex = -1;
_playerCtx.nextEvent = 0;
- _playerCtx.volume = 0x64;
+ _playerCtx.volume = 0x40;
_playerCtx.tempo = 120;
_playerCtx.tempoTime = 0;
@@ -322,6 +322,7 @@ bool MaxTrax::playSong(int songIndex, bool loop) {
_playerCtx.musicLoop = loop;
setTempo(_playerCtx.tempoInitial << 4);
+ Paula::setAudioFilter(_playerCtx.filterOn);
_playerCtx.tempoTime = 0;
_playerCtx.scoreIndex = songIndex;
_playerCtx.ticks = 0;
@@ -567,14 +568,15 @@ void MaxTrax::noteOff(VoiceContext &voice, const byte note) {
}
void MaxTrax::resetChannel(ChannelContext &chan, bool rightChannel) {
-// chan.modulation = 0;
-// chan.modulationTime = 1000;
-// chan.microtonal = -1;
+ chan.modulation = 0;
+ chan.modulationTime = 1000;
+ chan.microtonal = -1;
chan.portamentoTime = 500;
chan.pitchBend = 64 << 7;
chan.pitchReal = 0;
chan.pitchBendRange = 24;
chan.volume = 128;
+ // TODO: Not all flags sre (re)set, this might make a difference for the unimplemented commands
// chan.flags &= ~ChannelContext::kFlagPortamento & ~ChannelContext::kFlagMicrotonal;
chan.isAltered = true;
if (rightChannel)
@@ -616,7 +618,6 @@ int MaxTrax::playNote(byte note, byte patch, uint16 duration, uint16 volume, boo
voice.stopEventCommand = note;
voice.stopEventParameter = kNumChannels;
voice.stopEventTime = duration << 8;
- debug("Extranote: %d, stoptime: %d", voiceIndex, (voice.stopEventTime / (_playerCtx.frameUnit * 50)) );
}
return voiceIndex;
}
diff --git a/sound/mods/maxtrax.h b/sound/mods/maxtrax.h
index 0c0100a934..a0e0d04d34 100644
--- a/sound/mods/maxtrax.h
+++ b/sound/mods/maxtrax.h
@@ -25,7 +25,6 @@
// see if all engines using this class are DISABLED
#if !defined(ENABLE_KYRA)
-#error trying to include the MaxTrax Header with no engine enabled that uses it
// normal Header Guard
#elif !defined SOUND_MODS_MAXTRAX_H
@@ -126,7 +125,7 @@ private:
uint16 modulation;
uint16 modulationTime;
-// int16 microtonal;
+ int16 microtonal;
uint16 portamentoTime;
@@ -136,14 +135,13 @@ private:
uint8 volume;
uint8 voicesActive;
-// uint8 number;
enum {
kFlagRightChannel = 1 << 0,
kFlagPortamento = 1 << 1,
kFlagDamper = 1 << 2,
kFlagMono = 1 << 3,
-// kFlagMicrotonal = 1 << 4,
+ kFlagMicrotonal = 1 << 4,
kFlagModVolume = 1 << 5
};
byte flags;
diff --git a/sound/mods/paula.h b/sound/mods/paula.h
index 05bc67cd78..72432395d6 100644
--- a/sound/mods/paula.h
+++ b/sound/mods/paula.h
@@ -183,6 +183,10 @@ protected:
_voice[channel].dmaCount = dmaVal;
}
+ void setAudioFilter(bool enable) {
+ // TODO: implement
+ }
+
private:
Channel _voice[NUM_VOICES];
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp
index 9792b77569..eda536ba34 100644
--- a/sound/mods/tfmx.cpp
+++ b/sound/mods/tfmx.cpp
@@ -1043,6 +1043,7 @@ void Tfmx::doSong(int songPos, bool stopAudio) {
_playerCtx.patternSkip = tempo;
}
setInterruptFreqUnscaled(ciaIntervall);
+ Paula::setAudioFilter(true);
_playerCtx.patternCount = 0;
if (trackRun())
diff --git a/sound/mods/tfmx.h b/sound/mods/tfmx.h
index 93979ae662..707eb5952f 100644
--- a/sound/mods/tfmx.h
+++ b/sound/mods/tfmx.h
@@ -25,7 +25,6 @@
// see if all engines using this class are DISABLED
#if !defined(ENABLE_SCUMM)
-#error trying to include the Tfmx Header with no engine enabled that uses it
// normal Header Guard
#elif !defined(SOUND_MODS_TFMX_H)