hi this is keiichiro nagano living in tokyo, japan.
i just made a post for trickster20-dev but i forgot to mention to wav's RIFF format. agh!
it sounds fseek is to wrap-up output to RIFF format. and, -f 2 switch is to stop that formatting and put just raw PCM data.
To: trickster20-dev
hi eyeryone,
today i msn'ed with miyagawa-san and he said that AAC decoder faad2
doesnot work well when it runs with output-to-stdout switch (-w). so
i just tried.
in short, current faad2 is totally broken when it's given -w.
> ./faad.exe -w a.m4a > a-stdout.wav
> ./faad.exe -o a-file.wav a.m4a
> diff a-stdout.wav a-file.wav
Files a-stdout.wav and a-file.wav differ
> ./faad.exe -o a-file-2.wav a.m4a
> diff a-file.wav a-file-2.wav
(no output)
>
i got and used a precompiled binary for win32 at here.
http://www.rarewares.org/aac.html
this is a bug of faad2 commandline frontend. it tries to fseek(3) on
stdout at close_audio_file in faad2/frontend/audio.c, when there is
not -f 2 switch.
> ./faad.exe -f 2 -o a-file-f2.wav a.m4a
> ./faad.exe -f 2 -w a.m4a > a-stdout-f2.wav
> diff a-file-f2.wav a-stdout-f2.wav
(no output)
>
to say worse i cannot figure out how to play the file made with -f 2.
i've just tried latest Windows Media Player, Real Player, QuickTime,
and foobar2000. they just gave me error dialogs. so i cannot say
giving -f 2 for faad2 with -w is a right way or not.
i'm sorry this is just a report and not a solution. maybe i would
write some patches for faad2 frontend.