diff options
| author | Filippos Karapetis | 2009-05-25 10:30:19 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2009-05-25 10:30:19 +0000 |
| commit | d59796fb544fea69d1b2f27f89d6eb30bf5d0780 (patch) | |
| tree | 558e122a71e404cd56aa7742c57b16f108a28f46 /engines/sci/sfx | |
| parent | 5ef58bdfbe443c19d2f185d924b5058f25cab962 (diff) | |
| download | scummvm-rg350-d59796fb544fea69d1b2f27f89d6eb30bf5d0780.tar.gz scummvm-rg350-d59796fb544fea69d1b2f27f89d6eb30bf5d0780.tar.bz2 scummvm-rg350-d59796fb544fea69d1b2f27f89d6eb30bf5d0780.zip | |
Objectified the AudioResource code (used for speech and digitized music in CD talkie games)
svn-id: r40880
Diffstat (limited to 'engines/sci/sfx')
| -rw-r--r-- | engines/sci/sfx/core.cpp | 7 | ||||
| -rw-r--r-- | engines/sci/sfx/core.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index 1b4b7e7d96..ccf2052e85 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -367,6 +367,7 @@ void sfx_init(sfx_state_t *self, ResourceManager *resmgr, int flags) { self->flags = flags; self->debug = 0; /* Disable all debugging by default */ self->soundSync = NULL; + self->audioResource = NULL; if (flags & SFX_STATE_FLAG_NOSOUND) { player = NULL; @@ -443,6 +444,12 @@ void sfx_exit(sfx_state_t *self) { if (strcmp(player->name, "new") == 0) g_system->getMixer()->stopAll(); + + // Delete audio resources for CD talkie games + if (self->audioResource) { + delete self->audioResource; + self->audioResource = 0; + } } void sfx_suspend(sfx_state_t *self, int suspend) { diff --git a/engines/sci/sfx/core.h b/engines/sci/sfx/core.h index acf8c67d70..9c0d25862f 100644 --- a/engines/sci/sfx/core.h +++ b/engines/sci/sfx/core.h @@ -55,7 +55,8 @@ struct sfx_state_t { song_t *song; /* Active song, or start of active song chain */ int suspended; /* Whether we are suspended */ unsigned int debug; /* Debug flags */ - ResourceSync *soundSync; /* Used by kDoSync for speech syncing in talkie games */ + ResourceSync *soundSync; /* Used by kDoSync for speech syncing in CD talkie games */ + AudioResource *audioResource; /* Used for audio resources in CD talkie games */ }; /***********/ |
