aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMax Horn2004-06-28 22:35:22 +0000
committerMax Horn2004-06-28 22:35:22 +0000
commite0eab01e639acfa7eee9fcd755f6fceb88f38710 (patch)
tree049ebd5a41f6bdb1d73f2e8bb0049be8be93ee09 /graphics
parenta5df4fba77214a93442a0a9e9607cd0a523f24a8 (diff)
downloadscummvm-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')
-rw-r--r--graphics/animation.cpp8
-rw-r--r--graphics/animation.h1
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];