You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All current building blocks of NAudio are built on or inspired by Stream and it's interface. There are several advantages of using a more modern approach, which is why I propose building blocks based on I/O pipelines.
One advantage that spoke to me is that PipeWriter allows you to push data through. This allowed me to easily build a theremin like block with mouse input without having to worry about buffers. Backpressure is provided by pausing the writer on calls to its FlushAsync. Other advantage are better explained on the documentation page linked above that the API of pipelines or in its announcement blog post
Interoperability with current IWaveProvider can be achieved by converting PipeReader to a Stream. Ideally this would be an extension method similar to ToWaveProvider and ToSampleProvider.
All current building blocks of NAudio are built on or inspired by
Stream
and it's interface. There are several advantages of using a more modern approach, which is why I propose building blocks based on I/O pipelines.One advantage that spoke to me is that
PipeWriter
allows you to push data through. This allowed me to easily build a theremin like block with mouse input without having to worry about buffers. Backpressure is provided by pausing the writer on calls to itsFlushAsync
. Other advantage are better explained on the documentation page linked above that the API of pipelines or in its announcement blog postInteroperability with current
IWaveProvider
can be achieved by convertingPipeReader
to aStream
. Ideally this would be an extension method similar toToWaveProvider
andToSampleProvider
.Similarly Channels could be a good fit as a modern variant of
ISampleProvider
.The text was updated successfully, but these errors were encountered: