Hi I posted a question about decompressing frames 2 days ago. And some may have misunderstood my question.
I don’t want to view a frame (sample) of the mp3 in “wave form view” live as I’m playing the mp3.
I want to see the WHOLE mp3 file in wave form view. Like sound sample editors that visualize a whole sound sample so you can edit the sample easier. For e.g. “Cool Edit Pro” or “Sound Forge”.
Does anybody have a solution for this using fmod?
I don’t want to decompress the whole mp3 file to the memory. I want to decompress frame by frame or any size as long as it
does not take any larger amount of memory.
> For you to display the MP3 as a waveform,
> you will need to store at least the
> displayed portion in memory so that you
> can redraw the display when required.
> If you want to display the entire MP3 on-
> screen then you will need to store the
> entire decoded sound stream in memory
> while you are displaying the waveform.
Displaying the WHOLE mp3 in actual data form
would be kinda stupid. =P
Interpolating or simply skipping frames
would be the way to go depending on what
resolutions you have and how close in detail
you would want to look at a portion of a
sample. If I wanted to have it all as raw
data I would have just used
I’m also interested in decompressing mp3 frames using some fmod function.
It would be handy to handle the decompression myself and pass the decompressed frames to a streaming dsp unit. This way I would be able to implement reverse playing for my dj program.
- Adion answered 16 years ago
Sound editors such as CoolEdit and SoundForge do indeed load the entire WAV file into memory so that they can display it (and of course edit it). For you to display the MP3 as a waveform, you will need to store at least the displayed portion in memory so that you can redraw the display when required. If you want to display the entire MP3 on-screen then you will need to store the entire decoded sound stream in memory while you are displaying the waveform.
> decompress the whole thing into memory..
I’m actually thinking of resorting to this meanwhile. Until I get a hold of small easy to use mp3 decompresser lib that supports decompressing frames or chunks of an mp3.
> dodgy hacks which dont very well
> ie using a stream DSP unit to get
> decoded chunks of data but the problem
> with this is it plays in realtime
I know.. I have already looked in to this and it is really not something I want to do..
a suggestion for the upcoming version of fmod:
Add the possibility to convert a frame or a chuck of an FSOUND_STREAM to raw data and the other way around (raw to mp3).
This way fmod could also be used by those who would want to create an application for manipulating sound. Creating more possibilities for possible future users.
Otherwise.. fmod is great as a player.
Please login first to submit.