|
It isn't really a 'bug' as such, it is a side effect of a hack on the ogg stream data:
Ogg streams consist of a header, followed by body data, followed by another header and body, etc. Each seperate header/body pair has a different 'stream serial' number. if the body data following the header has a different stream serial number, the playback stops (at least with winamp).
When you start listening to an ogg stream, you will usually start in the middle of a body, and in order to make it actually play you need to feed the header that belongs to that body to the player first. This requires the broadcast streamer to seperate out the headers as they appear, and to record the position in the stream where they belong. Because Streamer has a long internal buffer, there can be several headers in it at the same time. Unfortunatley there is an obscure and impossible to find (so far) bug where the wrong cached header is sent to the player, and so the player just aborts the playback (In real life it doesn't actually need to stop, the audio decode tables are the same in all headers, so headers could be transparently interchanged).
In order to make the stream play every time, I rewrite the stream serial in all the ogg pages to be the same, so any header is now accepted for any body data. Unfortunately winamp seems to use the changing of the stream serial to detect title updates (titles are in the header), instead of the more correct method of looking at the 'start of stream' and 'end of stream' bits in the ogg pages. Since the serial is no longer changing, winamp doesn't read the titles, although I know it is recognising the headers as headers and processing them.
So until I have another go at finding the underlying bug I have to leave the hack in place. But, since Streamer has a built in ogg player, you don't actually need to use winamp to listen at all, and the song titles are displayed correctly in Streamer itself.
I'm keeping the source to myself now, this code is my future income, so I'm not giving it away, especially since in my humble opinion it is the best p2p streaming system available. The GPL advocates arguments of 'give it away free and them make money by providing the best service using it' don't convince me. I write code (the best), I'm not a salesman, somebody else would provide a better service using my free code than I could, witness bittorrent and azureus for a good example of this. (Any GPL advocates are welcome to argue why I should open the source code if they like)
|