How can I sample an audio stream on iOS for visualization regardless of the audio source?

≯℡__Kan透↙ 提交于 2019-12-11 05:14:05

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/47100453/how-can-i-sample-an-audio-stream-on-ios-for-visualization-regardless-of-the-audi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!