Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Septih

macrumors newbie
Original poster
Feb 18, 2010
3
0
Hello,

For our mac software, we need to be able to convert wav recordings into mp3 format. I've been looking around on the web for a couple of days but haven't really gotten anywhere close.

I've looked at lame, got it linked into xcode, but have hit a brick wall of no developer documentation. Mainly I have no idea what the function names I should be linking to are. The closest thing I've got to an example is the c++ one from the source code and that uses the dll.

I also briefly looked at the apple doc for core audio/audio toolkit. That has sample code for file conversion, but it seems to require snow leopard (i'm using and developing for leopard), so that's no use.

Has anyone here managed to do wav to mp3 conversion and if so could you possibly point me in the right direction?
 
The QuickTime API can do this, and it's probably the simplest approach to use for a Mac project. Note that QTKit is Snow Leopard only, and therefore cannot be used. You'll see quite a few references to it on Apple's developer site.
 
i have sucesfully done it using a number of applications, such as QT7 Pro (QT7 can open .wav files, and can save as .aiff, then use iTunes to import to .mp3).

also a great program named Max can do it for you too.

they are all GUI tools though, im not familiar with coding and whatnot :(
 
Right, I've looked into quicktime and had a play around with some code for converting a qtmovie mp3 into a wav and reversed it. This produces an mp3 which plays and I can change the id3 tags for (and it still plays), but everything I've read about quicktime api says that it doesn't include an mp3 encoder, has this changed or have I just got a wav file with a .mp3 extension?
 
Right, I've looked into quicktime and had a play around with some code for converting a qtmovie mp3 into a wav and reversed it. This produces an mp3 which plays and I can change the id3 tags for (and it still plays), but everything I've read about quicktime api says that it doesn't include an mp3 encoder, has this changed or have I just got a wav file with a .mp3 extension?

i am fairly certain that iTunes/QT can natively play .wav files. but i am uncertain if you have actually successfully changed the formats as i dont have the file.

sorry im not very educated on this coding side of things so i can really give you an answer - i hope it presents itself soon :)
 
I think the uncertainty arose because the wav file I used to test it was the product of testing the initial mp3 -> wav code before I reversed it. For whatever reason the wav held more details about the track than a newly generated one and the conversion back to mp3 used those details.

Trying from a newly recorded wav showed me that the conversion wasn't really working.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.