Decoding MP3's to Raw .wav (PCM)

Started by
5 comments, last by BeerNutts 20 years, 5 months ago
Guys, I''m trying to find a way to decode an MP3 to a raw wave file, and save the resulting wave to disc through some Windows API''s. I''m not intersted in just using a program to convert .mp3''s to .wav''s, I want to open an .mp3 using C/C++ calls, decode it into it''s raw pulse code modulated signal, and be able to manipulate and save the resulting wave file. Any suggestions? Thanks, BeerNutts

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Advertisement
Google?

some hints:
libmad
libmpeg
mpeglib
...
http://mitglied.lycos.de/lousyphreak/
Actually www.msdn.com is better for what I want to search for, but that's not the point. The question was posed in case someone has conquered this problem before and has a detailed explaination of how to solve it. Regardless, thanks for the suggestions, but I need a Win32 solution, not one with LGPL/GPL restrictions.

[edited by - BeerNutts on November 17, 2003 5:02:55 PM]

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

www.mp3-tech.org should have all you need
I think you could use DirectSound, if not, then DirectShow.

Get GraphEdit (Dx tool) and try to build a graph to convert an mp3 into a wav file. If you can do it with GraphEdit, you can do it in code.

This method ought to free you from patent and royalty issues as well. If you distribute a codec, or even write your own codec, with your app you''re suppose to pay royalties.

It''s easiest to convert the mp3 file to a wav file on disk, but with a custom DirectShow sink filter, you could pick-up the decoded chunks as they come along (in memory).

I don''t know much about it, but WinXP has a CD writing API built-in. This iso recorder tool I like uses it. It might have stuff for creating audio CDs.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote:Original post by Magmai Kai Holmlor
This method ought to free you from patent and royalty issues as well. If you distribute a codec, or even write your own codec, with your app you're suppose to pay royalties.


Are you certain of that? I know Microsoft had posted a notice that their license to encode and decode GIF files was not transferrable to third parties. Meaning third party software could not legally use GDI+ to encode or decode GIF files without a license. I wouldn't be surprised if their MP3 license had similar constraints.



[edited by - Mastaba on November 17, 2003 10:46:49 PM]
.
If you do decide to do it the directshow way, make sure you compile the sample filters, you will need them.
some help

This topic is closed to new replies.

Advertisement