Open veso266 opened 6 years ago
What do you mean with a "standard pipe"?
Hi I mean | pipe: https://en.wikipedia.org/wiki/Pipeline_(Unix)
like sox or ffmpeg has that you are able to transfer audio between more commandLine applications
So, you would like to write it to stdout?
yes not sure how other programs manage to write audio to there
So you just want to decode an input and write the raw data to stdout? You can write it to any stream:
using(var stream = Console.OpenStandardOutput())
{
IWaveSource source = ...
source.WriteToStream(stream);
}
Hi Thanks for helpinh I tried to play with it today like this
using (var soundIn = new WasapiCapture(true, AudioClientShareMode.Shared, 30))
{
//important: always initialize the soundIn instance before creating the
//SoundInSource. The SoundInSource needs the WaveFormat of the soundIn,
//which gets determined by the soundIn.Initialize method.
soundIn.Initialize();
using (var stream = Console.OpenStandardOutput())
{
IWaveSource source = new SoundInSource(soundIn) { FillWithZeros = true };
source.WriteToStream(stream);
}
}
but get a weird exeption: System.IO.IOException: There is not enough space on the disk
there is 3GB space on the disk and this should write to stdout not disk right?
Thanks for Anwsering and Best Regards
Where does the exception occur? CSCore won't use any storage on the disk. I would guess it is caused somewhere within the StandardOutput stream. Can help you on that.
Hi I was wondering how can I pipe audio stream to a standard pipe instead to an audio device
Thanks for Anwsering and Best Regards