I’m using FMOD Ex 4.02.01 and MSVS 7.0 on a Windows XP Pro platform. I can play an MP3 I have just fine using the playstream example program, but in my own app, it just loops the first half-second of the stream continuously and then crashes if I try to stop playback. I’ve setup FMOD nearly identical to the way it’s done in the sample program, except for I have channels set to 32 and I start the stream paused so I can change its volume/frequency/pan etc.
Also, I have an array of ‘FMOD::Sound’s to have multiple streams, but on trying to load a second stream, I get the error FMOD_ERR_ALREADYLOCKED.
Any help on these issues would be grealy appreciated. Thanks!
BTW: I can playback samples with no problems at all.
Well, so far the only problem I’ve managed to get rid of is the stream that stops playing after a half-second if it starts playing after samples have been played. All I did was change the creation mode to include FMOD_HARDWARE instead of the default FMOD_SOFTWARE. I dunno why that would effect it, but it worked. I still haven’t figured out the problems with calls to ‘Channel->stop’ or the FMOD_ERR_ALREADYLOCKED for multiple stream loads.
I am calling ‘System::init’ with a channel count of 32.
Okay, I found out why it was looping the first half-second. For some reason I forgot to check to see if the stream was already playing before calling play in a program loop; thus, it was calling play repeatedly. I was trying to use the ‘Channel->isPlaying’ method, but it returns FMOD_ERR_INVALID_HANDLE if you try to use it before a call to ‘System->playSound’, so I had to use another method. The problem I’m having now is when I call ‘Channel->stop’ on the stream, it returns FMOD_ERR_INVALID_HANDLE for some odd reason.
Also, on the creation of multiple streams, the FMOD_ERR_ALREADYLOCKED error comes in the ‘System->createSound’ method when it tries to load the second stream.
I’m not using different threads for my program, and I don’t know what could cause memory curruptions.
Edit: Yet another issue… if I play a sample before playing the stream, the stream will only play the first half-second and then stop. However, if I start the stream first, then playing samples has no ill effects.
Sorry, I think my statement was misleading. What I meant was, when I call ‘Channel->stop’ on a channel that is playing the stream, the call returns FMOD_ERR_INVALID_HANDLE, and the stream continues to play.
Is there any situation you can think of that would cause ‘System->createSound’ to return FMOD_ERR_ALREADYLOCKED? Also what could cause a stream to stop after the first half-second after a sample is played. I don’t know why I’m having these problems and noone else is, but I could post my full source code for how I’m using FMOD if that would help.
Please login first to submit.