I’m new to fmod but am hoping that it won’t take too long to get started. I have written an application that currently analyzes WAV files, finds periods of silence in them, and splits them into smaller files whereever silence occurs. I want to add MP3 support to my app, and I’m hoping that fmod can help me.
However, this type of application isn’t exactly what most people seem to be using fmod for, as it doesn’t playback any sound. How can I merely read in samples of an mp3 for analysis instead of playing the file audibly? Also, I want to read the samples in as fast as possible, i.e. faster than playback speed.
Thanks for any help that someone can provide.
Sorry it took so long to respond. The problem is that I don’t understand the structure of MP3 files and for the life of me can’t find a decent reference book on the subject, so splitting up the MP3 files myself is difficult. Also, that’s the whole reason that I want to use fmod–so that it can save me some time. Besides, it would be nice to be able to support the many other file formats that fmod does. I would gladly pay for fmod if it could save me this trouble.
As I see it, FMOD eventually should be modified so that it supports arbitrary file lengths. This is the only safe solution, as with many utilities you can never be sure how large of a file a user will throw at your program.
Thanks for your time,
I sell this program commercially. If I used MAD or mpg123 I would have to make it freely available, since they are both under the GPL (Gnu Public License). Therefore, I can’t use them. FMOD doesn’t have this limitation, so it would be a solution, if it had the features I need.
In that case you could try making a WinAMP plugin wrapper for your code, and link people that want to use MP3’s with your application to the MAD WinAMP plugin site. The downside of this being that you’re again working with PCM data, and you’d probably have to output it as such too, unless you want to re-encode…
Thanks for getting back with me, Brett. Just a couple other questions. Can I copy a portion of a sample and save it as a new mp3 file? And, what if an mp3 file is like 300 MB and many hours long? If fmod tries to load it all into memory, that would be bad… I assume it knows how to handle large files.
Please login first to submit.