I’m trying to pass compressed data into fmod that forwards it to a plugin that I’ve written. I tried it with a shoutcast stream.
I ripped the stream using netcat and send it to my programm to have a good testing environment.
When I open the stream with fmods own file handling everything works fine. When I open it using my self written routines it get an "Not enough memory or resources." error.
What does fmod do with data passed into the buffer of FMOD_FILE_READ?
I made my plugin write the first 512kb of the data read through codec->fileread into a file and I realised that using my own routines there are more bytes cut off from the beginng of the stream than using fmods routines. I don’t cut anything, when I dump the data in my FILE_READ it’s the same as on the stream.
If it was the otherway around (greater offset using fmods routines) I’d be able to understand it.
And I’ve got one more question:
What the hell am I supposed to return from the FILE_SEEK function.
I’m not able to seek since it’s a netstream. Fmod doesn’t bother and tries to seek. When I return FMOD_ERR_FILE_COULDNOTSEEK. The createSound function returns it as well and no sound is created.
please, please help me
- MoX asked 10 years ago
I’m a little confused. Are you hooking the fileprocs using
Does blockalign match your buffer size?
Would this help?
http://22.214.171.124/forum/viewtopic.php … highlight=
It’s all I can do for you from my limited experience.
Hope someone helps you figure it out.
PS. posting the related code (if possible) could help
- icuurd12b42 answered 10 years ago
I’m using FMOD_CREATESOUNDEXINFO(useropen, userread, userseek, userclose).
I think blockalign doesn’t matter because the read method is blocking until it read the amount of bytes given.
An one more question: How does fmod decide which plugin to use?
I tried using an mp3 stream. When fmod does the filehandling it works fine.
When I do it myself it tries to use my own plugin instead of the mp3 plugin.
I managed to get the same data in my plugin using fmods file io and my own functions. But I still get an error where windows triggers a halt-point saying the heap may be corrupted. It is triggered in _free_dbg in mscr80d.dll.
- MoX answered 10 years ago
Please login first to submit.