I am trying to visualize audio in a corresponding waveform of a entire song. I’ve searched through the forums and came across some good references to get me started.
However each time i use ‘readData’ on a mp3 file i obtain an ERR_UNSUPPORTED result. Most of the references that I’ve come around uses a pcm-based song e.g. chimes.wav and have not mentioned related problems. I expect that my primary data will be mp3 files, but in addition i would like to be able to support as many audio containers (that fmod also supports.)
Could anybody explain why the error is occurring, and what the possibilities are to go around this?
[b:19ux11v7]– Misc. –[/b:19ux11v7]
In C# the readData function has the following signature:
public RESULT readData(IntPtr buffer, uint lenbytes, ref uint read)
Now notice that it doesn’t take as argument a expected format e.g. how do i want to receive the data back. From this I expect that readData reads data that is pre-decoded standardized format.
[b:19ux11v7]– References –[/b:19ux11v7]
http://184.108.40.206/forum/viewtopic.php … t=waveform
http://220.127.116.11/forum/viewtopic.php … ata+format
http://18.104.22.168/forum/viewtopic.php … t=readdata
- phr34k asked 8 years ago
I have figured out that the problem was not the container but how the sound was created. openpnly flag is a must, in order to read the data. Additionally by setting the openonly flag destroys you changes of playing it as a real sound.
Also in c# there’s a get/set mode function, but it doesn’t seem to apply to the openonly flag, right now i had to load in the song twice one for parsing the wave data and one for playing the sound.
This is the result:
[quote:a3oq1i4x]Also in c# there’s a get/set mode function, but it doesn’t seem to apply to the openonly flag[/quote:a3oq1i4x]
Once the file is already opened by FMOD you cannot set the open mode. In this case it probably loaded as a hardware sound so many FMOD features would not be supported.
[quote:a3oq1i4x]right now i had to load in the song twice one for parsing the wave data and one for playing the sound. [/quote:a3oq1i4x]
Yes, but you don’t need to keep the OPEN_ONLY one open after parsing the data. Like Brett said in one of the references, you could also just use FMOD_SOFTWARE and seek to zero and use the one sound for both operations.
- Guest answered 8 years ago
Actually i have loaded everything as software, and i can play the sound using openonly, but it doesn’t gave me any sound in that scenario. That’s why i tried resetting the flags. Maybe a flaw/glitch?
Either way it’s not a big problem as it’s supposed to be for a small ‘editor’ so I can so it’s a neglect-able constraint.
Please login first to submit.