play an OGG stream
BlitzMax Forums/BlitzMax Programming/play an OGG stream
| ||
Well... I've been trying to get BlitzMax to play an OGG stream (streamed by http), however I get a "stream is not seekable" error. Wouldn't it be possible to play an ogg stream using BlitzMax's modules directly ? The idea would be to be able to distribute a blitzmax-based player since many people were complaining to me about the fact most players can't play ogg streams. For reference, my piece of test-code : Local socket:TSocket = CreateTCPSocket() If Not ConnectSocket(socket, HostIp("stream.ookoo.org"), 80) Then End Local stream:TStream = CreateSocketStream(socket) WriteLine(stream, "GET /radio.ogg HTTP/1.0") WriteLine(stream, "Host: stream.ookoo.org") WriteLine(stream, "") Local res$="x" While res<>"" res=ReadLine(stream) DebugLog(res) Wend Local sound:TSound = LoadSound(stream) PlaySound(sound) |
| ||
And ogg file is encoded, you need more information that just the *current* data to decode it. |
| ||
You can stream it via fmod e.g.. Works like charm. |
| ||
As Mark said there'll be no advanced sound support for BMax, your only way is to use 3rd party libs, with this you can also avoid threading prob in BMax as BMax can't handle threading (yet). |
| ||
hmm thats a major shame, where did Mark say that? as is the max sound system is rather under powered, I always assumed that the basic sound support would be improved as time went on. |
| ||
Take a look here: http://www.blitzbasic.com/Community/posts.php?topic=61063 That means the sound support won't go further, fmod is not that bad, but rather disappointing. I tend to make a Win32 only game so I may choose audiere, just trying to convert the code from PB. (I suspect output sound stream with DSound should be OK, however not 100% sure about this, freeaudio is somehow buggy) |