diff options
author | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
commit | 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch) | |
tree | c44c4e61f18ddd537f7082cb48869cf33d422fbd /kyra/sound.cpp | |
parent | 86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff) | |
download | scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2 scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip |
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'kyra/sound.cpp')
-rw-r--r-- | kyra/sound.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kyra/sound.cpp b/kyra/sound.cpp index f4454c0297..495b5f458e 100644 --- a/kyra/sound.cpp +++ b/kyra/sound.cpp @@ -28,22 +28,22 @@ namespace Kyra { _driver = driver; _passThrough = false; _isPlaying = _nativeMT32 = false; - + memset(_channel, 0, sizeof(MidiChannel*) * 16); memset(_channelVolume, 255, sizeof(uint8) * 16); _volume = 0; - + int ret = open(); if (ret != MERR_ALREADY_OPEN && ret != 0) { error("couldn't open midi driver"); } } - + MusicPlayer::~MusicPlayer() { _driver->setTimerCallback(NULL, NULL); close(); } - + void MusicPlayer::setVolume(int volume) { if (volume < 0) volume = 0; @@ -61,7 +61,7 @@ namespace Kyra { } } } - + int MusicPlayer::open() { // Don't ever call open without first setting the output driver! if (!_driver) @@ -80,7 +80,7 @@ namespace Kyra { _driver->close(); _driver = 0; } - + void MusicPlayer::send(uint32 b) { if (_passThrough) { _driver->send(b); @@ -120,28 +120,28 @@ namespace Kyra { break; } } - + void MusicPlayer::playMusic(const char* file) { uint32 size; uint8* data = 0; - + data = (_engine->resManager())->fileData(file, &size); - + if (!data) { warning("couldn't load '%s'", file); return; } - + playMusic(data, size); } - + void MusicPlayer::playMusic(uint8* data, uint32 size) { if (_isPlaying) stopMusic(); - + _parser = MidiParser::createParser_XMIDI(); assert(_parser); - + if (!_parser->loadMusic(data, size)) { warning("Error reading track!"); delete _parser; @@ -164,13 +164,13 @@ namespace Kyra { _parser = NULL; } } - + void MusicPlayer::onTimer(void *refCon) { MusicPlayer *music = (MusicPlayer *)refCon; if (music->_isPlaying) music->_parser->onTimer(); } - + void MusicPlayer::playTrack(uint8 track) { if (_parser) { _isPlaying = true; |