I’ve an Icecast2 server running in my LAN providing an ogg stream. I launched the netstream sample program to listen to it, after many hours netstream stoped playing the stream. I launched it again and winamp at the same time; it was the same, a few hours later netstream stoped playing but winamp continues to play…
I modified netstream to print the return of FSOUND_IsPlaying() and I saw that it returned 0 when this happens.
Is there a way to solve this problem? Is it a bug of FMOD?
Thank you in advance,
- Nippur asked 12 years ago
[quote="andrew":dwcnz13o]If the server goes down then FMOD stops the stream gracefully. It’s up to you to create a new stream if you want to reconnect when/if the server comes up again. That’s probably what Winamp is doing.[/quote:dwcnz13o]
Of course, if the server goes down I must reconnect, but the problem is that the server NEVER goes down!
Sorry if I can’t explain myself clean (I know my english isn’t good…), but what’s happening is that the server is always running, just ices2 (the ogg encoder) dies at some point and reconnects to Icecast2. This does that the stream disapears from the Icecast2 server, making the netstram sample application stop working; that is: you don’t hear any sound, but all seems to work fine as FSOUND_Stream_GetOpenState() returns 0.
As you said, is up to me if I want to reconnect in case the server goes down or the stream disapears because of the encoder, but the question is: in the netstream sample application, how do you do that if FSOUND_Stream_GetOpenState() always returns 0?
I haven’t verified what happens if the server really goes down, I think this function call will return -3 (or another negative integer), but this is not the case…
I think that know it’s clear what’s really happening, and hope you can verify what I’m saying. I’ll also verify what happens when the server goes down and tell you.
[quote="brett":1vjv8iyl]is it a constant number of hours every time?
Maybe you have the url we could try it on?[/quote:1vjv8iyl]
I really don’t know if it’s a constant number of hours every time, because I start the sample application before leaving the office and when I arrive (9, 10 AM) it isn’t playing.
The URL, if you wan’t to try it is: http://18.104.22.168:8000/rivadavia-128.ogg
I know what is happening:
I’m using ices2 to stream to my Icecast2 server and for some reason once a day (in random hours) it disconects (saying there was a socket error) and reconnects again as I told in its config file.
Now, the problem is that FSOUND_Stream_GetOpenState() returns 0 in this cases. I think it should return -3 or even better, another negative number indicating that the connection was lost (as I told you before, FSOUND_IsPlaying() works fine in these situations, returning FALSE).
Again, if you want to try you have the URL in my last post.
Please login first to submit.