Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Commented Unassigned: Wrong BitsPerSample with WasapiLoopbackCapture [16401]

$
0
0
Hello

I have a 24 bits per sample / 192kHz sound board and I am using the Wasapi Loopback Capture method to get data from it.

When I print out the capabilities of the board, it shows 32 bits per sample instead of 24 bits per sample...

```
private void button2_Click(object sender, EventArgs e)
{
waveIn = new WasapiLoopbackCapture();
waveIn.DataAvailable += OnDataAvailable;
waveIn.RecordingStopped += OnRecordingStopped;
waveIn.StartRecording();

Console.WriteLine(waveIn.WaveFormat.BitsPerSample);
Console.WriteLine(waveIn.WaveFormat.AverageBytesPerSecond);
Console.WriteLine(waveIn.WaveFormat.Channels);
Console.WriteLine(waveIn.WaveFormat.SampleRate);
Console.WriteLine(waveIn.WaveFormat.Encoding);
}
```

Which prints out...

```
32
1536000
2
192000
Extensible
```

If I check the e.Buffer data that the callback delivers, I see that most of the bytes have data indeed, but I was hoping to see 3 bytes with data and then an empty byte (24 bits and a spare byte), but all bytes have data.

So, how should I merge those bytes and in which order?

The Audio Board specs are:

Realtek Semiconductor Corp.
Audio driver 6.0.1.5919
DirectX 11.0
ALC889A

Thanks!
Comments: Linketo, what do you mean by " ata[] contains the left and right channels, make sure to separate them in your application." why do you have to separate them? how would you separate them?

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>