diff options
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/core.cpp | 15 | ||||
-rw-r--r-- | engines/sci/sfx/pcm_device.cpp | 11 | ||||
-rw-r--r-- | engines/sci/sfx/timer.cpp | 9 |
3 files changed, 6 insertions, 29 deletions
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index ff8e7dc01e..909d752a65 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -460,10 +460,7 @@ sfx_init(sfx_state_t *self, resource_mgr_t *resmgr, int flags) { /*------------------*/ if (pcm_device || player->maintenance) { - if (pcm_device && pcm_device->timer) - timer = pcm_device->timer; - else - timer = &sfx_timer_scummvm; + timer = &sfx_timer_scummvm; if (!timer) { fprintf(stderr, "[SFX] " __FILE__": Could not find timing mechanism\n"); @@ -483,9 +480,6 @@ sfx_init(sfx_state_t *self, resource_mgr_t *resmgr, int flags) { mixer = NULL; return; } - - sciprintf("[SFX] Initialised timer '%s', v%s\n", - timer->name, timer->version); } /* With no PCM device and no player, we don't need a timer */ /*----------------*/ @@ -504,7 +498,6 @@ sfx_init(sfx_state_t *self, resource_mgr_t *resmgr, int flags) { if (mixer->init(mixer, pcm_device)) { sciprintf("[SFX] Failed to initialise PCM mixer; disabling PCM support\n"); mixer = NULL; - pcm_device->exit(pcm_device); pcm_device = NULL; } } @@ -540,10 +533,8 @@ sfx_exit(sfx_state_t *self) { song_lib_free(self->songlib); - if (pcm_device) { - pcm_device->exit(pcm_device); - pcm_device = NULL; - } + pcm_device = NULL; + if (timer && timer->exit()) fprintf(stderr, "[SFX] Timer reported error on exit\n"); diff --git a/engines/sci/sfx/pcm_device.cpp b/engines/sci/sfx/pcm_device.cpp index e6bb5f9c25..5056740b64 100644 --- a/engines/sci/sfx/pcm_device.cpp +++ b/engines/sci/sfx/pcm_device.cpp @@ -29,9 +29,6 @@ static int pcmout_scummvm_init(sfx_pcm_device_t *self) { return SFX_OK; } -static void pcmout_scummvm_exit(sfx_pcm_device_t *self) { -} - static int pcmout_scummvm_output(sfx_pcm_device_t *self, byte *buf, int count, sfx_timestamp_t *timestamp) { @@ -46,15 +43,9 @@ static int pcmout_scummvm_output(sfx_pcm_device_t *self, byte *buf, int count, sfx_pcm_device_t sfx_pcm_driver_scummvm = { - "ScummVM", - "0.1", &pcmout_scummvm_init, - &pcmout_scummvm_exit, - NULL, &pcmout_scummvm_output, NULL, {0, 0, 0}, - 0, - NULL, - NULL + 0 }; diff --git a/engines/sci/sfx/timer.cpp b/engines/sci/sfx/timer.cpp index beb57aef6b..4c62502384 100644 --- a/engines/sci/sfx/timer.cpp +++ b/engines/sci/sfx/timer.cpp @@ -43,12 +43,7 @@ int scummvm_timer_stop() { sfx_timer_t sfx_timer_scummvm = { - "ScummVM", - "0.1", - DELAY / 1000, 0, - NULL, + DELAY / 1000, &scummvm_timer_start, - &scummvm_timer_stop, - 0, - 0 + &scummvm_timer_stop }; |