This project has moved. For the latest updates, please go here.

mp3 streaming server

Jul 25, 2013 at 4:49 PM
Edited Jul 25, 2013 at 4:51 PM
Hi,

there's an mp3 streaming demo which, however, shows the client side. I wonder how one would get started doing the server side.

I have simple piece of code that plays a looping mp3 file. But, when I leave out the "waveOut.Play" part and instead try to fill a buffer for streaming over the network, it is done with maximum speed, not in "real time". In fact, it is nothing more or less than simple decoding.

How could I fill a buffer just for the next 4 seconds (or so)? Other samples, like the chat sample, where of no help here, because I don't have a DataAvailable event.

BTW, is there some class overview for NAudio? It's such a great, but rather complex, library.
Coordinator
Jul 26, 2013 at 12:23 PM
the server side is an internet radio server. You could I suppose create a timer to send out a seconds worth of audio each second or something like that. But that's a bit beyond the scope of what I wanted to show in the NAudio Demo project, which is more focused on actually playing audio.

If you follow the documentation tab there's links to various articles about NAudio. It's something that I know NAudio could be better at, but it is just a spare time project, and I don't have a lot of spare time at the moment.
Jul 26, 2013 at 12:29 PM
markheath wrote:
If you follow the documentation tab there's links to various articles about NAudio. It's something that I know NAudio could be better at, but it is just a spare time project, and I don't have a lot of spare time at the moment.
I hope, you did'nt feel it as a rant. In the meantime I followed you blog a bit about inner workings.

Thanks!
Coordinator
Jul 26, 2013 at 12:34 PM
sure, no problem, just trying to manage people's expectations ;). I'm actually creating some training videos for Pluralsight at the moment. The first was released yesterday - Digital Audio Fundamentals, which gives all the key background knowledge people need before trying to write an audio program, and the next will hopefully be completed later this year and will be explicitly about programming with NAudio. I know its not free, but you could take out a trial or just sign up for 1 month ($29 is pretty good value for access to their entire course library for a month).