Sunday, July 29, 2012

Dream and libfaad2

One of the problems with using Dream on Windows is that it doesn't come with libfaad2, the AAC decoder library. Without it, no audio is going to be played.

I followed the recommendation to compile the sources, and was successful with MS Visual Studio C++ 2010 Express. There was no problem with the custom project file. Still, it seems like a waste to install MSVC++ 2010 just to build a single DLL.

If you don't want to go through the hassle, you can use Sodira. If you don't really like the interface (and I don't), copy the included libfaad2.dll into your Dream directory, and rename it to faad_drm.dll (and it must be faad_drm.dll, not faad2_drm.dll).

I've tried it and can confirm it works, although the DLL size is a couple kilobytes larger compared to the DLL I compiled myself (229 KB vs 232 KB). Yeah, it doesn't matter.

I also tried the pre-compiled libFAAD2 2.7 DLL from Rarewares, and it crashes Dream, so don't use that one. But you could try your luck with a 2006 build of Dream, listed at the bottom of that decoders page.

A couple notes about building a DLL, just so I can reference it in case I forget:
  • Yes, you should really download faad2_project_files.zip
  • I used faad2-2.7.zip, not that it matters
  • Unzip faad2_project_files.zip into faad2-2.7/libfaad
  • Open the 2010 solution file
  • Switch build target to Release
  • Build and rename faad2_drm.dll to faad_drm.dll. They could have renamed the build target if they were going to make a custom solution file.

1 comment: