首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将RtAudio与核心音频一起使用时,probeDeviceOpen功能失败

将RtAudio与核心音频一起使用时,probeDeviceOpen功能失败
EN

Stack Overflow用户
提问于 2011-07-12 05:40:24
回答 1查看 1.3K关注 0票数 1

我正在尝试写一个C++程序,播放实时处理的音频。我已经决定使用RtAudio,但是不能让测试程序播放音频。

我使用的是Mac,所以我使用./configure --with-coremake进行编译。编译完测试目录中的文件后,我运行./audioprobe返回此列表。

代码语言:javascript
复制
Compiled APIs:
  OS-X Core Audio

Current API: OS-X Core Audio

Found 3 device(s) ...

Device Name = Apple Inc.: Built-in Microphone
Probe Status = Successful
Output Channels = 0
Input Channels = 2
Duplex Channels = 0
This is NOT the default output device.
This is NOT the default input device.
Natively supported data formats:
  32-bit float
Supported sample rates = 44100 48000 88200 96000 

Device Name = Apple Inc.: Built-in Input
Probe Status = Successful
Output Channels = 0
Input Channels = 2
Duplex Channels = 0
This is NOT the default output device.
This is the default input device.
Natively supported data formats:
  32-bit float
Supported sample rates = 44100 48000 88200 96000 

Device Name = Apple Inc.: Built-in Output
Probe Status = Successful
Output Channels = 2
Input Channels = 0
Duplex Channels = 0
This is the default output device.
This is NOT the default input device.
Natively supported data formats:
  32-bit float
Supported sample rates = 44100 48000 88200 96000 

由于内置输出设备是索引2,因此我随后运行了./playsaw 2 44100 2,但出现了一个错误:

代码语言:javascript
复制
RtApiCore::probeDeviceOpen: system error (kAudioHardwareUnknownPropertyError)
    getting stream format for device (2).

如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-30 16:36:53

你用的是Lion (10.7)吗?我看到了同样的问题,在较老的系统(10.6.x)上,RtAudio对我来说工作得很好。

也许你可以降级到RtAudio 4.0.6,这对我在Lion上是有效的,但仍然潜伏着一个关于设备名称的bug,在4.0.8中得到了修复。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6656967

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档