简体   繁体   English

是否可以使用麦克风在模拟器上录制实际声音

[英]Is it possible to record actual sound on the simulator using mic

Is it possible record the actual sound on the simulator using the mic. 是否可以使用麦克风在模拟器上录制实际声音。
I have created the recorder which record the sound in simulator but not recording the actual audio its just null(empty) audio. 我创建了录音机,它在模拟器中录制声音但不录制实际音频,它只是空(空)音频。

iOS Simulator does not support audio recording, you should use real device to test. iOS模拟器不支持录音,您应该使用真实设备进行测试。

Here you can read about Limitations of Testing in iOS Simulator 在这里,您可以阅读iOS模拟器中的测试限制

Hardware Limitations While most of the functionality of iOS devices can be simulated in iOS Simulator, there are some hardware features that must be tested directly on a device. 硬件限制虽然iOS设备的大部分功能都可以在iOS模拟器中模拟,但有些硬件功能必须直接在设备上进行测试。 The hardware features that cannot be simulated are: 无法模拟的硬件功能包括:

Accelerometer 加速度计

Gyroscope 陀螺仪
Camera 相机
Proximity Sensor 接近传感器

Microphone Input 麦克风输入

The old answer for this question is now incorrect; 这个问题的旧答案现在是不正确的; the iOS Simulator now supports audio input/recording. iOS模拟器现在支持音频输入/录制。

Pic below related: where you set your audio input device (defaults to your system default) 下面的图片相关:您设置音频输入设备的位置(默认为您的系统默认值)

Also be warned, some online Apple dev docs still say audio input is unsupported by the simulator ("as of 8.2") even though it is with newer versions... 另外要注意的是,一些在线苹果开发者文档仍然说模拟器不支持音频输入(“截至8.2”),即使它是更新的版本......

Edit: Screenshot from OS X 10.12 (Sierra), Xcode 9.1 (function is also available in later Xcode 8, > 8.2) 编辑:OS X 10.12(Sierra),Xcode 9.1的屏幕截图(后面的Xcode 8中也提供了功能,> 8.2)

模拟器上的音频输入选择菜单的照片

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

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