aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sound.cpp
diff options
context:
space:
mode:
authorathrxx2012-11-11 03:01:39 +0100
committerathrxx2012-11-11 19:14:31 +0100
commit93e69aa4da0558b05fc235684355ed38eed9863d (patch)
treeb809c595a60ce23e2dcb27ae7d4a9f9fa68d7530 /engines/kyra/sound.cpp
parent1bb8f22567e71796bba4f98a6ff4353ec84df197 (diff)
downloadscummvm-rg350-93e69aa4da0558b05fc235684355ed38eed9863d.tar.gz
scummvm-rg350-93e69aa4da0558b05fc235684355ed38eed9863d.tar.bz2
scummvm-rg350-93e69aa4da0558b05fc235684355ed38eed9863d.zip
KYRA: clean up audio resource handling
(this was really ugly, now it's somewhat less ugly)
Diffstat (limited to 'engines/kyra/sound.cpp')
-rw-r--r--engines/kyra/sound.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 9d3e5f67f5..7b1b4d82f4 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -37,7 +37,7 @@ namespace Kyra {
Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer), _soundChannels(), _musicEnabled(1),
- _sfxEnabled(true), _soundDataList(0) {
+ _sfxEnabled(true) {
}
Sound::~Sound() {
@@ -47,14 +47,6 @@ Sound::kType Sound::getSfxType() const {
return getMusicType();
}
-void Sound::setSoundList(const AudioDataStruct *list) {
- _soundDataList = list;
-}
-
-bool Sound::hasSoundFile(uint file) const {
- return (fileListEntry(file) != 0);
-}
-
bool Sound::isPlaying() const {
return false;
}
@@ -203,12 +195,17 @@ void MixedSoundDriver::updateVolumeSettings() {
_sfx->updateVolumeSettings();
}
-void MixedSoundDriver::setSoundList(const AudioDataStruct *list) {
- _music->setSoundList(list);
- _sfx->setSoundList(list);
+void MixedSoundDriver::initAudioResourceInfo(int set, void *info) {
+ _music->initAudioResourceInfo(set, info);
+ _sfx->initAudioResourceInfo(set, info);
+}
+
+void MixedSoundDriver::selectAudioResourceSet(int set) {
+ _music->selectAudioResourceSet(set);
+ _sfx->selectAudioResourceSet(set);
}
-bool MixedSoundDriver::hasSoundFile(uint file) const {
+bool MixedSoundDriver::hasSoundFile(uint file) {
return _music->hasSoundFile(file) && _sfx->hasSoundFile(file);
}