Maxmod online music streaming

BlitzMax Forums/BlitzMax Programming/Maxmod online music streaming

Drackbolt(Posted 2008) [#1]
I've searched all the forums and things I can find on Maxmod, but don't have an answer yet. Is it possible to stream audio from an http server using OpenAL? Currently I'd like to incorporate HBR1.com's free OGG streams into a game as an option. I would have thought this code would do the trick:
Import MaxMod.AudioStream
Import MaxMod.OGG
If EnableOpenALAudio()
	If SetAudioDriver("OpenAL Generic Software")
		Local vMusicChannel:TChannel = AllocChannel()
		If ChannelPlaying(vMusicChannel) = False
			vMusicChannel = CreateAudioStream("http::radio.hbr1.com:19800/ambient.ogg")
		EndIf
		WaitKey()
		End
	EndIf
EndIf

This code works fine with a local URL. Unfortunately here it just gives an unhandled memory exception error, with no debug info. Any feedback would be great.


REDi(Posted 2008) [#2]
Hi Drackbolt, I've just put an updated version of maxmod.ogg up on the download page, unzip that into your maxmod.mod folder and try this...
SuperStrict
Import MaxMod.AudioStream
Import MaxMod.Ogg

EnableOpenALAudio()
SetAudioDriver("OpenAL Generic Software")
	
Local Music:TMusic = TOGGStream.OpenIceStream("radio.hbr1.com","tronic.ogg",19800)
'Local Music:TMusic = TOGGStream.OpenIceStream("radio.hbr1.com","ambient.ogg",19800)
If Not Music RuntimeError "Unable to connect"
Local Channel:TChannel = CreateAudioStream(Music)
WaitKey

Hope it works for ya!


plash(Posted 2008) [#3]
Can MaxMod send out an ICE stream?


REDi(Posted 2008) [#4]
...No :P


Drackbolt(Posted 2008) [#5]
Man, I love this community.
REDi you rock. Works like a charm.