diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/animation.cpp | 8 | ||||
-rw-r--r-- | graphics/animation.h | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/graphics/animation.cpp b/graphics/animation.cpp index 7d8cc1d920..0b5aba1e99 100644 --- a/graphics/animation.cpp +++ b/graphics/animation.cpp @@ -36,13 +36,11 @@ BaseAnimationState::~BaseAnimationState() { if (decoder) mpeg2_close(decoder); delete mpgfile; - delete sndfile; #ifndef BACKEND_8BIT _sys->hideOverlay(); free(overlay); #endif - if (bgSoundStream) - delete bgSoundStream; + delete bgSoundStream; #endif } @@ -53,7 +51,6 @@ bool BaseAnimationState::init(const char *name) { decoder = NULL; mpgfile = NULL; - sndfile = NULL; bgSoundStream = NULL; #ifdef BACKEND_8BIT @@ -132,8 +129,7 @@ bool BaseAnimationState::init(const char *name) { ticks = _sys->get_msecs(); // Play audio - sndfile = new File(); - bgSoundStream = AudioStream::openStreamFile(name, sndfile); + bgSoundStream = AudioStream::openStreamFile(name); if (bgSoundStream != NULL) { _snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false); diff --git a/graphics/animation.h b/graphics/animation.h index 4877be24a8..4722ceb176 100644 --- a/graphics/animation.h +++ b/graphics/animation.h @@ -90,7 +90,6 @@ protected: #endif File *mpgfile; - File *sndfile; byte buffer[BUFFER_SIZE]; |