Playing audio file during file change


I’d like to play and audio file (from disk) that is constantly growing (it’s data is fed by a thread that downloads it from the net). The question is, will the transportsource know of the changes in length on it’s own or do i have to somehow inform it of every change made to the file, or perhaps i shoudl writ my own AudioFormatReader or something else.

i know the stream length before it will start playing (i’m using my cURL class so before i start playing the transport source the length of the stream is known).

what’s the best approach here?


The audio file readers aren’t really designed to be very smart like that, and will quite sensibly lock the file while they’re reading it, which will stop you writing to it… I guess to do something like this you’d be better off writing your own buffering mechanism.