iOS4: Multitasking and measuring audio output [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.开发者_开发技巧
Closed 11 years ago.
Improve this questionI need to develop an iPhone/iPod application which runs in the background and can measure audio output. It is part of a research project to measure how loud people have their music. Unfortunately I am unfamiliar with the iOS 4 SDK.
Ideally, the application would have to know if headphones are plugged in, be able to measure the volume of the audio signal being outputted (and calculate some data) and then be able to, at some point, update data to a central database.
Taking into account the multitasking capabilities, is it possible to develop such an application for the iOS 4?
I am aware that multitasking on this platform is quite limited, however I also noticed that audio processing seems to be possible (only to an extent perhaps?)
Here's a question which shows how it can done, but unfortunately, you can only do it for your app (or more correctly, I should say only when your app is active), you can't add a global hook to be notified in the background when the volume is changed by another app.
iOS (4) doesn't have background services like Android which is what I believe you're looking to do.
精彩评论