Some AAC files play too slow with the avcodec plugin

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Some AAC files play too slow with the avcodec plugin

Post 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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Yes, this should be fixable. I'll see what I can do.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Code: Select all

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