Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everyone,

I wonder if somabody could point me a good example using the to handle 24 bits per sample data stream ?

Apparently
WAVEFORMATEXTENSIBLE
is needed to get more information about the audio hardware.

It seems from what I have read
waveInxx
methods are limited to 16 bit.

Could somebody confirm me that info ?

What I have tried:

I have found the following sample:

Simple audio recording program[^]

From the code I have reviewed it is fixed to 16 bitspersample and when I try to read from the 24 bit audio device it is just formatted into 16 bit.

It would be nice if someone could point me to relevant information about my query.
Thank you very much in advance.

MiQi
Posted
Updated 11-Dec-18 23:37pm

This library on GitHub supports 24 bits audio recording:
GitHub - kmatheussen/jack_capture: A program for recording soundfiles with jack[^]
jack_capture  [--bitdepth n] [--channels n] [--port port] [filename]
              [ -b        n] [ -c        n] [ -p    port]

"bitdepth" is by default FLOAT. It can be set to either 8, 16, 24 or 32.
 
Share this answer
 
Comments
SuperMiQi 11-Dec-18 7:31am    
Hello Rick,

Thank you for your input.
I have continued my research on the web and found articles about WASAPI.
Do you know good easy tutorial related to Windows Core audio in c++ or even in c# ?
Thank you very much in advance
Best regards.
MiQi
SuperMiQi 11-Dec-18 7:42am    
Hello everyone
Does NAudio support 24 bits per sample in recording mode ?

Thank you.
RickZeeland 11-Dec-18 12:48pm    
This is not clear from the NAudio documentation, it will be best to post this as a new question as it is not C++ and your reply here will not be noticed by other CodeProject members.
Hello Everyone,

I have implemented a sample app based on the inputs found on the following github example:

Csharp-Data-Visualization/projects/18-09-19_microphone_FFT_revisited at master · swharden/Csharp-Data-Visualization · GitHub[]

Thanks again for your feedback.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900