Opened 7 years ago

Last modified 12 months ago

#6278 new defect

AUDIO: adpcm decoder very slow

Reported by: raziel- Owned by: fuzzie
Priority: normal Component: Audio
Keywords: Cc:
Game:

Description

ScummVM 1.6.0git (Apr 17 2013 07:14:51)
Features compiled in: Vorbis FLAC MP3 RGB zLib Theora AAC FreeType2

The options screens before the intro (filter, sound etc. and difficulty) can be accessed and do work with normal speed, also mouse speed is not affected in any way here, sounds are played normal too.

The intro itself though is with both background music and video like a dia show.
The music sounds like coming out of a (slow) machine gun.
The video playback is a real dia show, one frame at a time, i can even see (if i wait long enough) the erasing of the black "telescope" border (top half gets erased, then bottom half), although not much too see apart from the planet view, it won't get any further than that.

If i wait REALLY long i can even see the on screen text "... presents", but after that ... nothing.
No more text displayed, no more video going on, the game is just sitting there, completely frozen apart from the machine gun music playing along.

I get no error or warnings in the console.
I can see that the game is frozen, because if i use ScummVM in window mode it won't let me close it (ALT-X also does not work)

While in the slow intro, no keyboard presses are processed (ESC doesn't do anything) might be the extreme slowdown, though.

The only thing i can add to the above crappy description is that fps is going down to 1-3 after the options screen has been left to start the intro.

Tony Tough and the Night of Roasted Moths (Windows/English)

AmigaOS4 - PPC - BE - SDL
gcc (GCC) 4.2.4 (adtools build 20090118)

Ticket imported from: #3611166. Ticket imported from: bugs/6278.

Change History (6)

comment:1 by fuzzie, 7 years ago

Owner: set to fuzzie

comment:2 by fuzzie, 7 years ago

I just tried Tony on my Linux BE powerpc machine, it works fine.

Not sure what would cause this. :(

comment:3 by raziel-, 7 years ago

Hmm...

Are there differing versions out there?
And if so, could such a differing version cause it?

comment:4 by fuzzie, 6 years ago

This happens in Hopkins too.

Thanks to wjp and Raziel, this bug has been tracked down to the ADPCM decoder, almost certainly the excessive amount of file I/O (three stdio calls per sample) it does. Converting the callers to use the buffered I/O streams is probably the best solution, although we probably also need to cache the parent stream position too.

comment:5 by fuzzie, 6 years ago

Component: Engine: Tony
Game: Tony Tough
Summary: TONY: Intro extremely slow, game not reachableAUDIO: adpcm decoder very slow

comment:6 by digitall, 12 months ago

Component: Audio
Note: See TracTickets for help on using tickets.