Made AGOS, DRASCULA, GOB, GROOVIE, MADE, SCUMM and TINSEL properly stop CD audio playback on engine quit. (This only problem affected playback from CD, not from ripped audio files)

svn-id: r43512
This commit is contained in:
Johannes Schickel 2009-08-18 15:31:26 +00:00
parent db0cd620f6
commit b33b90ecd0
8 changed files with 12 additions and 3 deletions

View File

@ -899,7 +899,7 @@ AGOSEngine::~AGOSEngine() {
if (_driver)
delete _driver;
AudioCD.destroy();
AudioCD.stop();
for (uint i = 0; i < _itemHeap.size(); i++) {
delete[] _itemHeap[i];

View File

@ -106,6 +106,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
DrasculaEngine::~DrasculaEngine() {
delete _rnd;
stopSound();
free(_charMap);
free(_itemLocations);

View File

@ -46,6 +46,7 @@ CDROM::CDROM() {
}
CDROM::~CDROM() {
stop();
}
void CDROM::readLIC(DataStream &stream) {

View File

@ -38,6 +38,10 @@ MusicPlayer::MusicPlayer(GroovieEngine *vm) :
_prevCDtrack(0), _backgroundDelay(0) {
}
MusicPlayer::~MusicPlayer() {
AudioCD.stop();
}
void MusicPlayer::playSong(uint32 fileref) {
Common::StackLock lock(_mutex);

View File

@ -37,7 +37,7 @@ namespace Groovie {
class MusicPlayer {
public:
MusicPlayer(GroovieEngine *vm);
virtual ~MusicPlayer() {}
virtual ~MusicPlayer();
void playSong(uint32 fileref);
void setBackgroundSong(uint32 fileref);

View File

@ -127,6 +127,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
}
MadeEngine::~MadeEngine() {
AudioCD.stop();
delete _rnd;
delete _pmvPlayer;
delete _res;

View File

@ -86,7 +86,7 @@ Sound::Sound(ScummEngine *parent, Audio::Mixer *mixer)
Sound::~Sound() {
stopCDTimer();
AudioCD.destroy();
AudioCD.stop();
delete _sfxFile;
}

View File

@ -888,6 +888,7 @@ TinselEngine::~TinselEngine() {
if (MoviePlaying())
FinishBMV();
AudioCD.stop();
delete _sound;
delete _midiMusic;
delete _pcmMusic;