From fe28f1c73c93b8fb20a3cee14acc1625adef37de Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Mon, 8 Jun 2009 23:12:35 +0000 Subject: tfmx.cpp: added "vibrato-effect" paula.cpp: fixed bug introduced in last commit svn-id: r41392 --- sound/mods/tfmx.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'sound/mods/tfmx.h') diff --git a/sound/mods/tfmx.h b/sound/mods/tfmx.h index fa132d5618..0f33ecb763 100644 --- a/sound/mods/tfmx.h +++ b/sound/mods/tfmx.h @@ -122,7 +122,7 @@ public: uint32 macroOffset; uint32 macroReturnOffset; uint16 macroStep; - uint32 macroReturnStep; + uint16 macroReturnStep; uint8 macroLoopCount; bool macroRun; @@ -142,7 +142,7 @@ public: uint8 relVol; uint8 note; uint8 prevNote; - uint16 fineTune; + int16 fineTune; uint16 portaDestPeriod; uint16 portaPeriod; @@ -155,15 +155,14 @@ public: uint8 envRate; uint8 envEndVolume; - int16 vibOffset; - int8 vibWidth; - uint8 vibFlag; - uint8 vibReset; - uint8 vibTime; + uint8 vibLength; + uint8 vibCount; + int16 vibValue; + int8 vibDelta; uint8 addBeginTime; uint8 addBeginReset; - int32 addBegin; + int16 addBeginDelta; } _channelCtx[kNumVoices]; struct PatternContext { @@ -211,6 +210,14 @@ public: channel.countDmaInterrupts = false; } + void clearEffects(ChannelContext &channel) { + channel.envReset = 0; + + channel.vibLength = 0; + + channel.portaRate = 0; + } + void stopChannel(ChannelContext &channel) { if (!channel.sfxLocked) { channel.macroRun = false; -- cgit v1.2.3