Stream from WaveIn

Apr 24, 2013 at 1:13 AM
I'd like to get a Stream object from WaveIn, that can then be passed to stuff requiring a Stream.

WaveStream seems to implement this interface, but I can't find any subclass of WaveStream actually taking data from WaveIn or a WaveProfider.

How can I get a Stream from WaveIn? Does this exist already?
Coordinator
Apr 25, 2013 at 3:40 PM
you shouldn't really need a stream, just a WaveProvider, for which I suggest using BufferedWaveProvider. If you really must have a WaveStream, then I'd make an adapter class. Just make Position set do nothing, Lenght can return any value, and Position get can return the total number of bytes read so far
Apr 25, 2013 at 5:40 PM
Well in this case I need to pass audio to another component that wants a Stream. I ended up writing my own code to fill in a stream that can be read asynchronously, but it seems like it might be a pretty common use case.