0
0

I have problems reading (using global filecallbacks) mp3 files.
During my tests, i found that fmod does various seeks, i think it attempts to read different positions of the file.
After some seeks/reads, it throws the ERR_FORMAT error.
Im getting crazy… The problem is that only some files have this problems.
My environment is c# on vs 2005. My approach is create one thread to run all the fmod commands.
[code:2du2ex5y]
public void Test()
{
runthread();
}
void runthread()
{
Thread t = new Thread(delegate(){SoundDevice.Initialize();});
t.Start();
}
public void SoundDevice_UpdateEvent()
{
//This method is called within the SoundDevice, while it runs the system::update();

//This method creates the music, and ask for SoundDevice to play it.

}
[/code:2du2ex5y]

Sorry not post all my code. Ive created a framework to work with fmod and my business rules are complex. (I read the musics from one big file, also i do fadeout, play the next music while the current music still playing)
If someone have the same problem or have a solution, please post.

  • You must to post comments
0
0

Why didn’t you look at the mp3 files? They’re obviously bad.

Use FMOD_MPEGSEARCH to make fmod look further into the file, i bet you anything there is a bunch of 0’s at the start or something.

  • You must to post comments
0
0

I use this flag during the createSound/createStream?
Anyway, there are other diffs between those methods than the stream mode?
Sorry my english :P. I hope you understansd

  • You must to post comments
0
0

Thanks man, using the FMOD_MPEGSEARCH it does the job.
Thank u very much. I have a new man now 😛

  • You must to post comments
0
0

Anyway, i have one doubt:
I create one thread to handle all fmod commands. On this thread i create the fmod subsystem and do an infinite loop to run de system::update().
Also in this class wich owns the thread, i have one method to register a callback. this callback is called once, before the "update", then i set him to null.
My approach is correct? I get use of this based on the "code injection" pattern. If i have to change the music, i do it on the callback that is called by the thread. Is the only way i found to run fmod in single thread

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.