This project has moved and is read-only. For the latest updates, please go here.

64 bit OS MP3 Encoding through ACM

Jul 8, 2010 at 5:06 PM
Edited Jul 8, 2010 at 5:10 PM
Great work with the library. I have worked with Alvas Audio library and looking at the code here I see much cleaner code in comparison. Kudos. -------------- For anyone attempting to encode Mp3s through the ACM on a 64 bit OS (Windows 7/Server 2008) they may appreciate this bit of advice- After a bit of searching I found a method to install the LAME mp3 encoder onto a 64 bit OS. For security or other reasons the default mp3 codec only allows decoding and not encoding. To install the LAME codec onto a 64 bit OS do the following: Taken from here: Step 1: Place the LameACM.inf, LameACM.acm files into c:\temp\lame Step 2: Start up the command line and enter "cd c:\Windows\SysWow64" Step 3: enter "rundll32 setupapi.dll,InstallHinfSection DefaultInstall 0 c:\temp\lame\lameACM.inf" -------------- Once undergoing the above steps the Lame Mp3 driver will now show through the ACM Driver List. During testing the encoding function in NAudioDemo I run into an issue. To reproduce: Start up NAudioDemo Click 'ACM Format Conversion' Click 'Encode' Select a wave file (ie 'Windows XP Startup.wav') -> Click 'Open' In the 'Select Compressed Format:' window for 'Format:' pick 'Lame MP3' -> Click 'OK' In the 'Select Output File Name' dialog enter 'Windows XP Startup.mp3' -> Click 'Save' At this point with exceptions turned on for the CLR in visual studio 2008 (go to the menu Debug->Exceptions) I get an exception during the execution of AcmStream.DestToSource. More specifically it is calling the API AcmInterop.acmStreamSize and getting the result 'AcmNotPossible'. According to MSDN: 'The requested operation cannot be performed.' A bit of an odd reply, don't you think? Does anyone else have any experiences with MP3 encoding in a 64 bit OS using the ACM? (edit) an attempt to fix the lack of format
Jul 12, 2010 at 10:31 AM

which version of NAudio are you using? is it any better with the latest code?

Jul 13, 2010 at 3:47 PM
markheath wrote:

which version of NAudio are you using? is it any better with the latest code?

Version  I only recently downloaded and tested it

I should also note that I took care to make sure that the project started as a 32 bit process.  This may seem obvious but it is only to clarify to those who have never seen errors related to 64 bit processes attempting to communicate with a 32 bit DLL