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 | |
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')
-rw-r--r-- | sound/audiostream.h | 4 | ||||
-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 | ||||
-rw-r--r-- | sound/raw.cpp | 4 | ||||
-rw-r--r-- | sound/raw.h | 2 | ||||
-rw-r--r-- | sound/softsynth/sid.cpp | 2 | ||||
-rw-r--r-- | sound/voc.cpp | 4 | ||||
-rw-r--r-- | sound/wave.cpp | 2 |
11 files changed, 36 insertions, 36 deletions
diff --git a/sound/audiostream.h b/sound/audiostream.h index 4aad22914d..bb0edaa100 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -124,7 +124,7 @@ public: bool isStereo() const { return _parent->isStereo(); } int getRate() const { return _parent->getRate(); } - /** + /** * Returns number of loops the stream has played. * @param numLoops number of loops to play, 0 - infinite */ @@ -256,7 +256,7 @@ private: * A SubSeekableAudioStream provides access to a SeekableAudioStream * just in the range [start, end). * The same caveats apply to SubSeekableAudioStream as do to SeekableAudioStream. - * + * * Manipulating the parent stream directly /will/ mess up a substream. * * IMPORTANT: 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); diff --git a/sound/raw.cpp b/sound/raw.cpp index 1288d826b5..46346f1577 100644 --- a/sound/raw.cpp +++ b/sound/raw.cpp @@ -242,7 +242,7 @@ int RawDiskStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, _filePos = _audioBlock[_currentBlock].pos; _diskLeft = _audioBlock[_currentBlock].len; } - + // Now read more data from disk if there is more to be read if ((_bufferLeft == 0) && (_diskLeft > 0)) { int32 readAmount = MIN(_diskLeft, BUFFER_SIZE); @@ -263,7 +263,7 @@ int RawDiskStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, } } - // In case calling code relies on the position of this stream staying + // In case calling code relies on the position of this stream staying // constant, I restore the location if I've changed it. This is probably // not necessary. if (restoreFilePosition) { diff --git a/sound/raw.h b/sound/raw.h index 6ea8c5a92e..16ab4ec350 100644 --- a/sound/raw.h +++ b/sound/raw.h @@ -116,7 +116,7 @@ struct RawDiskStreamAudioBlock { * @param block Pointer to an RawDiskStreamAudioBlock array * @see RawDiskStreamAudioBlock * @param numBlocks Number of blocks. - * @param rate The rate + * @param rate The rate * @param len Length of the data (in bytes!) * @param flags Flags combination. * @see Mixer::RawFlags diff --git a/sound/softsynth/sid.cpp b/sound/softsynth/sid.cpp index a1d026426d..8d8a75ab0b 100644 --- a/sound/softsynth/sid.cpp +++ b/sound/softsynth/sid.cpp @@ -1275,7 +1275,7 @@ void SID::enable_external_filter(bool enable) { * E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not * be set lower than ~ 8kHz. A lower sample frequency would make the * resampling code overfill its 16k sample ring buffer. - * + * * The end of passband frequency is also limited: * pass_freq <= 0.9*sample_freq/2 * diff --git a/sound/voc.cpp b/sound/voc.cpp index 344825eddd..295498230a 100644 --- a/sound/voc.cpp +++ b/sound/voc.cpp @@ -149,7 +149,7 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, assert(len == 0); break; case 8: { // "Extended" - // This occures in the LoL Intro demo. + // This occures in the LoL Intro demo. // This block overwrites the next parameters of a block 1 "Sound data". // To assure we never get any bad data here, we will assert in case // this tries to define a stereo sound block or tries to use something @@ -251,7 +251,7 @@ int parseVOCFormat(Common::SeekableReadStream& stream, RawDiskStreamAudioBlock* } debug(9, "VOC Data Block: %d, %d, %d", rate, packing, len); if (packing == 0) { - + // Found a data block - so add it to the block list block[currentBlock].pos = stream.pos(); block[currentBlock].len = len; diff --git a/sound/wave.cpp b/sound/wave.cpp index 88ab967f23..45974cf69c 100644 --- a/sound/wave.cpp +++ b/sound/wave.cpp @@ -178,7 +178,7 @@ RewindableAudioStream *makeWAVStream(Common::SeekableReadStream *stream, Dispose return makeADPCMStream(stream, disposeAfterUse, size, Audio::kADPCMMSIma, rate, (flags & Audio::FLAG_STEREO) ? 2 : 1, blockAlign); else if (type == 2) // MS ADPCM return makeADPCMStream(stream, disposeAfterUse, size, Audio::kADPCMMS, rate, (flags & Audio::FLAG_STEREO) ? 2 : 1, blockAlign); - + // Raw PCM. Just read everything at once. // TODO: More elegant would be to wrap the stream. byte *data = (byte *)malloc(size); |