diff options
author | Max Horn | 2004-06-28 22:35:22 +0000 |
---|---|---|
committer | Max Horn | 2004-06-28 22:35:22 +0000 |
commit | e0eab01e639acfa7eee9fcd755f6fceb88f38710 (patch) | |
tree | 049ebd5a41f6bdb1d73f2e8bb0049be8be93ee09 /graphics/animation.cpp | |
parent | a5df4fba77214a93442a0a9e9607cd0a523f24a8 (diff) | |
download | scummvm-rg350-e0eab01e639acfa7eee9fcd755f6fceb88f38710.tar.gz scummvm-rg350-e0eab01e639acfa7eee9fcd755f6fceb88f38710.tar.bz2 scummvm-rg350-e0eab01e639acfa7eee9fcd755f6fceb88f38710.zip |
Make use of new File refcount code; also fixed long standing bug in vorbis code (ov_clear was not being called, resulting in a file not being closed)
svn-id: r14107
Diffstat (limited to 'graphics/animation.cpp')
-rw-r--r-- | graphics/animation.cpp | 8 |
1 files changed, 2 insertions, 6 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); |