0
0

i’ve written a player using (FSOUND_Stream_Open, FSOUND_Stream_Play, FSOUND_Stream_SetVolume and FSOUND_Stream_SetTime) in visual basic.net .
Everything works for about 8-10hrs and then returns -1 or 0 in all the channels.
I tried using fmod.fsound_init & fmod.fsound_close to reset it but doesnt still work. I tried closing all steams and loading the sounds again using fmod.fsound_open() still didn’t help. But restarting the application brings it back to life!!
Please help me solve this -1 problem. I need a code sample in visual basic that solves this.

  • You must to post comments
0
0

Yes.. sorry.. i forgot that one, i close the stream with FSOUND_Stream_Stop 2 seconds AFTER the time is up and the new one has started.

  • You must to post comments
0
0

been able to get fmod playing for more than 3days now but it starts creeking after 20-23 hrs. dunno what is really happening!
can anyone help me on how to get vu levels on software channels with effectfx enabled?
need help

  • You must to post comments
0
0

yes! it returns and error -1 and stops playing!! I need the code to make it work again without restarting the application.
Pls help me with it. It is really not helping me. winamp and mediaplayer don’t do that!

  • You must to post comments
0
0

[quote="nordiz":1unnxhr5]Yes.. sorry.. i forgot that one, i close the stream with FSOUND_Stream_Stop 2 seconds AFTER the time is up and the new one has started.[/quote:1unnxhr5]

FSOUND_Stream_Stop doesn’t completely free the channel, it just stops it. Use FSOUND_Stream_Close instead.

  • You must to post comments
0
0

so what Fmod error do you get? – that might be a bit of a clue!

  • You must to post comments
0
0

[quote="Pio":x0ijj7ln]

FSOUND_Stream_Stop doesn’t completely free the channel, it just stops it. Use FSOUND_Stream_Close instead.[/quote:x0ijj7ln]

Yes.. it looks like that was the trick.. 40 hours now and still counting! :) Thanks!

  • You must to post comments
0
0

what i know is that, -1 means no more channel error according to your documentation. but i dont know for zero.
what i’m doing is, i’ve created a player that can play 30 files at a time. each button can play and stop individually. I’m using fmod.fsound_open() to open the file, fmod.fsound_play to play and fmon.fsound_stop() and Fsound_stream_close to stop it.
But after some time, It stops responding. no error message is returned but i use a messagebox to check the channel value, and it is -1.
please give me a well structured code on loading and playing as many as 30 files without having leaks.

  • You must to post comments
0
0

infact, im coding in vb.net! could this be the main problem for the player not playing? yesterday, i realized there was some creeking soung in the background of the playing file too after abt 6hrs.
what is happening?

  • You must to post comments
0
0

The wind getting up outside ?? 😀

  • You must to post comments
0
0

I have had problems with playing FMOD for long times also but I keep track of how long/plays are going on then I just Re-INIT FMod.. try that out

After doing that I have had applications work for over 130 days straight!

  • You must to post comments
0
0

Another think I see you use (vb?).net. Maybe a call to the (GarbageCollector) GC.Collect every now and then is not a bad thing either

  • You must to post comments
0
0

I have the same problem that is described here.

But for me it works for up to 30 hours before it just stops playing.

The program is simple, one init. routine:

FSOUND_SetOutput FSOUND_OUTPUT_DSOUND
FSOUND_SetDriver 0
FSOUND_SetBufferSize 50
result = FSOUND_Init(44100, 32, 0)

Then i timer that checks if the song is running out of time it runs this code:

HALF OF THE TIME THIS COD:
lHandle = FSOUND_Stream_Open(sFileName, FSOUND_NORMAL + FSOUND_MPEGACCURATE, 0, 0)
FSOUND_Stream_Play 20, lHandle

HALF OF THE TIME THIS COD:
lHandle = FSOUND_Stream_Open(sFileName, FSOUND_NORMAL + FSOUND_MPEGACCURATE, 0, 0)
FSOUND_Stream_Play 21, lHandle

This works fine in 30 hours, then it just stops playing, FSOUND_Stream_Open starts to return -1

So i cant se it’s a memory leak in my application.

Do you have any guess where i should start looking and what i should do to solve this problem?

It have been tested on diffrent kind of soundcards, computers and operating system with the same result. Right now im trying to test if a reinit of fmod solves the problem, i just have to wait for 30 hours until i know :)

Plese advice…

  • You must to post comments
0
0

are you closing the currently playing stream before opening and playing the new one? also you should call play with FSOUND_FREE rather than a specific channel number

  • You must to post comments
Showing 13 results
Your Answer

Please first to submit.