I guess that using ACM is free of charge even for commercial applications, as is the rest of the Platform SDK  (right?).

My first question is: Is using ACM to decompress MP3s free if I tell it to use the standard mp3 codec, that ships with windows? and is the mp3-compressed wave format also free to use in a commercial application?

Second question: I guess that using ACM to decompress MSADPCM-compressed wave file _IS_ free, and that the MSADPCM-compressed wave format is free. Am I right?
Posted on 2005-04-30 18:52:52 by ti_mo_n
Decompressing mp3s (and any type of files) with ACM is free - the catch is that it MS should not help the coders find out easily how to use ACM :) . At least, I read that this is the case.
If you want to use some compression in games, you'd better use .wma or ogg.  WMA is completely free for win32-apps.
I posted in the Algorithms forum here an ACM example to decode mp3s, but it now fails me somehow :| . Do you have some links to any src code for ACM usage?
Posted on 2005-05-03 13:10:01 by Ultrano
Thanx. so how do i use wma? (I'll look for it myself - I'm asking in case i won't be able to find anything :P I've never played with WMA)

the attached ZIP is my ACM test for playing with acm. works fine on win98se and winXP (should work on all windows). it can compres from any WAVE format installed to any other WAVE format installed.? It is a debug build, so it shows some junky info -- just ignore it. Source code included, but it's my VERY old TASM programming "style" ( ^^' ), so be patient trying to understand it ;) also comments sometimes suck, like " 'calculate size'-button pressed " while there is no such button (there was one in older version).

Please pay attention to acm initialization steps in the .asm file -- this is important to properly support all possible formats.

it supports Polish and English, but in case it runs Polish - modify few first lines of code in "acm_test_04.asm".? the? .asm file prepares windows, initializes stuff, etc.? the ACM part is inside the? .inc? file.

1 more thing which should ease the source analysis:  EDI is almost always equal to 0 (NULL) ;)
Posted on 2005-05-04 14:07:04 by ti_mo_n
An interesting article on the matter:

To sum it up, you can always convert from mp3 to .wav (for free!), but on win2k you can't do the wav->mp3 conversion.

Also, when you develop your app (that needs conversion) you can use the acmFormatChoose API :D . You then save the WAVEFORMATEX as some constant array in your code, and use it for conversion.

You can also make the ACM codec output directly music to the speakers. Just use waveOutOpen with the hard-coded waveformatex :) . This is useful for games, and I've seen many such games.

On the topic: all articles I read on the net make me think that using the ACM is free for us developers. Of what I've seen, all commercial apps that pay for mp3 license (you can easily get their list) have a DLL (named like mp3PRO.dll) in their folder, that does the decoding. And I've seen many commercial products that actually use ACM instead of paying anything!

btw, your app crashes when conversion is about to start. I'm sure it's because you don't preserve EDI (for this reason actually I expected the crashes).
Posted on 2005-05-05 12:34:07 by Ultrano
Thanx alot for the info? :D

btw, your app crashes when conversion is about to start. I'm sure it's because you don't preserve EDI (for this reason actually I expected the crashes).

strange - it works fine on my 4 different machines (2 with XP and 2 with 98se).
"proc MainWindowCallback uses ebx esi edi, hwnd, uMsg, wParam, lParam" -- isn't it preserved? TASM properly added the "push"es at entrypoint, and "pop"s at all exit points ...? :?:

i can easily use ACM (actually the attached app was supposed to be a working ACM handler ^^' ), so now i'm pretty convinced to use it in my future apps/games/whatever. thanx ;)
Posted on 2005-05-05 13:20:44 by ti_mo_n