[Scummvm-cvs-logs] SF.net SVN: scummvm:[43099] scummvm/branches/gsoc2009-mods/sound/mods
nolange at users.sourceforge.net
nolange at users.sourceforge.net
Fri Aug 7 18:21:30 CEST 2009
Revision: 43099
http://scummvm.svn.sourceforge.net/scummvm/?rev=43099&view=rev
Author: nolange
Date: 2009-08-07 16:21:30 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
added stub for setting audio filter in Paula
fixed wrong value for volume in maxtrax
Modified Paths:
--------------
scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp
scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.h
scummvm/branches/gsoc2009-mods/sound/mods/paula.h
scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h
Modified: scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp 2009-08-07 11:07:05 UTC (rev 43098)
+++ scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.cpp 2009-08-07 16:21:30 UTC (rev 43099)
@@ -57,7 +57,7 @@
_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 @@
_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::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 @@
voice.stopEventCommand = note;
voice.stopEventParameter = kNumChannels;
voice.stopEventTime = duration << 8;
- debug("Extranote: %d, stoptime: %d", voiceIndex, (voice.stopEventTime / (_playerCtx.frameUnit * 50)) );
}
return voiceIndex;
}
Modified: scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.h
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.h 2009-08-07 11:07:05 UTC (rev 43098)
+++ scummvm/branches/gsoc2009-mods/sound/mods/maxtrax.h 2009-08-07 16:21:30 UTC (rev 43099)
@@ -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 @@
uint16 modulation;
uint16 modulationTime;
-// int16 microtonal;
+ int16 microtonal;
uint16 portamentoTime;
@@ -136,14 +135,13 @@
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;
Modified: scummvm/branches/gsoc2009-mods/sound/mods/paula.h
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/paula.h 2009-08-07 11:07:05 UTC (rev 43098)
+++ scummvm/branches/gsoc2009-mods/sound/mods/paula.h 2009-08-07 16:21:30 UTC (rev 43099)
@@ -183,6 +183,10 @@
_voice[channel].dmaCount = dmaVal;
}
+ void setAudioFilter(bool enable) {
+ // TODO: implement
+ }
+
private:
Channel _voice[NUM_VOICES];
Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp 2009-08-07 11:07:05 UTC (rev 43098)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp 2009-08-07 16:21:30 UTC (rev 43099)
@@ -1043,6 +1043,7 @@
_playerCtx.patternSkip = tempo;
}
setInterruptFreqUnscaled(ciaIntervall);
+ Paula::setAudioFilter(true);
_playerCtx.patternCount = 0;
if (trackRun())
Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h 2009-08-07 11:07:05 UTC (rev 43098)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h 2009-08-07 16:21:30 UTC (rev 43099)
@@ -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)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list