从ios设备的内置扬声器录制音频

时间:2015-01-15 15:23:05

标签: ios objective-c

是否可以从ios设备的扬声器录制音频。

例如,如果我正在播放视频,我想从该视频中提取音频。

如果这个问题含糊不清,我很抱歉。

1 个答案:

答案 0 :(得分:0)

您应该查看AVAudioRecorder类,它是AVFoundation框架的一部分。

来自Apple Docs:

An instance of the AVAudioRecorder class, called an audio recorder,
provides audio recording capability in your application.
Using an audio recorder you can:

- Record until the user stops the recording
- Record for a specified duration
- Pause and resume a recording
- Obtain input audio-level data that you can use to provide level metering

In iOS, the audio being recorded comes from the device connected by the 
user—built-in microphone or headset microphone, for example. 
In OS X, the audio comes from the system’s default audio input device as
set by a user in System Preferences.

了解更多信息click here