NAudio needs support for asynchronicity (and probably .NET 4.0 and 4.5)
See original GitHub issue.NET 4.0 added asynchronous operations to the definition of System.IO.Stream
, and 4.5 took that a step further by providing future-promise asynchronous model with Task *Async()
methods. NAudio currently targets .NET 3.5. This version did have a basic support for asynch operation (Begin{Read,Write}
, although harder to use than the new style); but NAudio does not support even that. This indeed creates a problem on servers, like in my case when I am using an instance of WebResponseStream
to construct a WaveFileReader
. The latter blocks when reading data from the underlying stream, and that requires a complex thread management in a service program (I cannot block in a thread pool thread, since they are scarce).
NAudio is an amazing library, and would be awesome to keep it up with the way current architectures are developing.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:8 (2 by maintainers)
Top GitHub Comments
Any update on this? Seems like NAudio already has a build that targets newer .NET versions, so is it planned to support this? Async IO is a must in high-throughput server apps these days, so it is kind of a bummer that it is not supported by NAudio’s WaveStreams
No, not a problem as it is, just looks strange indeed. I could not understand what is the point of building a separate and (sometimes unintentionally) different configuration for unit testing only. I just want to understand the benefits.
But my main question is what is the better multitargeting approach. Could you please look at #99 and tell me what you think? (And as a side note, this is where testing one thing then releasing another may become even more tedious and risky, as the number of configuration needed to be kept in sync triples!)