音频输入C ++示例 [英] Audio input C++ example

查看:92
本文介绍了音频输入C ++示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想知道somabody能否为每个样本数据流处理24位使用一个很好的例子?



显然需要

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

方法仅限于16位。



有人可以向我确认这些信息吗?



我的尝试:



methods are limited to 16 bit.

Could somebody confirm me that info ?

What I have tried:

I have found the following sample:



简单的录音程序 [ ^ ]



从我查看过的代码中,它固定为16位样本和当我尝试从24位音频设备读取时,它只是格式化为16位。



如果有人能指出我有关查询的相关信息会很好。

非常感谢你。



MiQi


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

推荐答案

GitHub上的这个库支持24位音频录制:

GitHub - kmatheussen / jack_capture:用千斤顶录制声音文件的程序 [ ^ ]

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.


Hello Everyone,



我已根据以下github示例中的输入实现了一个示例应用程序:



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


再次感谢您的反馈。
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.


这篇关于音频输入C ++示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆