aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-30 21:11:48 +0000
committerEugene Sandulenko2005-07-30 21:11:48 +0000
commit6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch)
treec44c4e61f18ddd537f7082cb48869cf33d422fbd /sound
parent86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff)
downloadscummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'sound')
-rw-r--r--sound/audiocd.cpp4
-rw-r--r--sound/audiostream.cpp18
-rw-r--r--sound/audiostream.h8
-rw-r--r--sound/flac.cpp54
-rw-r--r--sound/fmopl.cpp8
-rw-r--r--sound/fmopl.h4
-rw-r--r--sound/mididrv.cpp4
-rw-r--r--sound/mididrv.h2
-rw-r--r--sound/midiparser_xmidi.cpp8
-rw-r--r--sound/mixer.cpp10
-rw-r--r--sound/mixer.h6
-rw-r--r--sound/mp3.cpp6
-rw-r--r--sound/mpu401.cpp2
-rw-r--r--sound/rate.cpp8
-rw-r--r--sound/softsynth/adlib.cpp26
-rw-r--r--sound/softsynth/emumidi.h6
-rw-r--r--sound/softsynth/fluidsynth.cpp2
-rw-r--r--sound/softsynth/mt32.cpp12
-rw-r--r--sound/softsynth/mt32/freeverb.cpp8
-rw-r--r--sound/softsynth/mt32/freeverb.h6
-rw-r--r--sound/softsynth/mt32/part.h2
-rw-r--r--sound/softsynth/mt32/synth.cpp14
-rw-r--r--sound/softsynth/mt32/tables.cpp2
-rw-r--r--sound/softsynth/ym2612.cpp2
-rw-r--r--sound/vorbis.cpp12
-rw-r--r--sound/wave.cpp12
26 files changed, 123 insertions, 123 deletions
diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp
index ab894724d4..7be50dc4d6 100644
--- a/sound/audiocd.cpp
+++ b/sound/audiocd.cpp
@@ -33,7 +33,7 @@
struct TrackFormat {
/** Decodername */
const char* decoderName;
- /**
+ /**
* Pointer to a function which tries to open the specified track - the only argument
* is the number of the track to be played.
* Returns either the DigitalTrackInfo object representing the requested track or null
@@ -43,7 +43,7 @@ struct TrackFormat {
};
static const TrackFormat TRACK_FORMATS[] = {
- /* decoderName, openTrackFunction */
+ /* decoderName, openTrackFunction */
#ifdef USE_FLAC
{ "Flac", getFlacTrack },
#endif // #ifdef USE_FLAC
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index e8ac3a4ab3..9cab081f69 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -32,15 +32,15 @@ struct StreamFileFormat {
/** Decodername */
const char* decoderName;
const char* fileExtension;
- /**
+ /**
* Pointer to a function which tries to open a file of type StreamFormat.
- * Return NULL in case of an error (invalid/nonexisting file).
+ * Return NULL in case of an error (invalid/nonexisting file).
*/
AudioStream* (*openStreamFile)(Common::File *file, uint32 size);
};
-static const StreamFileFormat STREAM_FILEFORMATS[] = {
- /* decoderName, fileExt, openStreamFuntion */
+static const StreamFileFormat STREAM_FILEFORMATS[] = {
+ /* decoderName, fileExt, openStreamFuntion */
#ifdef USE_FLAC
{ "Flac", "flac", makeFlacStream },
{ "Flac", "fla", makeFlacStream },
@@ -60,7 +60,7 @@ AudioStream* AudioStream::openStreamFile(const char *filename)
char buffer[1024];
const uint len = strlen(filename);
assert(len+6 < sizeof(buffer)); // we need a bigger buffer if wrong
-
+
memcpy(buffer, filename, len);
buffer[len] = '.';
char *ext = &buffer[len+1];
@@ -74,7 +74,7 @@ AudioStream* AudioStream::openStreamFile(const char *filename)
if (fileHandle->isOpen())
stream = STREAM_FILEFORMATS[i].openStreamFile(fileHandle, fileHandle->size());
}
-
+
// Do not reference the file anymore. If the stream didn't incRef the file,
// the object will be deleted (and the file be closed).
fileHandle->decRef();
@@ -93,7 +93,7 @@ AudioStream* AudioStream::openStreamFile(const char *filename)
/**
* A simple raw audio stream, purely memory based. It operates on a single
- * block of data, which is passed to it upon creation.
+ * block of data, which is passed to it upon creation.
* Optionally supports looping the sound.
*
* Design note: This code tries to be as optimized as possible (without
@@ -129,7 +129,7 @@ public:
}
if (stereo) // Stereo requires even sized data
assert(len % 2 == 0);
-
+
_origPtr = autoFreeMemory ? ptr : 0;
}
~LinearMemoryStream() {
@@ -191,7 +191,7 @@ AudioStream *makeLinearInputStream(int rate, byte flags, const byte *ptr, uint32
const bool isUnsigned = (flags & Audio::Mixer::FLAG_UNSIGNED) != 0;
const bool isLE = (flags & Audio::Mixer::FLAG_LITTLE_ENDIAN) != 0;
const bool autoFree = (flags & Audio::Mixer::FLAG_AUTOFREE) != 0;
-
+
if (isStereo) {
if (isUnsigned) {
MAKE_LINEAR(true, true);
diff --git a/sound/audiostream.h b/sound/audiostream.h
index 13a70afa65..798c77e6c7 100644
--- a/sound/audiostream.h
+++ b/sound/audiostream.h
@@ -47,7 +47,7 @@ public:
/** Is this a stereo stream? */
virtual bool isStereo() const = 0;
-
+
/**
* End of data reached? If this returns true, it means that at this
* time there is no data available in the stream. However there may be
@@ -56,7 +56,7 @@ public:
* converting data or stop.
*/
virtual bool endOfData() const = 0;
-
+
/**
* End of stream reached? If this returns true, it means that all data
* in this stream is used up and no additional data will appear in it
@@ -75,7 +75,7 @@ public:
* In case of an error, the file handle will be closed, but deleting
* it is still the responsibilty of the caller.
* @param filename a filename without an extension
- * @return an Audiostream ready to use in case of success;
+ * @return an Audiostream ready to use in case of success;
* NULL in case of an error (e.g. invalid/nonexisting file)
*/
static AudioStream* openStreamFile(const char *filename);
@@ -98,7 +98,7 @@ public:
}
bool isStereo() const { return false; }
bool eos() const { return _len <= 0; }
-
+
int getRate() const { return -1; }
};
diff --git a/sound/flac.cpp b/sound/flac.cpp
index c5840476ed..a6551e544d 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -86,7 +86,7 @@ protected:
inline ::FLAC__StreamDecoderWriteStatus callbackWrite(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
inline void callbackMetadata(const ::FLAC__StreamMetadata *metadata);
inline void callbackError(::FLAC__StreamDecoderErrorStatus status);
-
+
::FLAC__SeekableStreamDecoder *_decoder;
private:
@@ -103,14 +103,14 @@ private:
void operator=(const FlacInputStream &);
bool isValid() const { return _decoder != NULL; }
-
+
bool allocateBuffer(uint minSamples);
inline void flushBuffer();
inline void deleteBuffer();
-
+
/** Header of the Stream */
FLAC__StreamMetadata_StreamInfo _streaminfo;
-
+
struct {
/** Handle to the File */
File *fileHandle;
@@ -121,25 +121,25 @@ private:
/** last index of Stream + 1(!) - not necessary end of file */
uint32 fileEndPos;
} _fileInfo;
-
+
/** index of the first Sample to be played */
FLAC__uint64 _firstSample;
/** index + 1(!) of the last Sample to be played - 0 is end of Stream*/
FLAC__uint64 _lastSample;
-
+
/** true if the last Sample was decoded from the FLAC-API - there might still be data in the buffer */
bool _lastSampleWritten;
-
+
typedef int16 bufType;
enum { BUFTYPE_BITS = 16 };
-
+
struct {
bufType *bufData;
bufType *bufReadPos;
uint bufSize;
uint bufFill;
} _preBuffer;
-
+
bufType *_outBuffer;
uint _requestedSamples;
@@ -154,7 +154,7 @@ private:
};
FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart)
- : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
+ : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
_outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(true),
_methodConvertBuffers(&FlacInputStream::convertBuffersGeneric)
{
@@ -170,15 +170,15 @@ FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart)
_fileInfo.fileStartPos = fileStart;
_fileInfo.filePos = fileStart;
_fileInfo.fileEndPos = sourceFile->size();
-
+
_fileInfo.fileHandle->incRef();
}
-FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart, const uint32 fileStop)
- : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
+FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart, const uint32 fileStop)
+ : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
_outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(true),
_methodConvertBuffers(&FlacInputStream::convertBuffersGeneric)
-{
+{
assert(sourceFile != NULL && sourceFile->isOpen());
assert(fileStop <= 0 || (fileStart < fileStop && fileStop <= sourceFile->size()));
@@ -192,7 +192,7 @@ FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart, const
_fileInfo.fileStartPos = fileStart;
_fileInfo.filePos = fileStart;
_fileInfo.fileEndPos = fileStop;
-
+
_fileInfo.fileHandle->incRef();
}
@@ -203,7 +203,7 @@ FlacInputStream::~FlacInputStream() {
}
if (_preBuffer.bufData != NULL)
delete[] _preBuffer.bufData;
-
+
_fileInfo.fileHandle->decRef();
}
@@ -246,7 +246,7 @@ bool FlacInputStream::init() {
}
warning("FlacInputStream: could not create an Audiostream from File %s", _fileInfo.fileHandle->name());
- return false;
+ return false;
}
bool FlacInputStream::finish() {
@@ -304,7 +304,7 @@ int FlacInputStream::readBuffer(int16 *buffer, const int numSamples) {
const uint copySamples = MIN((uint)numSamples, _preBuffer.bufFill);
memcpy(buffer, _preBuffer.bufReadPos, copySamples*sizeof(buffer[0]));
-
+
_outBuffer = buffer + copySamples;
_requestedSamples = numSamples - copySamples;
_preBuffer.bufReadPos += copySamples;
@@ -351,9 +351,9 @@ inline ::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callbackRead(FLA
if (*bytes == 0)
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; /* abort to avoid a deadlock */
-
+
const uint32 length = MIN(_fileInfo.fileEndPos - _fileInfo.filePos, static_cast<uint32>(*bytes));
-
+
_fileInfo.fileHandle->seek(_fileInfo.filePos);
const uint32 bytesRead = _fileInfo.fileHandle->read(buffer, length);
@@ -365,7 +365,7 @@ inline ::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callbackRead(FLA
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
}
-inline void FlacInputStream::setLastSample(FLAC__uint64 absoluteSample) {
+inline void FlacInputStream::setLastSample(FLAC__uint64 absoluteSample) {
if (_lastSampleWritten && absoluteSample > _lastSample)
_lastSampleWritten = false;
_lastSample = absoluteSample;
@@ -555,14 +555,14 @@ void FlacInputStream::convertBuffersGeneric(bufType* bufDestination, const FLAC_
if (numBits < BUFTYPE_BITS) {
const uint8 kPower = (uint8)(BUFTYPE_BITS - numBits);
-
+
for (; numSamples > 0; numSamples -= numChannels) {
for (uint i = 0; i < numChannels; ++i)
*bufDestination++ = static_cast<bufType>(*(inChannels[i]++)) << kPower;
}
} else if (numBits > BUFTYPE_BITS) {
const uint8 kPower = (uint8)(numBits - BUFTYPE_BITS);
-
+
for (; numSamples > 0; numSamples -= numChannels) {
for (uint i = 0; i < numChannels; ++i)
*bufDestination++ = static_cast<bufType>(*(inChannels[i]++) >> kPower) ;
@@ -582,7 +582,7 @@ inline ::FLAC__StreamDecoderWriteStatus FlacInputStream::callbackWrite(const ::F
assert(frame->header.sample_rate == _streaminfo.sample_rate);
assert(frame->header.bits_per_sample == _streaminfo.bits_per_sample);
assert(frame->header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER || _streaminfo.min_blocksize == _streaminfo.max_blocksize);
-
+
assert(_preBuffer.bufFill == 0); // we dont append data
uint nSamples = frame->header.blocksize;
@@ -611,7 +611,7 @@ inline ::FLAC__StreamDecoderWriteStatus FlacInputStream::callbackWrite(const ::F
if (_requestedSamples > 0) {
assert(_requestedSamples % kNumChannels == 0); // must be integral multiply of channels
assert(_outBuffer != NULL);
-
+
const uint copySamples = MIN(_requestedSamples,nSamples);
(*_methodConvertBuffers)(_outBuffer, inChannels, copySamples, kNumChannels, kNumBits);
@@ -674,7 +674,7 @@ inline void FlacInputStream::callbackMetadata(const ::FLAC__StreamMetadata *meta
}
inline void FlacInputStream::callbackError(::FLAC__StreamDecoderErrorStatus status) {
// some of these are non-critical-Errors
- debug(1, "FlacInputStream: An error occured while decoding. DecoderState is: %s",
+ debug(1, "FlacInputStream: An error occured while decoding. DecoderState is: %s",
FLAC__StreamDecoderErrorStatusString[status]);
}
@@ -794,7 +794,7 @@ void FlacTrackInfo::play(Audio::Mixer *mixer, Audio::SoundHandle *handle, int st
debug(1, "FlacTrackInfo: Audiostream %s could not seek to frame %d (ca %d secs)", _file->name(), startFrame, startFrame/75);
flac->finish();
}
- delete flac;
+ delete flac;
}
FlacTrackInfo::~FlacTrackInfo()
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp
index ddba9dbfef..056459ceea 100644
--- a/sound/fmopl.cpp
+++ b/sound/fmopl.cpp
@@ -451,7 +451,7 @@ inline void OPL_CALC_CH(OPL_CH *CH) {
env_out=OPL_CALC_SLOT(SLOT);
if(env_out < (uint)(EG_ENT - 1)) {
/* PG */
- if(SLOT->vib)
+ if(SLOT->vib)
SLOT->Cnt += (SLOT->Incr * vib / VIB_RATE);
else
SLOT->Cnt += SLOT->Incr;
@@ -487,7 +487,7 @@ inline void OPL_CALC_CH(OPL_CH *CH) {
inline void OPL_CALC_RH(OPL_CH *CH) {
uint env_tam, env_sd, env_top, env_hh;
int whitenoise = int(oplRnd.getRandomNumber(1) * (WHITE_NOISE_db / EG_STEP));
-
+
int tone8;
OPL_SLOT *SLOT;
@@ -584,7 +584,7 @@ static void init_timetables(FM_OPL *OPL, int ARRATE, int DRRATE) {
OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0;
for (i = 4; i <= 60; i++){
rate = OPL->freqbase; /* frequency rate */
- if(i < 60)
+ if(i < 60)
rate *= 1.0 + (i & 3) * 0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */
rate *= 1 << ((i >> 2) - 1); /* b2-5 : shift bit */
rate *= (double)(EG_ENT << ENV_BITS);
@@ -973,7 +973,7 @@ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) {
ARM_CALL(ARM_COMMON, PNO_DATA())
ARM_END();
#endif
-
+
int i;
int data;
int16 *buf = buffer;
diff --git a/sound/fmopl.h b/sound/fmopl.h
index c65fd553ce..b80a4eb2d0 100644
--- a/sound/fmopl.h
+++ b/sound/fmopl.h
@@ -59,7 +59,7 @@ typedef struct fm_opl_slot {
uint mul; /* multiple :ML_TABLE[ML] */
uint Cnt; /* frequency count */
uint Incr; /* frequency step */
-
+
/* envelope generator state */
uint8 eg_typ;/* envelope type flag */
uint8 evm; /* envelope phase */
@@ -116,7 +116,7 @@ typedef struct fm_opl_f {
/* Rythm sention */
uint8 rythm; /* Rythm mode , key flag */
-
+
/* time tables */
int AR_TABLE[75]; /* atttack rate tables */
int DR_TABLE[75]; /* decay rate tables */
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 45a7031f7a..fe24f51a1e 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -136,7 +136,7 @@ int MidiDriver::detectMusicDriver(int midiFlags) {
musicDriver = MD_ETUDE;
#elif defined(_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND) || defined (__SYMBIAN32__)
// Always use MIDI emulation via adlib driver on CE and UNIX device
-
+
// TODO: We should, for the Unix targets, attempt to detect
// whether a sequencer is available, and use it instead.
musicDriver = MD_ADLIB;
@@ -195,7 +195,7 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) {
case MD_ZODIAC: return MidiDriver_Zodiac_create();
#endif
#endif
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
case MD_WINDOWS: return MidiDriver_WIN_create();
#endif
#if defined(__MORPHOS__)
diff --git a/sound/mididrv.h b/sound/mididrv.h
index 07b6e18611..556c0c2414 100644
--- a/sound/mididrv.h
+++ b/sound/mididrv.h
@@ -149,7 +149,7 @@ public:
// Timing functions - MidiDriver now operates timers
virtual void setTimerCallback(void *timer_param, Common::Timer::TimerProc timer_proc) = 0;
-
+
/** The time in microseconds between invocations of the timer callback. */
virtual uint32 getBaseTempo(void) = 0;
diff --git a/sound/midiparser_xmidi.cpp b/sound/midiparser_xmidi.cpp
index 8d8c2e9ea1..3ee08ccb7d 100644
--- a/sound/midiparser_xmidi.cpp
+++ b/sound/midiparser_xmidi.cpp
@@ -26,7 +26,7 @@
/**
* The XMIDI version of MidiParser.
- *
+ *
* Much of this code is adapted from the XMIDI implementation from the exult
* project.
*/
@@ -52,7 +52,7 @@ public:
uint32 MidiParser_XMIDI::readVLQ2(byte * &pos) {
uint32 value = 0;
int i;
-
+
for (i = 0; i < 4; ++i) {
if (pos[0] & 0x80)
break;
@@ -140,12 +140,12 @@ bool MidiParser_XMIDI::loadMusic(byte *data, uint32 size) {
if (!memcmp(pos, "FORM", 4)) {
pos += 4;
- // Read length of
+ // Read length of
len = read4high(pos);
start = pos;
// XDIRless XMIDI, we can handle them here.
- if (!memcmp(pos, "XMID", 4)) {
+ if (!memcmp(pos, "XMID", 4)) {
warning("XMIDI doesn't have XDIR");
pos += 4;
_num_tracks = 1;
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index f97c563ccf..c32675a85d 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -114,7 +114,7 @@ Mixer::Mixer() {
_volumeForSoundType[i] = kMaxMixerVolume;
_paused = false;
-
+
for (i = 0; i != NUM_CHANNELS; i++)
_channels[i] = 0;
@@ -144,7 +144,7 @@ void Mixer::setupPremix(AudioStream *stream, SoundType type) {
delete _premixChannel;
_premixChannel = 0;
-
+
if (stream == 0)
return;
@@ -399,7 +399,7 @@ void Mixer::setVolumeForSoundType(SoundType type, int volume) {
volume = kMaxMixerVolume;
else if (volume < 0)
volume = 0;
-
+
// TODO: Maybe we should do logarithmic (not linear) volume
// scaling? See also Player_V2::setMasterVolume
@@ -408,7 +408,7 @@ void Mixer::setVolumeForSoundType(SoundType type, int volume) {
int Mixer::getVolumeForSoundType(SoundType type) const {
assert(0 <= type && type < ARRAYSIZE(_volumeForSoundType));
-
+
return _volumeForSoundType[type];
}
@@ -462,7 +462,7 @@ void Channel::mix(int16 *data, uint len) {
// balance value ranges from -127 to 127. The mixer (music/sound)
// volume is in the range 0 - kMaxMixerVolume.
// Hence, the vol_l/vol_r values will be in that range, too
-
+
int vol = _mixer->getVolumeForSoundType(_type) * _volume;
st_volume_t vol_l, vol_r;
diff --git a/sound/mixer.h b/sound/mixer.h
index 001753301a..72f881d626 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -69,7 +69,7 @@ public:
/** loop the audio */
FLAG_LOOP = 1 << 6
};
-
+
enum SoundType {
kPlainSoundType = 0,
@@ -77,7 +77,7 @@ public:
kSFXSoundType = 2,
kSpeechSoundType = 3
};
-
+
enum {
kMaxChannelVolume = 255,
kMaxMixerVolume = 256
@@ -98,7 +98,7 @@ private:
int _volumeForSoundType[4];
bool _paused;
-
+
uint32 _handleSeed;
Channel *_channels[NUM_CHANNELS];
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 792f8f6bf4..4c9f238eed 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -64,7 +64,7 @@ public:
bool endOfData() const { return eosIntern(); }
bool isStereo() const { return _isStereo; }
-
+
int getRate() const { return _frame.header.samplerate; }
#ifdef __SYMBIAN32__
// Used to store the last position stream was read for symbian
@@ -193,7 +193,7 @@ bool MP3InputStream::init() {
warning("MP3InputStream: Cannot determine number of channels");
return false;
}
-
+
return true;
}
@@ -256,7 +256,7 @@ void MP3InputStream::refill(bool first) {
mad_timer_t frame_duration = _frame.header.duration;
mad_timer_negate(&frame_duration);
mad_timer_add(&_duration, frame_duration);
-
+
if (!first && mad_timer_compare(_duration, mad_timer_zero) <= 0)
_size = -1; // Mark for EOF
}
diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp
index 460aed5f52..c46c3d60ac 100644
--- a/sound/mpu401.cpp
+++ b/sound/mpu401.cpp
@@ -90,7 +90,7 @@ MidiDriver_MPU401::MidiDriver_MPU401() :
_timer_proc (0),
_channel_mask (0xFFFF) // Permit all 16 channels by default
{
-
+
uint i;
for (i = 0; i < ARRAYSIZE(_midi_channels); ++i) {
_midi_channels [i].init (this, i);
diff --git a/sound/rate.cpp b/sound/rate.cpp
index eedc283cc6..997aa7e7cf 100644
--- a/sound/rate.cpp
+++ b/sound/rate.cpp
@@ -209,10 +209,10 @@ public:
virtual int flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) {
assert(input.isStereo() == stereo);
-
+
st_sample_t *ptr;
st_size_t len;
-
+
if (stereo)
osamp *= 2;
@@ -225,7 +225,7 @@ public:
// Read up to 'osamp' samples into our temporary buffer
len = input.readBuffer(_buffer, osamp);
-
+
// Mix the data into the output buffer
ptr = _buffer;
while (len--) {
@@ -241,7 +241,7 @@ public:
// output left channel
clampedAdd(*obuf++, (tmp0 * (int)vol_l) / Audio::Mixer::kMaxMixerVolume);
-
+
// output right channel
clampedAdd(*obuf++, (tmp1 * (int)vol_r) / Audio::Mixer::kMaxMixerVolume);
}
diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp
index 5f0d0435bd..8fb7aea19e 100644
--- a/sound/softsynth/adlib.cpp
+++ b/sound/softsynth/adlib.cpp
@@ -195,7 +195,7 @@ struct AdlibVoice {
Struct11 _s11a;
Struct10 _s10b;
Struct11 _s11b;
-
+
AdlibVoice() { memset(this, 0, sizeof(AdlibVoice)); }
};
@@ -461,14 +461,14 @@ static byte gm_percussion_to_fm[39][30] = {
};
static const byte gm_percussion_lookup[128] = {
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
- 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0xFF, 0xFF, 0x17, 0x18, 0x19, 0x1A,
- 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x21, 0x22, 0x23, 0xFF, 0xFF,
- 0x24, 0x25, 0xFF, 0xFF, 0xFF, 0x26, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
+ 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0xFF, 0xFF, 0x17, 0x18, 0x19, 0x1A,
+ 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x21, 0x22, 0x23, 0xFF, 0xFF,
+ 0x24, 0x25, 0xFF, 0xFF, 0xFF, 0x26, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
static byte lookup_table[64][32];
@@ -551,7 +551,7 @@ public:
void send(byte channel, uint32 b); // Supports higher than channel 15
uint32 property(int prop, uint32 param);
- void setPitchBendRange(byte channel, uint range);
+ void setPitchBendRange(byte channel, uint range);
void sysEx_customInstrument(byte channel, uint32 type, byte *instr);
MidiChannel *allocateChannel();
@@ -798,7 +798,7 @@ void AdlibPercussionChannel::noteOn(byte note, byte velocity) {
// MidiDriver method implementations
-MidiDriver_ADLIB::MidiDriver_ADLIB(Audio::Mixer *mixer)
+MidiDriver_ADLIB::MidiDriver_ADLIB(Audio::Mixer *mixer)
: MidiDriver_Emulated(mixer) {
uint i;
@@ -865,7 +865,7 @@ void MidiDriver_ADLIB::close() {
// Turn off the OPL emulation
// YM3812Shutdown();
-
+
free(_adlib_reg_cache);
}
@@ -1308,7 +1308,7 @@ AdlibVoice *MidiDriver_ADLIB::allocate_voice(byte pri) {
}
/* V3 games don't have note priorities, first comes wins. */
- if (_game_SmallHeader)
+ if (_game_SmallHeader)
return NULL;
if (best)
diff --git a/sound/softsynth/emumidi.h b/sound/softsynth/emumidi.h
index 579aebeeff..75559530f3 100644
--- a/sound/softsynth/emumidi.h
+++ b/sound/softsynth/emumidi.h
@@ -46,10 +46,10 @@ protected:
public:
MidiDriver_Emulated(Audio::Mixer *mixer) : _mixer(mixer) {
_isOpen = false;
-
+
_timerProc = 0;
_timerParam = 0;
-
+
_nextTick = 0;
_samplesPerTick = 0;
@@ -89,7 +89,7 @@ public:
step = (_nextTick >> FIXP_SHIFT);
generateSamples(data, step);
-
+
_nextTick -= step << FIXP_SHIFT;
if (!(_nextTick >> FIXP_SHIFT)) {
if (_timerProc)
diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp
index 5bcf0993af..563dbd84f1 100644
--- a/sound/softsynth/fluidsynth.cpp
+++ b/sound/softsynth/fluidsynth.cpp
@@ -73,7 +73,7 @@ MidiDriver_FluidSynth::MidiDriver_FluidSynth(Audio::Mixer *mixer)
}
// It ought to be possible to get FluidSynth to generate samples at
- // lower
+ // lower
_outputRate = _mixer->getOutputRate();
if (_outputRate < 22050)
diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp
index 94373b980a..2cef1cbedf 100644
--- a/sound/softsynth/mt32.cpp
+++ b/sound/softsynth/mt32.cpp
@@ -238,7 +238,7 @@ int MidiDriver_MT32::open() {
return MERR_ALREADY_OPEN;
MidiDriver_Emulated::open();
-
+
memset(&prop, 0, sizeof(prop));
prop.sampleRate = getRate();
prop.useReverb = true;
@@ -253,10 +253,10 @@ int MidiDriver_MT32::open() {
_synth = new MT32Emu::Synth();
_initialising = true;
const byte dummy_palette[] = {
- 0, 0, 0, 0,
- 0, 0, 171, 0,
- 0, 171, 0, 0,
- 0, 171, 171, 0,
+ 0, 0, 0, 0,
+ 0, 0, 171, 0,
+ 0, 171, 0, 0,
+ 0, 171, 171, 0,
171, 0, 0, 0
};
@@ -470,7 +470,7 @@ void MidiDriver_ThreadedMT32::onTimer() {
MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) {
// HACK: It will stay here until engine plugin loader overhaul
- if (ConfMan.hasKey("extrapath"))
+ if (ConfMan.hasKey("extrapath"))
Common::File::addDefaultDirectory(ConfMan.get("extrapath"));
return new MidiDriver_MT32(mixer);
}
diff --git a/sound/softsynth/mt32/freeverb.cpp b/sound/softsynth/mt32/freeverb.cpp
index 42865c1e71..0a75e7bc70 100644
--- a/sound/softsynth/mt32/freeverb.cpp
+++ b/sound/softsynth/mt32/freeverb.cpp
@@ -26,7 +26,7 @@
// Comb filter implementation
//
-// Written by
+// Written by
// http://www.dreampoint.co.uk
// This code is public domain
@@ -39,7 +39,7 @@ comb::comb() {
}
void comb::setbuffer(float *buf, int size) {
- buffer = buf;
+ buffer = buf;
bufsize = size;
}
@@ -49,7 +49,7 @@ void comb::mute() {
}
void comb::setdamp(float val) {
- damp1 = val;
+ damp1 = val;
damp2 = 1 - val;
}
@@ -72,7 +72,7 @@ allpass::allpass() {
}
void allpass::setbuffer(float *buf, int size) {
- buffer = buf;
+ buffer = buf;
bufsize = size;
}
diff --git a/sound/softsynth/mt32/freeverb.h b/sound/softsynth/mt32/freeverb.h
index 2a5d662a44..b34413f188 100644
--- a/sound/softsynth/mt32/freeverb.h
+++ b/sound/softsynth/mt32/freeverb.h
@@ -101,10 +101,10 @@ private:
inline float allpass::process(float input) {
float output;
float bufout;
-
+
bufout = buffer[bufidx];
undenormalise(bufout);
-
+
output = -input + bufout;
buffer[bufidx] = input + (bufout * feedback);
@@ -196,7 +196,7 @@ private:
float width;
float mode;
- // The following are all declared inline
+ // The following are all declared inline
// to remove the need for dynamic allocation
// with its subsequent error-checking messiness
diff --git a/sound/softsynth/mt32/part.h b/sound/softsynth/mt32/part.h
index 8a5612e32d..54c4999653 100644
--- a/sound/softsynth/mt32/part.h
+++ b/sound/softsynth/mt32/part.h
@@ -42,7 +42,7 @@ private:
PatchCache patchCache[4];
- float bend; // -1.0 .. +1.0
+ float bend; // -1.0 .. +1.0
dpoly polyTable[MT32EMU_MAX_POLY];
diff --git a/sound/softsynth/mt32/synth.cpp b/sound/softsynth/mt32/synth.cpp
index 66832b0e59..62356dcda9 100644
--- a/sound/softsynth/mt32/synth.cpp
+++ b/sound/softsynth/mt32/synth.cpp
@@ -824,31 +824,31 @@ void Synth::readMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u len
switch(region->type) {
case MR_PatchTemp:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.patchSettings[first])[off + m];
break;
case MR_RhythmTemp:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.rhythmSettings[first])[off + m];
break;
case MR_TimbreTemp:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.timbreSettings[first])[off + m];
break;
case MR_Patches:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.patches[first])[off + m];
break;
case MR_Timbres:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.timbres[first])[off + m];
break;
case MR_System:
- for (m = 0; m < len; m++)
+ for (m = 0; m < len; m++)
data[m] = ((Bit8u *)&mt32ram.system)[m + off];
break;
default:
- for (m = 0; m < len; m += 2) {
+ for (m = 0; m < len; m += 2) {
data[m] = 0xff;
if (m + 1 < len) {
data[m+1] = (Bit8u)region->type;
diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp
index e12f306cf9..006f91d0b8 100644
--- a/sound/softsynth/mt32/tables.cpp
+++ b/sound/softsynth/mt32/tables.cpp
@@ -170,7 +170,7 @@ void Tables::initEnvelopes(float samplerate) {
}
envDeltaMaxTime[lf] = (int)cap;
}
-
+
// This (approximately) represents the time durations when the target level is 0.
// Not sure why this is a special case, but it's seen to be from the real thing.
diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp
index e37b50170e..80c0cad8e8 100644
--- a/sound/softsynth/ym2612.cpp
+++ b/sound/softsynth/ym2612.cpp
@@ -106,7 +106,7 @@ protected:
int _frequencyOffs;
int _frequency;
int _algorithm;
-
+
int *_buffer;
int _buflen;
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 0f771cb5e3..7c18a83a8e 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -126,7 +126,7 @@ static ov_callbacks g_File_wrap = {
VorbisTrackInfo::VorbisTrackInfo(File *file) {
-
+
_file = file;
if (openTrack()) {
warning("Invalid file format");
@@ -149,9 +149,9 @@ bool VorbisTrackInfo::openTrack() {
f->len = _file->size();
f->curr_pos = 0;
_file->seek(0);
-
+
bool err = (ov_open_callbacks((void *) f, &_ov_file, NULL, 0, g_File_wrap) < 0);
-
+
if (err) {
delete f;
} else {
@@ -218,7 +218,7 @@ class VorbisInputStream : public AudioStream {
const int16 *_bufferEnd;
const int16 *_pos;
bool _deleteFileAfterUse;
-
+
void refill();
inline bool eosIntern() const;
public:
@@ -229,7 +229,7 @@ public:
bool endOfData() const { return eosIntern(); }
bool isStereo() const { return _numChannels >= 2; }
-
+
int getRate() const { return ov_info(_ov_file, -1)->rate; }
};
@@ -240,7 +240,7 @@ public:
#endif
-VorbisInputStream::VorbisInputStream(OggVorbis_File *file, int duration, bool deleteFileAfterUse)
+VorbisInputStream::VorbisInputStream(OggVorbis_File *file, int duration, bool deleteFileAfterUse)
: _ov_file(file),
_bufferEnd(_buffer + ARRAYSIZE(_buffer)),
_deleteFileAfterUse(deleteFileAfterUse) {
diff --git a/sound/wave.cpp b/sound/wave.cpp
index 42c1bd34db..97dd030ab8 100644
--- a/sound/wave.cpp
+++ b/sound/wave.cpp
@@ -53,7 +53,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
warning("getWavInfo: No 'fmt' header");
return false;
}
-
+
uint32 fmtLength = stream.readUint32LE();
if (fmtLength < 16) {
// A valid fmt chunk always contains at least 16 bytes
@@ -79,7 +79,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
if (wavType != 0)
*wavType = type;
-#if 0
+#if 0
printf("WAVE information:\n");
printf(" total size: %d\n", wavLength);
printf(" fmt size: %d\n", fmtLength);
@@ -118,7 +118,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
warning("getWavInfo: unsupported bitsPerSample %d", bitsPerSample);
return false;
}
-
+
if (numChannels == 2)
flags |= Audio::Mixer::FLAG_STEREO;
else if (numChannels != 1) {
@@ -145,7 +145,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
printf(" found a '%s' tag of size %d\n", buf, offset);
#endif
} while (memcmp(buf, "data", 4) != 0);
-
+
// Stream now points at 'offset' bytes of sample data...
size = offset;
@@ -156,10 +156,10 @@ AudioStream *makeWAVStream(Common::SeekableReadStream &stream) {
int size, rate;
byte flags;
uint16 type;
-
+
if (!loadWAVFromStream(stream, size, rate, flags, &type))
return 0;
-
+
if (type == 17) // IMA ADPCM
return makeADPCMStream(stream, size, kADPCMIma);