如何记录iPhone的音频输出? (就像我的应用的声音一样) [英] How can I record the audio output of the iPhone? (like sounds of my app)

查看:99
本文介绍了如何记录iPhone的音频输出? (就像我的应用的声音一样)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想录制我的iPhone-App的声音.因此,就像有人在iPhone乐器上演奏某些东西,然后您就可以听到它.

I want to record the sound of my iPhone-App. So like someone is playing something on a iPhone instrument and after that you can hear it.

如果没有微型,有可能吗?

Is it possible without the micro?

推荐答案

您的意思是您自己构建的应用程序吗?如果是,则可以只保存渲染的波形(可能经过编码/压缩以节省空间),以便以后播放. (请参阅:扩展音频文件服务,它可以将与在Instrument-App中播放音频时要渲染到RemoteAudio单元的文件写入相同的AudioBufferList.

Do you mean an App you build yourself? If yes, you could just save the rendered waveform (maybe encoded/compressed to save space) for later playback. (see: Extended Audio File Services, it can write the same AudioBufferList to a file that you would render to the RemoteAudio Unit when playing audio in your Instrument-App)

使用当前正在使用的AVFoundation,您始终在处理声音文件的级别.您的代码永远看不到实际的音频信号.因此,您无法抓住"您的应用在使用时生成的音频信号.而且,AVAudioPlayer不提供任何获取最终信号的方法.如果您使用AVAudio播放器的多个实例来同时播放多个声音,那么您也将无法获得混合信号.

With the AVFoundation you are currently using, you're always working on the level of the sound files. Your code never sees the actual audio signal. Thus, you can't 'grab' the audio signal that your app generates when it is used. Also, AVAudioPlayer does not provide any means of getting to the final signal. If you're using multiple instances of AVAudio player to play multiple sounds at the same time you also wouldn't be able to get at the mixed signal.

A,您可能需要使用 CoreAudio ,它是一个更底层的接口.

Alas, you probably need to use CoreAudio which is a much more low level interface.

我想提出一种替代方法:为什么不记录音频输出,为什么不记录导致音频播放的动作序列及其时间呢?将此事件序列写到文件中并读回以再现性能"-有点像您自己的MIDI音序器:)

I'd like to suggest an alternative approach: Instead of recording the audio output, why not record the sequence of actions together with their time which lead to the audio being played? Write this sequence of events to a file and read it back in to reproduce the 'performance' - it's a bit like your own MIDI sequencer :)

这篇关于如何记录iPhone的音频输出? (就像我的应用的声音一样)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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