in reply to Audio Stream Buffer

Have a look at slimserver, its open source and does audio streaming. The code wont be directly usable for your situation, but it written in perl so should be hackable.
I should really do something about this apathy ... but i just cant be bothered