Page 1 of 1

Some AAC files play too slow with the avcodec plugin

Posted: Sun Mar 13, 2022 1:29 pm
by jPV
Some AAC files (not all) seem to play around half the speed they should with the avcodec plugin. Would there be something that could be fixed in the plugin? Tested on MorphOS... and MPlayer on MorphOS plays the file at the correct speed.

Here's an example file.

Code: Select all

@REQUIRE "avcodec"

OpenMusic(1, "Pinball Illusions 034.aac")
duration = GetAttribute(#MUSIC, 1, #ATTRDURATION)
loader$ = GetAttribute(#MUSIC, 1, #ATTRLOADER)
DebugPrint("Loader:", loader$, "Duration:", duration)

InstallEventHandler({OnMusicEnd = Function() DebugPrint("Actual duration:", GetTimer(1)) EndFunction})

StartTimer(1)
PlayMusic(1)

Repeat
   WaitEvent
Forever
The result from the previous code:

Code: Select all

Loader: avcodec Duration: 15585
Actual duration: 31237

Re: Some AAC files play too slow with the avcodec plugin

Posted: Fri Mar 18, 2022 9:23 pm
by airsoftsoftwair
Yes, this should be fixable. I'll see what I can do.

Re: Some AAC files play too slow with the avcodec plugin

Posted: Fri Jun 17, 2022 9:18 pm
by airsoftsoftwair

Code: Select all

- New: Added support for AAC files that use parametric stereo