Play audio stream

Linux specific forum
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Play audio stream

Post by Janni »

Can anyone help me out with some code on how to play a radio audio stream using the BASS library from un4seen (in Linux) ?
I'm totally lost on where to start on using the libbass.so and the API

Thanks in advance
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
rootuid
User
User
Posts: 35
Joined: Sat Nov 23, 2013 11:46 am

Re: Play audio stream

Post by rootuid »

I'm in a similar position, anyone able to help?
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: Play audio stream

Post by firace »

Something like this should work:

Code: Select all

OpenLibrary(0, "./libbass.so")
         CallFunction(0, "BASS_Init", -1, 44100, 0, 0, 0)     
hMedia = CallFunction(0, "BASS_StreamCreateURL", @"http://176.9.219.133:9998/stream", 0, 0 , 0, 0)
         CallFunction(0, "BASS_ChannelPlay", hMedia, 1)

Repeat: Delay(20) : ForEver  
Post Reply