[Scummvm-cvs-logs] SF.net SVN: scummvm:[47182] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jan 8 23:09:43 CET 2010
Revision: 47182
http://scummvm.svn.sourceforge.net/scummvm/?rev=47182&view=rev
Author: fingolfin
Date: 2010-01-08 22:09:43 +0000 (Fri, 08 Jan 2010)
Log Message:
-----------
Switch Mixer::playInputStream to use DisposeAfterUse::Flag
Modified Paths:
--------------
scummvm/trunk/engines/agi/preagi.cpp
scummvm/trunk/engines/agi/sound.cpp
scummvm/trunk/engines/cine/sound.cpp
scummvm/trunk/engines/cruise/sound.cpp
scummvm/trunk/engines/gob/global.h
scummvm/trunk/engines/gob/sound/adlib.cpp
scummvm/trunk/engines/gob/sound/infogrames.cpp
scummvm/trunk/engines/gob/sound/pcspeaker.cpp
scummvm/trunk/engines/gob/sound/protracker.cpp
scummvm/trunk/engines/gob/sound/soundmixer.cpp
scummvm/trunk/engines/kyra/sound_adlib.cpp
scummvm/trunk/engines/kyra/sound_amiga.cpp
scummvm/trunk/engines/kyra/sound_pcspk.cpp
scummvm/trunk/engines/kyra/sound_towns.cpp
scummvm/trunk/engines/parallaction/sound_br.cpp
scummvm/trunk/engines/parallaction/sound_ns.cpp
scummvm/trunk/engines/queen/midiadlib.cpp
scummvm/trunk/engines/saga/sound.cpp
scummvm/trunk/engines/sci/sound/music.cpp
scummvm/trunk/engines/sci/sound/softseq/adlib.cpp
scummvm/trunk/engines/sci/sound/softseq/amiga.cpp
scummvm/trunk/engines/scumm/player_mod.cpp
scummvm/trunk/engines/scumm/player_nes.cpp
scummvm/trunk/engines/scumm/player_pce.cpp
scummvm/trunk/engines/scumm/player_sid.cpp
scummvm/trunk/engines/scumm/player_v2.cpp
scummvm/trunk/engines/scumm/player_v2cms.cpp
scummvm/trunk/engines/scumm/player_v4a.cpp
scummvm/trunk/engines/sky/music/adlibmusic.cpp
scummvm/trunk/engines/sword1/music.cpp
scummvm/trunk/engines/sword1/sound.cpp
scummvm/trunk/engines/sword2/sound.cpp
scummvm/trunk/engines/teenagent/teenagent.cpp
scummvm/trunk/engines/tinsel/bmv.cpp
scummvm/trunk/engines/tinsel/music.cpp
scummvm/trunk/sound/mixer.cpp
scummvm/trunk/sound/mixer.h
scummvm/trunk/sound/mixer_intern.h
scummvm/trunk/sound/softsynth/adlib.cpp
scummvm/trunk/sound/softsynth/mt32.cpp
scummvm/trunk/sound/softsynth/ym2612.cpp
Modified: scummvm/trunk/engines/agi/preagi.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/agi/preagi.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -118,7 +118,7 @@
_speakerStream = new Audio::PCSpeaker(_mixer->getOutputRate());
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speakerHandle,
- _speakerStream, -1, 255, 0, false, true);
+ _speakerStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
//_timer->installTimerProc(agiTimerFunctionLow, 10 * 1000, NULL);
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/agi/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -485,7 +485,7 @@
report("disabled\n");
}
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return r;
}
Modified: scummvm/trunk/engines/cine/sound.cpp
===================================================================
--- scummvm/trunk/engines/cine/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/cine/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -244,7 +244,7 @@
memset(_channelsVolumeTable, 0, sizeof(_channelsVolumeTable));
memset(_instrumentsTable, 0, sizeof(_instrumentsTable));
initCard();
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
AdlibSoundDriver::~AdlibSoundDriver() {
Modified: scummvm/trunk/engines/cruise/sound.cpp
===================================================================
--- scummvm/trunk/engines/cruise/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/cruise/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -298,7 +298,7 @@
}
memset(_instrumentsTable, 0, sizeof(_instrumentsTable));
initCard();
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
_musicVolume = ConfMan.getBool("music_mute") ? 0 : MIN(255, ConfMan.getInt("music_volume"));
_sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
Modified: scummvm/trunk/engines/gob/global.h
===================================================================
--- scummvm/trunk/engines/gob/global.h 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/global.h 2010-01-08 22:09:43 UTC (rev 47182)
@@ -45,8 +45,8 @@
#define INTERSOUND_FLAG 0x0002
#define SPEAKER_FLAG 0x0001
-#define NO 0
-#define YES 1
+//#define NO 0
+//#define YES 1
#define UNDEF 2
#define F1_KEY 0x3B00
Modified: scummvm/trunk/engines/gob/sound/adlib.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/adlib.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/sound/adlib.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -75,7 +75,7 @@
setFreqs();
_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle,
- this, -1, 255, 0, false, true);
+ this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
int AdLib::readBuffer(int16 *buffer, const int numSamples) {
Modified: scummvm/trunk/engines/gob/sound/infogrames.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/infogrames.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/sound/infogrames.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -67,7 +67,7 @@
if (_song && !_mixer->isSoundHandleActive(_handle)) {
_song->restart();
_mixer->playInputStream(Audio::Mixer::kMusicSoundType,
- &_handle, _song, -1, 255, 0, false);
+ &_handle, _song, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
}
}
Modified: scummvm/trunk/engines/gob/sound/pcspeaker.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/pcspeaker.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/sound/pcspeaker.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -31,7 +31,7 @@
_stream = new Audio::PCSpeaker(_mixer->getOutputRate());
_mixer->playInputStream(Audio::Mixer::kSFXSoundType,
- &_handle, _stream, -1, 50, 0, false, true);
+ &_handle, _stream, -1, 50, 0, DisposeAfterUse::NO, true);
}
PCSpeaker::~PCSpeaker() {
Modified: scummvm/trunk/engines/gob/sound/protracker.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/protracker.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/sound/protracker.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -53,7 +53,7 @@
return false;
_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle,
- _protrackerStream, -1, 255, 0, false);
+ _protrackerStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
return true;
}
Modified: scummvm/trunk/engines/gob/sound/soundmixer.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/soundmixer.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/gob/sound/soundmixer.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -51,7 +51,7 @@
_fadeSamples = 0;
_curFadeSamples = 0;
- _mixer->playInputStream(type, &_handle, this, -1, 255, 0, false, true);
+ _mixer->playInputStream(type, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
SoundMixer::~SoundMixer() {
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -451,7 +451,7 @@
// is used by SFX or music, and then adjust the volume accordingly. Since Kyrandia 2 supports
// different volumes for SFX and music, looking at the disasm and checking how the original does it
// would be a good idea.
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
_samplesPerCallback = getRate() / CALLBACKS_PER_SECOND;
_samplesPerCallbackRemainder = getRate() % CALLBACKS_PER_SECOND;
Modified: scummvm/trunk/engines/kyra/sound_amiga.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_amiga.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/kyra/sound_amiga.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -154,7 +154,7 @@
_driver->setVolume(volume);
_driver->setTempo(tempo << 4);
if (!_mixer->isSoundHandleActive(_musicHandle))
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
}
} else if (track == 0)
_driver->stopMusic();
@@ -215,7 +215,7 @@
if (_sfxEnabled && sfx) {
const bool success = _driver->playNote(sfx->note, sfx->patch, sfx->duration, sfx->volume, pan);
if (success && !_mixer->isSoundHandleActive(_musicHandle))
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
}
}
Modified: scummvm/trunk/engines/kyra/sound_pcspk.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_pcspk.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/kyra/sound_pcspk.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -41,7 +41,7 @@
_speaker = new Audio::PCSpeaker(_rate);
assert(_speaker);
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
_countdown = 0xFFFF;
_hardwareChannel[0] = 0xFF;
Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -624,7 +624,7 @@
MidiDriver_Emulated::open();
_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle,
- this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return 0;
}
@@ -2977,7 +2977,7 @@
}
_mixer->playInputStream(Audio::Mixer::kMusicSoundType,
- &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
_ready = true;
Modified: scummvm/trunk/engines/parallaction/sound_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound_br.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/parallaction/sound_br.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -536,7 +536,7 @@
debugC(3, kDebugAudio, "AmigaSoundMan_ns::playMusic(): created new music stream");
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, 255, 0, false, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false);
}
void AmigaSoundMan_br::stopMusic() {
Modified: scummvm/trunk/engines/parallaction/sound_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound_ns.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/parallaction/sound_ns.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -430,7 +430,7 @@
debugC(3, kDebugAudio, "AmigaSoundMan_ns::playMusic(): created new music stream");
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, 255, 0, false, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false);
}
void AmigaSoundMan_ns::stopMusic() {
Modified: scummvm/trunk/engines/queen/midiadlib.cpp
===================================================================
--- scummvm/trunk/engines/queen/midiadlib.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/queen/midiadlib.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -132,7 +132,7 @@
adlibSetNoteVolume(i, 0);
adlibTurnNoteOff(i);
}
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return 0;
}
Modified: scummvm/trunk/engines/saga/sound.cpp
===================================================================
--- scummvm/trunk/engines/saga/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/saga/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -103,7 +103,7 @@
}
if (stream != NULL)
- _mixer->playInputStream(soundType, handle, stream, -1, volume, 0, true, false);
+ _mixer->playInputStream(soundType, handle, stream, -1, volume, 0, DisposeAfterUse::YES, false);
}
}
Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sci/sound/music.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -388,11 +388,11 @@
);
_pMixer->playInputStream(pSnd->soundType, &pSnd->hCurrentAud,
pSnd->pLoopStream, -1, pSnd->volume, 0,
- false);
+ DisposeAfterUse::NO);
} else {
_pMixer->playInputStream(pSnd->soundType, &pSnd->hCurrentAud,
pSnd->pStreamAud, -1, pSnd->volume, 0,
- false);
+ DisposeAfterUse::NO);
}
} else {
_mutex.lock();
Modified: scummvm/trunk/engines/sci/sound/softseq/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/softseq/adlib.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sci/sound/softseq/adlib.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -229,7 +229,7 @@
MidiDriver_Emulated::open();
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO);
return 0;
}
Modified: scummvm/trunk/engines/sci/sound/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/softseq/amiga.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sci/sound/softseq/amiga.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -541,7 +541,7 @@
MidiDriver_Emulated::open();
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO);
return Common::kNoError;
}
Modified: scummvm/trunk/engines/scumm/player_mod.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_mod.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_mod.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -49,7 +49,7 @@
_playproc = NULL;
_playparam = NULL;
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_MOD::~Player_MOD() {
Modified: scummvm/trunk/engines/scumm/player_nes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_nes.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_nes.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -621,7 +621,7 @@
APU_writeControl(0);
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_NES::~Player_NES() {
Modified: scummvm/trunk/engines/scumm/player_pce.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_pce.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_pce.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -725,7 +725,7 @@
_psg = new PSG_HuC6280(PSG_CLOCK, _sample_rate);
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_PCE::~Player_PCE() {
Modified: scummvm/trunk/engines/scumm/player_sid.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_sid.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_sid.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -1261,7 +1261,7 @@
initSID();
resetSID();
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_SID::~Player_SID() {
Modified: scummvm/trunk/engines/scumm/player_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_v2.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_v2.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -366,7 +366,7 @@
set_pcjr(pcjr);
setMusicVolume(255);
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_V2::~Player_V2() {
Modified: scummvm/trunk/engines/scumm/player_v2cms.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_v2cms.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_v2cms.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -893,7 +893,7 @@
}
}
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Player_V2CMS::~Player_V2CMS() {
Modified: scummvm/trunk/engines/scumm/player_v4a.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_v4a.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/scumm/player_v4a.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -154,7 +154,7 @@
// the Tfmx-player never "ends" the output by itself, so this should be threadsafe
if (!_mixer->isSoundHandleActive(_sfxHandle))
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, &_tfmxSfx, -1, Audio::Mixer::kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, &_tfmxSfx, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
} else { // Song
debug(3, "player_v4a: play %d: song %i - %02X", nr, index, type);
@@ -166,7 +166,7 @@
// the Tfmx-player never "ends" the output by itself, so this should be threadsafe
if (!_mixer->isSoundHandleActive(_musicHandle))
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, &_tfmxMusic, -1, Audio::Mixer::kMaxChannelVolume, 0, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, &_tfmxMusic, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
_musicId = nr;
}
}
Modified: scummvm/trunk/engines/sky/music/adlibmusic.cpp
===================================================================
--- scummvm/trunk/engines/sky/music/adlibmusic.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sky/music/adlibmusic.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -40,7 +40,7 @@
_opl = makeAdlibOPL(_sampleRate);
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
AdlibMusic::~AdlibMusic() {
Modified: scummvm/trunk/engines/sword1/music.cpp
===================================================================
--- scummvm/trunk/engines/sword1/music.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sword1/music.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -237,7 +237,7 @@
_converter[0] = NULL;
_converter[1] = NULL;
_volumeL = _volumeR = 192;
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Music::~Music() {
Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sword1/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -259,7 +259,7 @@
if (SwordEngine::isPsx()) { ;
uint32 size = READ_LE_UINT32(sampleData);
Audio::AudioStream *audStream = Audio::makeLoopingAudioStream(new Audio::VagStream(new Common::MemoryReadStream(sampleData + 4, size-4)), (_fxList[elem->id].type == FX_LOOP) ? 0 : 1);
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &elem->handle, audStream, elem->id, volume, pan, false, false, false);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &elem->handle, audStream, elem->id, volume, pan, DisposeAfterUse::NO, false, false);
} else {
uint32 size = READ_LE_UINT32(sampleData + 0x28);
uint8 flags;
Modified: scummvm/trunk/engines/sword2/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sound.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/sword2/sound.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -90,7 +90,7 @@
_mixBuffer = NULL;
_mixBufferLen = 0;
- _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
}
Sound::~Sound() {
@@ -342,7 +342,7 @@
_vm->_mixer->playInputStream(soundType, handle,
Audio::makeLoopingAudioStream(input, loop ? 0 : 1),
- -1, vol, pan, true, false, isReverseStereo());
+ -1, vol, pan, DisposeAfterUse::YES, false, isReverseStereo());
return RD_OK;
}
Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -433,7 +433,7 @@
syncSoundSettings();
music->load(1);
- _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, 255, 0, true, false);
+ _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false);
music->start();
int load_slot = Common::ConfigManager::instance().getInt("save_slot");
Modified: scummvm/trunk/engines/tinsel/bmv.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bmv.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/tinsel/bmv.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -458,7 +458,7 @@
if (currentSoundFrame == ADVANCE_SOUND) {
if (!audioStarted) {
_vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType,
- &_audioHandle, _audioStream, -1, Audio::Mixer::kMaxChannelVolume, 0, false);
+ &_audioHandle, _audioStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
audioStarted = true;
}
}
Modified: scummvm/trunk/engines/tinsel/music.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/music.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/engines/tinsel/music.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -571,7 +571,7 @@
_end = true;
_vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType,
- &_handle, this, -1, _volume, 0, false, true);
+ &_handle, this, -1, _volume, 0, DisposeAfterUse::NO, true);
}
PCMMusicPlayer::~PCMMusicPlayer() {
Modified: scummvm/trunk/sound/mixer.cpp
===================================================================
--- scummvm/trunk/sound/mixer.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/mixer.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -44,7 +44,7 @@
*/
class Channel {
public:
- Channel(Mixer *mixer, Mixer::SoundType type, AudioStream *input, bool autofreeStream, bool reverseStereo, int id, bool permanent);
+ Channel(Mixer *mixer, Mixer::SoundType type, AudioStream *input, DisposeAfterUse::Flag autofreeStream, bool reverseStereo, int id, bool permanent);
~Channel();
/**
@@ -151,7 +151,7 @@
uint32 _pauseStartTime;
uint32 _pauseTime;
- bool _autofreeStream;
+ DisposeAfterUse::Flag _autofreeStream;
RateConverter *_converter;
AudioStream *_input;
};
@@ -229,7 +229,7 @@
AudioStream *input = makeLinearInputStream((byte *)sound, size, rate, flags, loopStart, loopEnd);
// Play it
- playInputStream(type, handle, input, id, volume, balance, true, false, ((flags & Mixer::FLAG_REVERSE_STEREO) != 0));
+ playInputStream(type, handle, input, id, volume, balance, DisposeAfterUse::YES, false, ((flags & Mixer::FLAG_REVERSE_STEREO) != 0));
}
void MixerImpl::playInputStream(
@@ -237,7 +237,7 @@
SoundHandle *handle,
AudioStream *input,
int id, byte volume, int8 balance,
- bool autofreeStream,
+ DisposeAfterUse::Flag autofreeStream,
bool permanent,
bool reverseStereo) {
Common::StackLock lock(_mutex);
@@ -251,7 +251,7 @@
if (id != -1) {
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i] != 0 && _channels[i]->getId() == id) {
- if (autofreeStream)
+ if (autofreeStream == DisposeAfterUse::YES)
delete input;
return;
}
@@ -444,7 +444,7 @@
#pragma mark -
Channel::Channel(Mixer *mixer, Mixer::SoundType type, AudioStream *input,
- bool autofreeStream, bool reverseStereo, int id, bool permanent)
+ DisposeAfterUse::Flag autofreeStream, bool reverseStereo, int id, bool permanent)
: _type(type), _mixer(mixer), _id(id), _permanent(permanent), _volume(Mixer::kMaxChannelVolume),
_balance(0), _pauseLevel(0), _samplesConsumed(0), _samplesDecoded(0), _mixerTimeStamp(0),
_pauseStartTime(0), _pauseTime(0), _autofreeStream(autofreeStream), _converter(0),
@@ -458,7 +458,7 @@
Channel::~Channel() {
delete _converter;
- if (_autofreeStream)
+ if (_autofreeStream == DisposeAfterUse::YES)
delete _input;
}
Modified: scummvm/trunk/sound/mixer.h
===================================================================
--- scummvm/trunk/sound/mixer.h 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/mixer.h 2010-01-08 22:09:43 UTC (rev 47182)
@@ -26,7 +26,7 @@
#ifndef SOUND_MIXER_H
#define SOUND_MIXER_H
-#include "common/scummsys.h"
+#include "common/types.h"
#include "common/mutex.h"
#include "sound/timestamp.h"
@@ -166,7 +166,7 @@
SoundHandle *handle,
AudioStream *input,
int id = -1, byte volume = kMaxChannelVolume, int8 balance = 0,
- bool autofreeStream = true,
+ DisposeAfterUse::Flag autofreeStream = DisposeAfterUse::YES,
bool permanent = false,
bool reverseStereo = false) = 0;
Modified: scummvm/trunk/sound/mixer_intern.h
===================================================================
--- scummvm/trunk/sound/mixer_intern.h 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/mixer_intern.h 2010-01-08 22:09:43 UTC (rev 47182)
@@ -86,7 +86,7 @@
SoundHandle *handle,
AudioStream *input,
int id, byte volume, int8 balance,
- bool autofreeStream,
+ DisposeAfterUse::Flag autofreeStream,
bool permanent,
bool reverseStereo);
Modified: scummvm/trunk/sound/softsynth/adlib.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/adlib.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/softsynth/adlib.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -918,7 +918,7 @@
adlib_write(0xBD, 0x00);
create_lookup_table();
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return 0;
}
Modified: scummvm/trunk/sound/softsynth/mt32.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/mt32.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/softsynth/mt32.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -287,7 +287,7 @@
_initialising = false;
g_system->fillScreen(0);
g_system->updateScreen();
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, this, -1, 255, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return 0;
}
Modified: scummvm/trunk/sound/softsynth/ym2612.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/ym2612.cpp 2010-01-08 22:07:56 UTC (rev 47181)
+++ scummvm/trunk/sound/softsynth/ym2612.cpp 2010-01-08 22:09:43 UTC (rev 47182)
@@ -587,7 +587,7 @@
MidiDriver_Emulated::open();
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
+ _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list