diff options
author | Max Horn | 2003-09-05 21:06:32 +0000 |
---|---|---|
committer | Max Horn | 2003-09-05 21:06:32 +0000 |
commit | 06b6ff9a44b847423ee611d92dbf8c5fbe583499 (patch) | |
tree | 63e3fcf63e2edac6f1a5b1694c00ce92733a2a8e | |
parent | 11193b0746b0ac2962c98255663dd1beef3fc2a1 (diff) | |
download | scummvm-rg350-06b6ff9a44b847423ee611d92dbf8c5fbe583499.tar.gz scummvm-rg350-06b6ff9a44b847423ee611d92dbf8c5fbe583499.tar.bz2 scummvm-rg350-06b6ff9a44b847423ee611d92dbf8c5fbe583499.zip |
added default volume/pan values
svn-id: r10019
-rw-r--r-- | scumm/sound.cpp | 18 | ||||
-rw-r--r-- | simon/sound.cpp | 8 | ||||
-rw-r--r-- | sound/mixer.h | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 2a26d3acfa..bffaa9ac2a 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -448,7 +448,7 @@ void Sound::playSound(int soundID) { // the second check is for simple looped sounds _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LOOP, vol, 0, soundID, - READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8),READ_BE_UINT16(ptr + 14)); + READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8), READ_BE_UINT16(ptr + 14)); } else { _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE, vol, 0, soundID); } @@ -478,7 +478,7 @@ void Sound::playSound(int soundID) { if (start == 108 || start == 106) _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LOOP, vol, 0, soundID, - start,size); + start, size); else _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE, vol, 0, soundID); return; @@ -579,7 +579,7 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle _sfxFile->seek(offset + 48, SEEK_SET); sound = (byte *)malloc(b - 64); _sfxFile->read(sound, b - 64); - _scumm->_mixer->playRaw(handle, sound, b - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, 255, 0); + _scumm->_mixer->playRaw(handle, sound, b - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); return; } @@ -917,7 +917,7 @@ void Sound::startSfxSound(File *file, int file_size, PlayingSoundHandle *handle) playSfxSound_Vorbis(data, file_size, handle); } else { #ifdef USE_MAD - _scumm->_mixer->playMP3(handle, file, file_size, 255, 0); + _scumm->_mixer->playMP3(handle, file, file_size); #endif } return; @@ -1265,7 +1265,7 @@ void Sound::bundleMusicHandler(Scumm *scumm) { _bundleMusicPosition += final_size; if (_bundleMusicTrack == 0) { _scumm->_mixer->newStream(&_bundleMusicTrack, buffer, final_size, rate, - SoundMixer::FLAG_16BITS | SoundMixer::FLAG_STEREO, 300000, 255, 0); + SoundMixer::FLAG_16BITS | SoundMixer::FLAG_STEREO, 300000); } else { _scumm->_mixer->appendStream(_bundleMusicTrack, buffer, final_size); } @@ -1394,7 +1394,7 @@ void Sound::playSfxSound(void *sound, uint32 size, uint rate, bool isUnsigned, P byte flags = SoundMixer::FLAG_AUTOFREE; if (isUnsigned) flags |= SoundMixer::FLAG_UNSIGNED; - _scumm->_mixer->playRaw(handle, sound, size, rate, flags, 255, 0); + _scumm->_mixer->playRaw(handle, sound, size, rate, flags); } #ifdef USE_VORBIS @@ -1473,7 +1473,7 @@ void Sound::playSfxSound_Vorbis(void *sound, uint32 size, PlayingSoundHandle *ha delete f; free(sound); } else - _scumm->_mixer->playVorbis(handle, ov_file, 0, false, 255, 0); + _scumm->_mixer->playVorbis(handle, ov_file, 0, false); #endif } @@ -1750,7 +1750,7 @@ int MP3TrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int startF } // Play it - return mixer->playMP3CDTrack(handle, _file, durationTime, 255, 0); + return mixer->playMP3CDTrack(handle, _file, durationTime); } MP3TrackInfo::~MP3TrackInfo() { @@ -1854,7 +1854,7 @@ int VorbisTrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int sta #endif return mixer->playVorbis(handle, &_ov_file, duration * ov_info(&_ov_file, -1)->rate / 75, - true, 255, 0); + true); } VorbisTrackInfo::~VorbisTrackInfo() { diff --git a/simon/sound.cpp b/simon/sound.cpp index 4651157458..2aca4b955c 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -174,7 +174,7 @@ int WavSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { byte *buffer = (byte *)malloc(data[1]); _file->read(buffer, data[1]); - return _mixer->playRaw(handle, buffer, data[1], FROM_LE_32(wave_hdr.samples_per_sec), flags, 255, 0); + return _mixer->playRaw(handle, buffer, data[1], FROM_LE_32(wave_hdr.samples_per_sec), flags); } int VocSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { @@ -212,7 +212,7 @@ int VocSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { byte *buffer = (byte *)malloc(size); _file->read(buffer, size); - return _mixer->playRaw(handle, buffer, size, samples_per_sec, flags, 255, 0); + return _mixer->playRaw(handle, buffer, size, samples_per_sec, flags); } int RawSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { @@ -226,7 +226,7 @@ int RawSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) { byte *buffer = (byte *)malloc(size); _file->read(buffer, size); - return _mixer->playRaw(handle, buffer, size, 22050, flags, 255, 0); + return _mixer->playRaw(handle, buffer, size, 22050, flags); } #ifdef USE_MAD @@ -245,7 +245,7 @@ int MP3Sound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) uint32 size = _offsets[sound+1] - _offsets[sound]; - return _mixer->playMP3(handle, _file, size, 255, 0); + return _mixer->playMP3(handle, _file, size); } #endif diff --git a/sound/mixer.h b/sound/mixer.h index 1f5b5b78f5..415c73b9b1 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -90,17 +90,17 @@ public: // start playing a raw sound int playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, - byte volume, int8 pan, int id = -1, uint32 loopStart = 0, uint32 loopEnd = 0); + byte volume = 255, int8 pan = 0, int id = -1, uint32 loopStart = 0, uint32 loopEnd = 0); #ifdef USE_MAD - int playMP3(PlayingSoundHandle *handle, File *file, uint32 size, byte volume, int8 pan); - int playMP3CDTrack(PlayingSoundHandle *handle, File *file, mad_timer_t duration, byte volume, int8 pan); + int playMP3(PlayingSoundHandle *handle, File *file, uint32 size, byte volume = 255, int8 pan = 0); + int playMP3CDTrack(PlayingSoundHandle *handle, File *file, mad_timer_t duration, byte volume = 255, int8 pan = 0); #endif #ifdef USE_VORBIS - int playVorbis(PlayingSoundHandle *handle, OggVorbis_File *ov_file, int duration, bool is_cd_track, byte volume, int8 pan); + int playVorbis(PlayingSoundHandle *handle, OggVorbis_File *ov_file, int duration, bool is_cd_track, byte volume = 255, int8 pan = 0); #endif /** Start a new stream. */ - int newStream(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan); + int newStream(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, uint32 buffer_size, byte volume = 255, int8 pan = 0); /** Append to an existing stream. */ void appendStream(PlayingSoundHandle handle, void *sound, uint32 size); |