aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/adpcm.h2
-rw-r--r--sound/flac.cpp20
-rw-r--r--sound/mididrv.h8
-rw-r--r--sound/mods/infogrames.cpp4
-rw-r--r--sound/mods/paula.cpp10
-rw-r--r--sound/mods/paula.h4
-rw-r--r--sound/mp3.cpp34
-rw-r--r--sound/softsynth/adlib.cpp4
-rw-r--r--sound/softsynth/mt32/module.mk2
-rw-r--r--sound/softsynth/mt32/structures.h8
-rw-r--r--sound/softsynth/ym2612.cpp20
-rw-r--r--sound/vorbis.cpp14
12 files changed, 65 insertions, 65 deletions
diff --git a/sound/adpcm.h b/sound/adpcm.h
index 43296e617c..1957380eb6 100644
--- a/sound/adpcm.h
+++ b/sound/adpcm.h
@@ -35,7 +35,7 @@ namespace Audio {
class AudioStream;
// There are several types of ADPCM encoding, only some are supported here
-// For all the different encodings, refer to:
+// For all the different encodings, refer to:
// http://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs
// Usually, if the audio stream we're trying to play has the FourCC header
// string intact, it's easy to discern which encoding is used
diff --git a/sound/flac.cpp b/sound/flac.cpp
index e9d00650d0..8dc3586142 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -113,7 +113,7 @@ protected:
// a 16 bit value (in fact it seems the maximal block size is 32768, but we play it safe).
BUFFER_SIZE = 65536
};
-
+
struct {
SampleType bufData[BUFFER_SIZE];
SampleType *bufReadPos;
@@ -218,14 +218,14 @@ FlacInputStream::FlacInputStream(Common::SeekableReadStream *inStream, bool disp
#else
success = (::FLAC__stream_decoder_init_stream(
_decoder,
- &FlacInputStream::callWrapRead,
- &FlacInputStream::callWrapSeek,
- &FlacInputStream::callWrapTell,
- &FlacInputStream::callWrapLength,
- &FlacInputStream::callWrapEOF,
- &FlacInputStream::callWrapWrite,
- &FlacInputStream::callWrapMetadata,
- &FlacInputStream::callWrapError,
+ &FlacInputStream::callWrapRead,
+ &FlacInputStream::callWrapSeek,
+ &FlacInputStream::callWrapTell,
+ &FlacInputStream::callWrapLength,
+ &FlacInputStream::callWrapEOF,
+ &FlacInputStream::callWrapWrite,
+ &FlacInputStream::callWrapMetadata,
+ &FlacInputStream::callWrapError,
(void*)this
) == FLAC__STREAM_DECODER_INIT_STATUS_OK);
#endif
@@ -340,7 +340,7 @@ int FlacInputStream::readBuffer(int16 *buffer, const int numSamples) {
assert(_requestedSamples % numChannels == 0);
processSingleBlock();
state = getStreamDecoderState();
-
+
if (state == FLAC__STREAM_DECODER_END_OF_STREAM) {
_lastSampleWritten = true;
}
diff --git a/sound/mididrv.h b/sound/mididrv.h
index 7775387d39..b6faf64077 100644
--- a/sound/mididrv.h
+++ b/sound/mididrv.h
@@ -88,7 +88,7 @@ enum MidiDriverType {
*
* The flags (except for MDT_PREFER_MIDI) indicate whether a given driver
* type is acceptable. E.g. the TOWNS music driver could be returned by
- * detectMusicDriver if and only if MDT_TOWNS is specified.
+ * detectMusicDriver if and only if MDT_TOWNS is specified.
*
* @todo Rename MidiDriverFlags to MusicDriverFlags
*/
@@ -178,7 +178,7 @@ public:
* opcode.
*/
virtual void send(uint32 b) = 0;
-
+
/**
* Output a midi command to the midi stream. Convenience wrapper
* around the usual 'packed' send method.
@@ -209,11 +209,11 @@ public:
/**
* Transmit a sysEx to the midi device.
*
- * The given msg MUST NOT contain the usual SysEx frame, i.e.
+ * The given msg MUST NOT contain the usual SysEx frame, i.e.
* do NOT include the leading 0xF0 and the trailing 0xF7.
*
* Furthermore, the maximal supported length of a SysEx
- * is 254 bytes. Passing longer buffers can lead to
+ * is 254 bytes. Passing longer buffers can lead to
* undefined behavior (most likely, a crash).
*/
virtual void sysEx(const byte *msg, uint16 length) { }
diff --git a/sound/mods/infogrames.cpp b/sound/mods/infogrames.cpp
index 3f607d213e..97987b037a 100644
--- a/sound/mods/infogrames.cpp
+++ b/sound/mods/infogrames.cpp
@@ -106,7 +106,7 @@ const uint16 Infogrames::periods[] =
{0x6ACC, 0x64CC, 0x5F25, 0x59CE, 0x54C3, 0x5003, 0x4B86, 0x4747, 0x4346,
0x3F8B, 0x3BF3, 0x3892, 0x3568, 0x3269, 0x2F93, 0x2CEA, 0x2A66, 0x2801,
0x2566, 0x23A5, 0x21AF, 0x1FC4, 0x1DFE, 0x1C4E, 0x1ABC, 0x1936, 0x17CC,
- 0x1676, 0x1533, 0x1401, 0x12E4, 0x11D5, 0x10D4, 0x0FE3, 0x0EFE, 0x0E26,
+ 0x1676, 0x1533, 0x1401, 0x12E4, 0x11D5, 0x10D4, 0x0FE3, 0x0EFE, 0x0E26,
0x0D5B, 0x0C9B, 0x0BE5, 0x0B3B, 0x0A9B, 0x0A02, 0x0972, 0x08E9, 0x0869,
0x07F1, 0x077F, 0x0713, 0x06AD, 0x064D, 0x05F2, 0x059D, 0x054D, 0x0500,
0x04B8, 0x0475, 0x0435, 0x03F8, 0x03BF, 0x038A, 0x0356, 0x0326, 0x02F9,
@@ -405,7 +405,7 @@ int16 Infogrames::tune(Slide &slide, int16 start) const {
}
}
slide.dataOffset = off;
- }
+ }
slide.flags |= 1;
return start;
}
diff --git a/sound/mods/paula.cpp b/sound/mods/paula.cpp
index cfd9ebff11..545390ff93 100644
--- a/sound/mods/paula.cpp
+++ b/sound/mods/paula.cpp
@@ -92,21 +92,21 @@ template<bool stereo>
int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
int samples = _stereo ? numSamples / 2 : numSamples;
while (samples > 0) {
-
+
// Handle 'interrupts'. This gives subclasses the chance to adjust the channel data
// (e.g. insert new samples, do pitch bending, whatever).
if (_curInt == _intFreq) {
interrupt();
_curInt = 0;
}
-
+
// Compute how many samples to generate: at most the requested number of samples,
// of course, but we may stop earlier when an 'interrupt' is expected.
const int nSamples = MIN(samples, _intFreq - _curInt);
-
+
// Loop over the four channels of the emulated Paula chip
for (int voice = 0; voice < NUM_VOICES; voice++) {
-
+
// No data, or paused -> skip channel
if (!_voice[voice].data || (_voice[voice].period <= 0))
continue;
@@ -148,7 +148,7 @@ int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
sLen = intToFrac(_voice[voice].length);
// If the "rate" exceeds the sample rate, we would have to perform constant
- // wrap arounds. So, apply the first step of the euclidean algorithm to
+ // wrap arounds. So, apply the first step of the euclidean algorithm to
// achieve the same more efficiently: Take rate modulo sLen
if (sLen < rate)
rate %= sLen;
diff --git a/sound/mods/paula.h b/sound/mods/paula.h
index e86c05b7f8..e3c6002451 100644
--- a/sound/mods/paula.h
+++ b/sound/mods/paula.h
@@ -79,12 +79,12 @@ protected:
_playing = true;
_end = false;
}
-
+
void stopPaula() {
_playing = false;
_end = true;
}
-
+
void setChannelPanning(byte channel, byte panning) {
assert(channel < NUM_VOICES);
_voice[channel].panning = panning;
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 16ea2d2834..72ed361926 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -54,15 +54,15 @@ protected:
Common::SeekableReadStream *_inStream;
bool _disposeAfterUse;
-
+
uint _numLoops;
uint _posInFrame;
State _state;
-
+
const mad_timer_t _startTime;
const mad_timer_t _endTime;
mad_timer_t _totalTime;
-
+
mad_stream _stream;
mad_frame _frame;
mad_synth _synth;
@@ -70,7 +70,7 @@ protected:
enum {
BUFFER_SIZE = 5 * 8192
};
-
+
// This buffer contains a slab of input data
byte _buf[BUFFER_SIZE + MAD_BUFFER_GUARD];
@@ -81,7 +81,7 @@ public:
mad_timer_t end = mad_timer_zero,
uint numLoops = 1);
~MP3InputStream();
-
+
int readBuffer(int16 *buffer, const int numSamples);
bool endOfData() const { return _state == MP3_STATE_EOS; }
@@ -136,19 +136,19 @@ void MP3InputStream::decodeMP3Data() {
mad_stream_init(&_stream);
mad_frame_init(&_frame);
mad_synth_init(&_synth);
-
+
// Reset the stream data
_inStream->seek(0, SEEK_SET);
_totalTime = mad_timer_zero;
_posInFrame = 0;
-
+
// Update state
_state = MP3_STATE_READY;
-
+
// Read the first few sample bytes
readMP3Data();
}
-
+
if (_state == MP3_STATE_EOS)
return;
@@ -173,10 +173,10 @@ void MP3InputStream::decodeMP3Data() {
break;
}
}
-
+
// Sum up the total playback time so far
mad_timer_add(&_totalTime, _frame.header.duration);
-
+
// If we have not yet reached the start point, skip to the next frame
if (mad_timer_compare(_totalTime, _startTime) < 0)
continue;
@@ -186,7 +186,7 @@ void MP3InputStream::decodeMP3Data() {
_state = MP3_STATE_EOS;
break;
}
-
+
// Decode the next frame
if (mad_frame_decode(&_frame, &_stream) == -1) {
if (_stream.error == MAD_ERROR_BUFLEN) {
@@ -202,13 +202,13 @@ void MP3InputStream::decodeMP3Data() {
break;
}
}
-
+
// Synthesize PCM data
mad_synth_frame(&_synth, &_frame);
_posInFrame = 0;
break;
}
-
+
if (_state == MP3_STATE_EOS && _numLoops != 1) {
// If looping is on and there are loops left, rewind to the start
if (_numLoops != 0)
@@ -218,13 +218,13 @@ void MP3InputStream::decodeMP3Data() {
mad_synth_finish(&_synth);
mad_frame_finish(&_frame);
mad_stream_finish(&_stream);
-
+
// Reset the decoder state to indicate we should start over
_state = MP3_STATE_INIT;
}
} while (_state != MP3_STATE_EOS && _stream.error == MAD_ERROR_BUFLEN);
-
+
if (_stream.error != MAD_ERROR_NONE)
_state = MP3_STATE_EOS;
}
@@ -253,7 +253,7 @@ void MP3InputStream::readMP3Data() {
_state = MP3_STATE_EOS;
return;
}
-
+
// Feed the data we just read into the stream decoder
_stream.error = MAD_ERROR_NONE;
mad_stream_buffer(&_stream, _buf, size + remaining);
diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp
index 6b0dbca5bb..90f411b1df 100644
--- a/sound/softsynth/adlib.cpp
+++ b/sound/softsynth/adlib.cpp
@@ -675,8 +675,8 @@ void AdlibPart::pitchBend(int16 bend) {
void AdlibPart::controlChange(byte control, byte value) {
switch (control) {
- case 0:
- case 32:
+ case 0:
+ case 32:
break; // Bank select. Not supported
case 1: modulationWheel(value); break;
case 7: volume(value); break;
diff --git a/sound/softsynth/mt32/module.mk b/sound/softsynth/mt32/module.mk
index ac208a563f..4d5d899ac3 100644
--- a/sound/softsynth/mt32/module.mk
+++ b/sound/softsynth/mt32/module.mk
@@ -10,5 +10,5 @@ MODULE_OBJS := \
tables.o \
freeverb.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/sound/softsynth/mt32/structures.h b/sound/softsynth/mt32/structures.h
index 7c6e5f131d..ef58c1d20f 100644
--- a/sound/softsynth/mt32/structures.h
+++ b/sound/softsynth/mt32/structures.h
@@ -143,7 +143,7 @@ struct MemParams {
Bit8u panpot; // PANPOT 0-14 (R-L)
Bit8u dummyv[6];
} MT32EMU_ALIGN_PACKED;
-
+
PatchTemp patchSettings[9];
struct RhythmTemp {
@@ -152,7 +152,7 @@ struct MemParams {
Bit8u panpot; // PANPOT 0-14 (R-L)
Bit8u reverbSwitch; // REVERB SWITCH 0-1 (OFF,ON)
} MT32EMU_ALIGN_PACKED;
-
+
RhythmTemp rhythmSettings[85];
TimbreParam timbreSettings[8];
@@ -164,7 +164,7 @@ struct MemParams {
TimbreParam timbre;
Bit8u padding[10];
} MT32EMU_ALIGN_PACKED;
-
+
PaddedTimbre timbres[64 + 64 + 64 + 64]; // Group A, Group B, Memory, Rhythm
struct SystemArea {
@@ -176,7 +176,7 @@ struct MemParams {
Bit8u chanAssign[9]; // MIDI CHANNEL (PART1) 0-16 (1-16,OFF)
Bit8u masterVol; // MASTER VOLUME 0-100
} MT32EMU_ALIGN_PACKED;
-
+
SystemArea system;
};
diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp
index e3aa9d2528..57ad0f1c62 100644
--- a/sound/softsynth/ym2612.cpp
+++ b/sound/softsynth/ym2612.cpp
@@ -96,8 +96,8 @@ void Operator2612::setInstrument(byte const *instrument) {
void Operator2612::keyOn() {
_state = _s_attacking;
_tickCount = 0;
- _phase = 0;
- _currentLevel = ((int32)0x7f << 15);
+ _phase = 0;
+ _currentLevel = ((int32)0x7f << 15);
}
void Operator2612::keyOff() {
@@ -124,7 +124,7 @@ void Operator2612::frequency(int freq) {
else {
value = powtbl[(r&3) << 7];
value *= 1 << (r >> 2);
- value *= 41;
+ value *= 41;
value /= 1 << (15 + 5);
value *= 127 - _specifiedTotalLevel;
value /= 127;
@@ -228,11 +228,11 @@ void Operator2612::nextTick(const int *phasebuf, int *outbuf, int buflen) {
}
if (level < zero_level) {
- int phaseShift = *phasebuf >> 2;
+ int phaseShift = *phasebuf >> 2;
if (_feedbackLevel)
phaseShift += (output << (_feedbackLevel - 1)) / 1024;
output = sintbl[((_phase >> 7) + phaseShift) & 0x7ff];
- output >>= (level >> 18);
+ output >>= (level >> 18);
// Here is the original code, which requires 64-bit ints
// output *= powtbl[511 - ((level>>25)&511)];
// output >>= 16;
@@ -437,9 +437,9 @@ void Voice2612::pitchBend(int value) {
}
void Voice2612::recalculateFrequency() {
- //
- //
- //
+ //
+ //
+ //
int32 basefreq = frequencyTable[_note];
int cfreq = frequencyTable[_note - (_note % 12)];
int oct = _note / 12;
@@ -696,7 +696,7 @@ void MidiDriver_YM2612::createLookupTables() {
};
// (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0))
- //
+ //
frequencyTable = new int [120];
for (block = -1; block < 9; block++) {
for (i = 0; i < 12; i++) {
@@ -706,7 +706,7 @@ void MidiDriver_YM2612::createLookupTables() {
}
keycodeTable = new int [120];
- // detune
+ // detune
for (block = -1; block < 9; block++) {
for (i = 0; i < 12; i++) {
// see p.204
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 668cdf4fc7..a4b0f854e9 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -53,7 +53,7 @@ static size_t read_stream_wrap(void *ptr, size_t size, size_t nmemb, void *datas
Common::SeekableReadStream *stream = (Common::SeekableReadStream *)datasource;
uint32 result = stream->read(ptr, size * nmemb);
-
+
return result / size;
}
@@ -92,7 +92,7 @@ protected:
bool _isStereo;
int _rate;
uint _numLoops;
-
+
#ifdef USE_TREMOR
ogg_int64_t _startTime;
ogg_int64_t _endTime;
@@ -106,7 +106,7 @@ protected:
int16 _buffer[4096];
const int16 *_bufferEnd;
const int16 *_pos;
-
+
public:
// startTime / duration are in milliseconds
VorbisInputStream(Common::SeekableReadStream *inStream, bool dispose, uint startTime = 0, uint endTime = 0, uint numLoops = 1);
@@ -148,7 +148,7 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool
_startTime = startTime / 1000.0;
_endTime = endTime / 1000.0;
#endif
-
+
// If endTime was 0, or is past the end of the file, set it to the maximal time possible
totalTime = ov_time_total(&_ovFile, -1);
if (_endTime == 0 || _endTime > totalTime)
@@ -159,13 +159,13 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool
_pos = _bufferEnd;
return;
}
-
+
// Seek to the start position
ov_time_seek(&_ovFile, _startTime);
// Read in initial data
refill();
-
+
// Setup some header information
_isStereo = ov_info(&_ovFile, -1)->channels >= 2;
_rate = ov_info(&_ovFile, -1)->rate;
@@ -221,7 +221,7 @@ void VorbisInputStream::refill() {
long result;
#ifdef USE_TREMOR
// Tremor ov_read() always returns data as signed 16 bit interleaved PCM
- // in host byte order. As such, it does not take arguments to request
+ // in host byte order. As such, it does not take arguments to request
// specific signedness, byte order or bit depth as in Vorbisfile.
result = ov_read(&_ovFile, read_pos, len_left,
NULL);