Justin Knight Posted February 24, 2015 Author Share Posted February 24, 2015 I thought fmod supported internet streaming. I was wondering if someone could please help me edit the client to play m3u files for internet radio streams. The files I'm trying to play can be found here [http://srvr2.serve-everything.com:8003/](http://srvr2.serve-everything.com:8003/)If anyone has at least a starting point for solving this issue I would love to hear from you. Thank you! Link to comment Share on other sites More sharing options...
abhi2011 Posted February 24, 2015 Share Posted February 24, 2015 > I thought fmod supported internet streaming. I was wondering if someone could please help me edit the client to play m3u files for internet radio streams. The files I'm trying to play can be found here [http://srvr2.serve-everything.com:8003/](http://srvr2.serve-everything.com:8003/)> > > > If anyone has at least a starting point for solving this issue I would love to hear from you. Thank you!fmod does support streaming. But fmod must support the file format that you are streaming from. I don't think fmod supports m3u files. Moreover, I don't think a documentation for the old fmod (which is the one being used in the engines here) exists anymore. Though, you could try googling the fmod version with the documentation. Link to comment Share on other sites More sharing options...
Justin Knight Posted February 24, 2015 Author Share Posted February 24, 2015 thanks for the tip!I had the client read the url from a file then stream that url with fmod! Works like a charm. I may even make a little tutorial. Link to comment Share on other sites More sharing options...
Justin Knight Posted February 26, 2015 Author Share Posted February 26, 2015 Is there a way I can handle when the stream url fails to load in this example?```Public Sub PlayMusic(ByVal song As String) Dim tmpurl As String If Not INIT_MUSIC Then Exit Sub ' exit out early if we have the system turned off If Options.Music = 0 Then Exit Sub ' does it exist? If Not FileExist(App.Path & MUSIC_PATH & song, True) Then Exit Sub ' don't re-start currently playing songs If curSong = song Then Exit Sub ' stop the existing music StopMusic ' find the extension Select Case Right$(song, 4) Case ".mid", ".s3m", ".mod" ' open the song songHandle = FMUSIC_LoadSong(App.Path & MUSIC_PATH & song) ' play it FMUSIC_PlaySong songHandle ' set volume FMUSIC_SetMasterVolume songHandle, 150 Case ".wav", ".mp3", ".ogg", ".wma" ' open the stream streamHandle = FSOUND_Stream_Open(App.Path & MUSIC_PATH & song, FSOUND_LOOP_NORMAL, 0, 0) ' play it FSOUND_Stream_Play 0, streamHandle ' set volume FSOUND_SetVolume streamHandle, 150 Case ".txt" 'open file and read tmpurl = FileText(App.Path & MUSIC_PATH & song) ' open the stream streamHandle = FSOUND_Stream_Open(tmpurl, FSOUND_LOOP_OFF, 0, 0) ' play it FSOUND_Stream_Play 0, streamHandle ' set volume FSOUND_SetVolume streamHandle, 150 Case Else Exit Sub End Select ' new current song curSong = songEnd Sub ``` Link to comment Share on other sites More sharing options...
Justin Knight Posted March 3, 2015 Author Share Posted March 3, 2015 i was going about this all wrong. just switched to using the media player control for streaming. Link to comment Share on other sites More sharing options...
abhi2011 Posted March 3, 2015 Share Posted March 3, 2015 So, is your problem solved or not? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now