diff options
author | Johannes Schickel | 2010-01-25 01:39:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-25 01:39:44 +0000 |
commit | aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2 (patch) | |
tree | 95f119e687a666f65aad5041910c43bdfd4f2929 /sound/mods | |
parent | ec14cd6e6add76ce4f719edd7ce508d67ebd9f14 (diff) | |
download | scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.gz scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.bz2 scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.zip |
Strip trailing spaces/tabs.
svn-id: r47541
Diffstat (limited to 'sound/mods')
-rw-r--r-- | sound/mods/maxtrax.cpp | 18 | ||||
-rw-r--r-- | sound/mods/maxtrax.h | 2 | ||||
-rw-r--r-- | sound/mods/paula.h | 4 | ||||
-rw-r--r-- | sound/mods/tfmx.cpp | 22 | ||||
-rw-r--r-- | sound/mods/tfmx.h | 8 |
5 files changed, 27 insertions, 27 deletions
diff --git a/sound/mods/maxtrax.cpp b/sound/mods/maxtrax.cpp index ab3015d39c..08e73fb96a 100644 --- a/sound/mods/maxtrax.cpp +++ b/sound/mods/maxtrax.cpp @@ -192,7 +192,7 @@ void MaxTrax::interrupt() { _playerCtx.tempoTicks = 0; } break; - + case 0xC0: // PROGRAM channel.patch = &_patch[curEvent->stopTime & (kNumPatches - 1)]; break; @@ -463,7 +463,7 @@ void MaxTrax::controlCh(ChannelContext &channel, const byte command, const byte else channel.flags &= ~ChannelContext::kFlagPortamento; break; - case 0x50: // Microtonal off/on + case 0x50: // Microtonal off/on if ((data & 0x40) != 0) channel.flags |= ChannelContext::kFlagMicrotonal; else @@ -567,7 +567,7 @@ void MaxTrax::advanceSong(int advance) { const Event *cev = _playerCtx.nextEvent; if (cev) { for (; advance > 0; --advance) { - // TODO - check for boundaries + // TODO - check for boundaries for (; cev->command != 0xFF && (cev->command != 0xA0 || (cev->stopTime >> 8) != 0x00); ++cev) ; // no end_command or special_command + end } @@ -619,7 +619,7 @@ int8 MaxTrax::pickvoice(uint pick, int16 pri) { const uint16 voiceVal = voice->status << 8 | voice->lastVolume; const uint16 altVal = alternate->status << 8 | alternate->lastVolume; - if (voiceVal + voice->tieBreak > altVal + if (voiceVal + voice->tieBreak > altVal || voice->isBlocked > alternate->isBlocked) { // this is somewhat different to the original player, @@ -682,7 +682,7 @@ uint16 MaxTrax::calcNote(const VoiceContext &voice) { const uint8 sineIndex = sineByte & 0x7F; const int16 modVal = ((uint32)(uint16)(tableSine[sineIndex] + (sineIndex ? 1 : 0)) * channel.modulation) >> 8; bend = (sineByte < 0x80) ? bend + modVal : bend - modVal; - } + } } #endif @@ -726,7 +726,7 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui voice->endNote = channel.lastNote = note; return voiceNum; } - } + } if (voiceNum >= 0) { VoiceContext &voice = _voiceCtx[voiceNum]; @@ -758,7 +758,7 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui } channel.lastNote = note; } - + voice.lastPeriod = calcNote(voice); voice.priority = (byte)pri; @@ -866,7 +866,7 @@ bool MaxTrax::load(Common::SeekableReadStream &musicData, bool loadScores, bool const char *errorMsg = 0; // 0x0000: 4 Bytes Header "MXTX" // 0x0004: uint16 tempo - // 0x0006: uint16 flags. bit0 = lowpassfilter, bit1 = attackvolume, bit15 = microtonal + // 0x0006: uint16 flags. bit0 = lowpassfilter, bit1 = attackvolume, bit15 = microtonal if (musicData.size() < 10 || musicData.readUint32BE() != 0x4D585458) { warning("Maxtrax: File is not a Maxtrax Module"); return false; @@ -905,7 +905,7 @@ bool MaxTrax::load(Common::SeekableReadStream &musicData, bool loadScores, bool if (!curScore) goto allocError; _scores = curScore; - + for (scoresLoaded = 0; scoresLoaded < tempScores; ++scoresLoaded, ++curScore) { const uint32 numEvents = musicData.readUint32BE(); Event *curEvent = new Event[numEvents]; diff --git a/sound/mods/maxtrax.h b/sound/mods/maxtrax.h index 3cd5ebc94b..2c86b70288 100644 --- a/sound/mods/maxtrax.h +++ b/sound/mods/maxtrax.h @@ -51,7 +51,7 @@ public: void stopMusic(); /** * Set a callback function for sync-events. - * @param callback Callback function, will be called synchronously, so DONT modify the player + * @param callback Callback function, will be called synchronously, so DONT modify the player * directly in response */ void setSignalCallback(void (*callback) (int)); diff --git a/sound/mods/paula.h b/sound/mods/paula.h index 7ed8ceaeca..0cea60c264 100644 --- a/sound/mods/paula.h +++ b/sound/mods/paula.h @@ -56,11 +56,11 @@ public: void setTimerBaseValue( uint32 ticksPerSecond ) { _timerBase = ticksPerSecond; } uint32 getTimerBaseValue() { return _timerBase; } void setSingleInterrupt(uint sampleDelay) { assert(sampleDelay < _intFreq); _curInt = sampleDelay; } - void setSingleInterruptUnscaled(uint timerDelay) { + void setSingleInterruptUnscaled(uint timerDelay) { setSingleInterrupt((uint)(((double)timerDelay * getRate()) / _timerBase)); } void setInterruptFreq(uint sampleDelay) { _intFreq = sampleDelay; _curInt = 0; } - void setInterruptFreqUnscaled(uint timerDelay) { + void setInterruptFreqUnscaled(uint timerDelay) { setInterruptFreq((uint)(((double)timerDelay * getRate()) / _timerBase)); } void clearVoice(byte voice); diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp index 50cc68eb6b..ad468033c5 100644 --- a/sound/mods/tfmx.cpp +++ b/sound/mods/tfmx.cpp @@ -51,15 +51,15 @@ namespace { namespace Audio { Tfmx::Tfmx(int rate, bool stereo) - : Paula(stereo, rate), - _resource(), - _resourceSample(), + : Paula(stereo, rate), + _resource(), + _resourceSample(), _playerCtx(), _deleteResource(false) { _playerCtx.stopWithLastPattern = false; - for (int i = 0; i < kNumVoices; ++i) + for (int i = 0; i < kNumVoices; ++i) _channelCtx[i].paulaChannel = (byte)i; _playerCtx.volume = 0x40; @@ -485,7 +485,7 @@ startPatterns: break; } - } else + } else --pattern.wait; } else if (pattCmd == 0xFE) { // Stop voice in pattern.expose @@ -519,7 +519,7 @@ bool Tfmx::patternRun(PatternContext &pattern) { doWait = true; } noteCmd &= 0x3F; - } // else Portamento + } // else Portamento noteCommand(noteCmd, patternPtr[1], patternPtr[2], param3); if (doWait) return false; @@ -685,10 +685,10 @@ void Tfmx::noteCommand(const uint8 note, const uint8 param1, const uint8 param2, if (note == 0xFC) { // Lock command channel.sfxLocked = (param1 != 0); - channel.sfxLockTime = param3; // only 1 byte read! + channel.sfxLockTime = param3; // only 1 byte read! } else if (channel.sfxLocked) { // Channel still locked, do nothing - + } else if (note < 0xC0) { // Play Note - Parameters: note, macro, relVol | channel, finetune channel.prevNote = channel.note; @@ -903,7 +903,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa musicData.read(buf, 10); hasHeader = memcmp(buf, "TFMX-SONG ", 10) == 0; } - + if (!hasHeader) { warning("Tfmx: File is not a Tfmx Module"); return 0; @@ -957,7 +957,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa } // TODO: if a File is packed it could have for Ex only 2 Patterns/Macros - // the following loops could then read beyond EOF. + // the following loops could then read beyond EOF. // To correctly handle this it would be necessary to sort the pointers and // figure out the number of Macros/Patterns // We could also analyze pointers if they are correct offsets, @@ -981,7 +981,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa // TODO: we can skip everything thats already stored in the resource-structure. const int32 mdatOffset = offTrackstep ? 0x200 : 0x600; // 0x200 is very conservative const uint32 allocSize = (uint32)mdatSize - mdatOffset; - + byte *mdatAlloc = new byte[allocSize]; if (!mdatAlloc) { warning("Tfmx: Could not allocate Memory: %dKB", allocSize / 1024); diff --git a/sound/mods/tfmx.h b/sound/mods/tfmx.h index bd310b65c9..b24df494cd 100644 --- a/sound/mods/tfmx.h +++ b/sound/mods/tfmx.h @@ -58,7 +58,7 @@ public: */ void doSong(int songPos, bool stopAudio = false); /** - * plays an effect from the sfx-table, does not start audio-playback. + * plays an effect from the sfx-table, does not start audio-playback. * * @param sfxIndex index of effect to play * @param unlockChannel overwrite higher priority effects @@ -74,7 +74,7 @@ public: void stopMacroEffect(int channel); void doMacro(int note, int macro, int relVol = 0, int finetune = 0, int channelNo = 0); - int getTicks() const { return _playerCtx.tickCount; } + int getTicks() const { return _playerCtx.tickCount; } int getSongIndex() const { return _playerCtx.song; } void setSignalPtr(uint16 *ptr, uint16 numSignals) { _playerCtx.signal = ptr; _playerCtx.numSignals = numSignals; } void freeResources() { _deleteResource = true; freeResourceDataImpl(); } @@ -191,7 +191,7 @@ private: uint16 savedStep; uint8 command; - int8 expose; + int8 expose; uint8 loopCount; uint8 wait; ///< how many ticks to wait before next Command } _patternCtx[kNumChannels]; @@ -269,7 +269,7 @@ private: void initFadeCommand(const uint8 fadeTempo, const int8 endVol); void setModuleData(const MdatResource *resource, const int8 *sampleData, uint32 sampleLen, bool autoDelete = true); static const MdatResource *loadMdatFile(Common::SeekableReadStream &musicData); - static const int8 *loadSampleFile(uint32 &sampleLen, Common::SeekableReadStream &sampleStream); + static const int8 *loadSampleFile(uint32 &sampleLen, Common::SeekableReadStream &sampleStream); void freeResourceDataImpl(); void effects(ChannelContext &channel); void macroRun(ChannelContext &channel); |