简体   繁体   English

AudioKit - 没有声音输出

[英]AudioKit - no sound output

I try to use AudioKit to ouput a pure sine wave. 我尝试使用AudioKit输出纯正弦波。 https://github.com/AudioKit/AudioKit I've tried to set up a new project like on there homepage, and also tried there "Hello World" Example, included in the AudioKit Download. https://github.com/AudioKit/AudioKit我试图在那里建立一个新的项目,并在那里尝试了“Hello World”示例,包含在AudioKit下载中。

Both builds fine, and the Hello World example displays the generated sine wave, correctly on the screen, but there is no sound playing, I can't hear anything. 两者都构建良好,Hello World示例在屏幕上正确显示生成的正弦波,但没有声音播放,我听不到任何声音。 I've set the volume to max and tried with other apps, if they were playing audio fine, and they do. 我已经将音量设置为max并尝试使用其他应用程序,如果他们播放的音频很好,他们就可以。 Are there any suggestions? 有什么建议吗?

I am using Xcode 8.3.3 and as device an iPad Mini 2 with iOS 10.3.1 我正在使用Xcode 8.3.3和iOS 10.3.1的iPad Mini 2设备

Thank you 谢谢

By default, AudioKit is configured to not play audio while the device is in silent mode. 默认情况下,AudioKit配置为在设备处于静音模式时不播放音频。 In order to do this, just add the following line before starting AudioKit: 为此,只需在启动AudioKit之前添加以下行:

AKSettings.playbackWhileMuted = true
try! AudioKit.start()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM