无论音频源如何,如何在iOS上采样音频流以进行可视化? [英] How can I sample an audio stream on iOS for visualization regardless of the audio source?

查看:207
本文介绍了无论音频源如何,如何在iOS上采样音频流以进行可视化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是创建一个iOS音频可视化器,而不是一个使用AVPlayer或任何其他类似衍生产品的可视化器,而是一个能够解析音频信号并创建音频可视化文件的应用程序,而与正在播放该应用程序的应用程序无关.例如,如果正在播放Spotify或iTunes正在播放.据我了解,除非应用程序明确允许,否则您将无法实用地访问该流.我想到的另一种方法是使用麦克风,但是从我注意到的情况来看,使用麦克风会杀死音频输出...不确定这是否是可选的.也许我错过了有关iOS音频系统工作原理的一些信息.有什么方法可以实现我的目标.

I'm interested in creating an iOS audio visualizer, not one that uses AVPlayer or any other similar derivatives, but one that is able to parse through an audio signal and create an audio visualization regardless of the application that is playing it. For instance, if Spotify is playing, or iTunes is playing. From whatI understand, you don't have access to that stream pragmatically unless the application specifically allows it. Another approach I was thinking of was to use the microphone, but from what I have noticed, using the Microphone kill the audio output ... not sure if this is optional or not. Perhaps I missing something about how the iOS audio system works. Is there any way to achieve what I am trying to do.

推荐答案

仅当音频输出应用正在使用Inter-App-audio或Audiobus导出音频数据时.否则,iOS安全沙箱将隐藏您应用中的音频输出.

Only if the audio output app is exporting the audio data using Inter-App-audio or Audiobus. Otherwise the iOS security sandbox will hide that audio output from your app.

这篇关于无论音频源如何,如何在iOS上采样音频流以进行可视化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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