Author Topic: Best Practices for streaming audio  (Read 1991 times)


  • Posts: 2
Best Practices for streaming audio
« on: 25 Feb '12 - 00:55 »
We're developing an application that will be used to stream music. The application will connect to msql database, retrieve the url of a mp3 file and play it. One of the requirement is that audio file be transmitted over the network and played immediately without downloading an entire file before playback. Hence a small amount of data is sent ahead to the user's computer and buffered temporarily on the hard drive, and that the user has now way to save on his computer the streaming file.
After a long discussion, we agreed to use Bass's .net wrapper ( However, we're not sure how we could do this. We know we can use  Bass.CreateURL function to stream url but we have no clue how:
1. To display the buffered percentage
2. To discard the streamed file after playback
3. To limit the time of buffering since the client's internet connection is assumed to be very slow
4. Make sure that the stream can run in a background (do you need to use a thread or the function already used a thread?)
5. Any other suggestions

Please provide any sample code or resources if you can. We're building the application using C#.NET 4.0 on windows Form.
Thanks for your help


  • Posts: 4637
Re: Best Practices for streaming audio
« Reply #1 on: 25 Feb '12 - 11:44 »
You might take a look to the C# sample called 'NetRadio' which is supplied with Bass.Net.
This covers most of your questions.


  • Posts: 2
Re: Best Practices for streaming audio
« Reply #2 on: 25 Feb '12 - 21:59 »
Thanks. Lemme give it a shot