Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to setup the buffer size using the MultiplexingWaveProvider with an ASIO Device

Tags:

.net

naudio

I have something like the following code

   _deviceOutput = new AsioOut("Driver name");
    _padFile = new WaveFileReader(padStream); //using a memory stream
    _headphoneFile = new WaveFileReader(headphoneStream); //using a memory stream
    var multiplexer = new MultiplexingWaveProvider(new IWaveProvider[] {_headphoneFile, _padFile},
                                                           _deviceOutput.DriverOutputChannelCount);
    _deviceOutput.Init(multiplexer);
    _deviceOutput.Play();

I need to increase the buffer size to reduce pops and clicks in the output audio. How can I set up the buffer size through code?

like image 816
dante_dubon Avatar asked Feb 22 '26 14:02

dante_dubon


1 Answers

I'm afraid the ASIO API offers no standardized way to set the buffer size. What you are expected to do is call the API to show the control panel, which will almost always offer the user a choice of buffer sizes.

like image 117
Mark Heath Avatar answered Feb 25 '26 06:02

Mark Heath



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!