aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-25 01:39:44 +0000
committerJohannes Schickel2010-01-25 01:39:44 +0000
commitaed02365ec81e77b3c8aa4f4ecd9a9d3893326f2 (patch)
tree95f119e687a666f65aad5041910c43bdfd4f2929 /engines/sci/sound
parentec14cd6e6add76ce4f719edd7ce508d67ebd9f14 (diff)
downloadscummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.gz
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.bz2
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.zip
Strip trailing spaces/tabs.
svn-id: r47541
Diffstat (limited to 'engines/sci/sound')
-rw-r--r--engines/sci/sound/audio.cpp10
-rw-r--r--engines/sci/sound/audio.h2
-rw-r--r--engines/sci/sound/iterator/core.cpp8
-rw-r--r--engines/sci/sound/music.cpp6
-rw-r--r--engines/sci/sound/music.h2
-rw-r--r--engines/sci/sound/soundcmd.cpp10
6 files changed, 19 insertions, 19 deletions
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index e350e3dba2..306cb0df46 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -296,7 +296,7 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
if (getSciVersion() == SCI_VERSION_1_1) {
// King's Quest VI CD Audio format
_audioCdStart = g_system->getMillis();
-
+
// Subtract one from track. KQ6 starts at track 1, while ScummVM
// ignores the data track and considers track 2 to be track 1.
AudioCD.play(track - 1, 1, start, duration);
@@ -306,11 +306,11 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
uint32 length = 0;
audioCdStop();
-
+
Common::File audioMap;
if(!audioMap.open("cdaudio.map"))
error("Could not open cdaudio.map");
-
+
while (audioMap.pos() < audioMap.size()) {
uint16 res = audioMap.readUint16LE();
uint32 startFrame = audioMap.readUint16LE();
@@ -327,7 +327,7 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
break;
}
}
-
+
audioMap.close();
return length * 60 / 75; // return sample length in ticks
@@ -347,7 +347,7 @@ int AudioPlayer::audioCdPosition() {
// Return -1 if the sample is done playing. Converting to frames to compare.
if (((g_system->getMillis() - _audioCdStart) * 75 / 1000) >= (uint32)AudioCD.getStatus().duration)
return -1;
-
+
// Return the position otherwise (in ticks).
return (g_system->getMillis() - _audioCdStart) * 60 / 1000;
}
diff --git a/engines/sci/sound/audio.h b/engines/sci/sound/audio.h
index bfd268e30f..bab7dbb969 100644
--- a/engines/sci/sound/audio.h
+++ b/engines/sci/sound/audio.h
@@ -62,7 +62,7 @@ class AudioPlayer {
public:
AudioPlayer(ResourceManager *resMan);
~AudioPlayer();
-
+
void setAudioRate(uint16 rate) { _audioRate = rate; }
Audio::SoundHandle *getAudioHandle() { return &_audioHandle; }
Audio::RewindableAudioStream *getAudioStream(uint32 number, uint32 volume, int *sampleLen);
diff --git a/engines/sci/sound/iterator/core.cpp b/engines/sci/sound/iterator/core.cpp
index c2c110a121..95fc713ba1 100644
--- a/engines/sci/sound/iterator/core.cpp
+++ b/engines/sci/sound/iterator/core.cpp
@@ -529,7 +529,7 @@ void SfxState::updateSingleSong() {
}
debugC(2, kDebugLevelSound, "%s", debugMessage.c_str());
-
+
_song = newsong;
thawTime(); /* Recover song delay time */
@@ -556,7 +556,7 @@ void SfxState::updateMultiSong() {
// WORKAROUND: sometimes, newsong can be NULL (e.g. in SQ4).
// Handle this here, so that we avoid a crash
- if (!newsong) {
+ if (!newsong) {
// Iterators should get freed when there's only one song left playing
if(oldfirst && oldfirst->_status == SOUND_STATUS_STOPPED) {
debugC(2, kDebugLevelSound, "[SFX] Stopping song %lx\n", oldfirst->_handle);
@@ -579,7 +579,7 @@ void SfxState::updateMultiSong() {
oldseeker->_nextStopping = oldseeker->_nextPlaying;
oldseeker->_nextPlaying = &not_playing_anymore;
- if (oldseeker == oldseeker->_nextPlaying) {
+ if (oldseeker == oldseeker->_nextPlaying) {
error("updateMultiSong() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
@@ -588,7 +588,7 @@ void SfxState::updateMultiSong() {
for (newseeker = newsong; newseeker; newseeker = newseeker->_nextPlaying) {
newseeker->_nextPlaying = _songlib.findNextActive(newseeker);
- if (newseeker == newseeker->_nextPlaying) {
+ if (newseeker == newseeker->_nextPlaying) {
error("updateMultiSong() failed. Breakpoint in %s, line %d", __FILE__, __LINE__);
}
}
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 6af0597027..3e806f06b1 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -229,7 +229,7 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
_playList.push_back(pSnd);
sortPlayList();
}
-
+
_mutex.unlock(); // unlock to perform mixer-related calls
if (pSnd->pStreamAud && !_pMixer->isSoundHandleActive(pSnd->hCurrentAud)) {
@@ -371,7 +371,7 @@ void SciMusic::printPlayList(Console *con) {
for (uint32 i = 0; i < _playList.size(); i++) {
MusicEntry *song = _playList[i];
- con->DebugPrintf("%d: %04x:%04x, resource id: %d, status: %s, %s type\n", i,
+ con->DebugPrintf("%d: %04x:%04x, resource id: %d, status: %s, %s type\n", i,
PRINT_REG(song->soundObj), song->resnum,
musicStatus[song->status], song->pMidiParser ? "MIDI" : "digital audio");
}
@@ -405,7 +405,7 @@ void SciMusic::printSongInfo(reg_t obj, Console *con) {
con->DebugPrintf("Sound resource information:\n");
SoundResource::Track *track = song->soundRes->getTrackByType(_pMidiDrv->getPlayId(_soundVersion));
if (track && track->digitalChannelNr != -1) {
- con->DebugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
+ con->DebugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
track->digitalSampleSize, track->digitalSampleRate, track->channelCount, track->digitalChannelNr);
}
}
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index 39b6ad0d74..79eb72fc81 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -126,7 +126,7 @@ public:
typedef Common::Array<MusicEntry *> MusicList;
-class SciMusic
+class SciMusic
#ifndef USE_OLD_MUSIC_FUNCTIONS
: public Common::Serializable
#endif
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index dcf4b33553..74b44953fb 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -126,7 +126,7 @@ void process_sound_events(EngineState *s) { /* Get all sound events, apply their
}
#endif
-SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, AudioPlayer *audio, SciVersion soundVersion) :
+SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, AudioPlayer *audio, SciVersion soundVersion) :
_resMan(resMan), _segMan(segMan), _kernel(kernel), _audio(audio), _soundVersion(soundVersion) {
#ifdef USE_OLD_MUSIC_FUNCTIONS
@@ -223,7 +223,7 @@ reg_t SoundCommandParser::parseCommand(int argc, reg_t *argv, reg_t acc) {
if (argc == 6) { // cmdSendMidi
byte channel = argv[2].toUint16() & 0xf;
byte midiCmd = argv[3].toUint16() & 0xff;
-
+
uint16 controller = argv[4].toUint16();
uint16 param = argv[5].toUint16();
@@ -531,7 +531,7 @@ void SoundCommandParser::cmdPauseSound(reg_t obj, int16 value) {
#else
if (!obj.segment) { // pause the whole playlist
- // Pausing/Resuming the whole playlist was introduced
+ // Pausing/Resuming the whole playlist was introduced
// in the SCI1 late sound scheme
if (_soundVersion <= SCI_VERSION_1_EARLY)
return;
@@ -659,7 +659,7 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
break;
case 5: // SCI01+
- case 6: // SCI1+ (SCI1 late sound scheme), with fade and continue
+ case 6: // SCI1+ (SCI1 late sound scheme), with fade and continue
musicSlot->fadeTo = CLIP<uint16>(_argv[2].toUint16(), 0, MUSIC_VOLUME_MAX);
musicSlot->fadeStep = volume > _argv[2].toUint16() ? -_argv[4].toUint16() : _argv[4].toUint16();
musicSlot->fadeTickerStep = _argv[3].toUint16() * 16667 / _music->soundGetTempo();
@@ -917,7 +917,7 @@ void SoundCommandParser::cmdSetSoundVolume(reg_t obj, int16 value) {
#ifndef USE_OLD_MUSIC_FUNCTIONS
MusicEntry *musicSlot = _music->getSlot(obj);
if (!musicSlot) {
- // Do not throw a warning if the sound can't be found, as in some games
+ // Do not throw a warning if the sound can't be found, as in some games
// this is called before the actual sound is loaded (e.g. SQ4CD, with the
// drum sounds of the energizer bunny at the beginning), so this is normal
// behavior