Are you sure you are playing the buffer?
The princip of that buffering system is quite easy:
On the one end you have webstream and on the other there is your output device.
What you are doing ist just to read mp3-data from the webstream, decode the mp3 data to pcm and write them into a buffer. So the buffer is used by your buffering mechanism to store data in and is also used by your outputdevice like DirectSoundOut to read data from and send the raw data from the buffer to your speaker.
If you won't play the stream you will keep up buffering data into the buffer. But you won't remove any data from the buffer. -> "Buffer getting full".
If you call bufferedWaveProvider.ClearBuffer() you will remove ALL buffered data from your buffer so it won't be full anymore. But that should not be the goal to reach.
The buffer should be cleared by your outputdevice. Your outputdevice reads data and removes the read data. So if it removes the data you won't have to call ClearBuffer(). The 500 ms sleeping is built in if the buffer is getting filled up faster than the outputdevice requests and removes data from it. So you will pause the buffering mechanism for 500 ms by calling Thread.Sleep(500) and your outputdevice will have the chance to remove enough data. If not Sleep(500) is called again until the buffer is just filled up with about 75% of data.
The princip of that buffering system is quite easy:
On the one end you have webstream and on the other there is your output device.
What you are doing ist just to read mp3-data from the webstream, decode the mp3 data to pcm and write them into a buffer. So the buffer is used by your buffering mechanism to store data in and is also used by your outputdevice like DirectSoundOut to read data from and send the raw data from the buffer to your speaker.
If you won't play the stream you will keep up buffering data into the buffer. But you won't remove any data from the buffer. -> "Buffer getting full".
If you call bufferedWaveProvider.ClearBuffer() you will remove ALL buffered data from your buffer so it won't be full anymore. But that should not be the goal to reach.
The buffer should be cleared by your outputdevice. Your outputdevice reads data and removes the read data. So if it removes the data you won't have to call ClearBuffer(). The 500 ms sleeping is built in if the buffer is getting filled up faster than the outputdevice requests and removes data from it. So you will pause the buffering mechanism for 500 ms by calling Thread.Sleep(500) and your outputdevice will have the chance to remove enough data. If not Sleep(500) is called again until the buffer is just filled up with about 75% of data.