How to get the current output dB values of background music to display a sound level meter in iOS? - iphone

Is there an easy way to read current dB sound level values of what iOS it putting out to the speakers / or from background music that is playing?

No. An app can not get the audio output levels for the sound that any other app, for instance a background music player, is currently playing.

Related

iOS - Access output audio from background program

Scenario: My app is running in the background. An iPhone/iPad user launches the iPod app (or Pandora or another program that plays audio) on their device and starts playing music. My app detects that that music is now playing, and records or in some way does things with the current playing audio (like stream it to a server), all while still running in the background.
Is this possible? Can anyone point me in the right direction in the SDK on how to do this?
You can't do this. And that is that.

Play video's audio track when enter background?

I'm using mpmovieplayer to play video on ios 4, and I want to keep the audio playing when my app enter background, but it doesn't work. I thing it's because video player use GPU to render video on screen and this is not allowed by apple when app enter background.
So, is there any way to do that? There are some apps have this feature, and they seems just use the mpmovieplayer, is it work by detach the video layer of mpmovieplayer?
Thanks for your answer!
You'll need to have separate audio file and video file for this. Play both when you need to play video and just the audio when app gets into background.

Monitor iPhone's mic level without pausing iPod

I'm using AVAudioRecorder to get the current level of the microphone, but it pauses any iPod music that's playing and won't let the user unpause it. Is there a way of getting the two to work together?

Can a iPhone voice Recorder App always run in Background recording the Sounds and Play them?

Can a App record the Voice in the surroundings even when it runs in the background and play the recorded audio? Is it possible?
Multitasking doesn't allow audio recording to be in the background, so no.

AVAudioPlayer can play while iPhone screen is locked; can it record at that time too?

You can easily play sounds and record sounds using the high level AVAudioPlayer. And you can play sounds using the same framework, while the iPhone screen is locked. Can you record sounds at that time?
Yes, of course, just set correct category....................................................................................................................................
""AVAudioSessionCategoryRecord
For recording audio; this category silences playback audio. Recording continues with the screen locked.
Available in iPhone OS 3.0 and later.
Declared in AVAudioSession.h.
AVAudioSessionCategoryPlayAndRecord
For recording and playback of audio—simultaneous or not—such as for a VOIP (voice over IP) application.
This category silences audio from other applications, such as the iPod. You can, however, modify this category to allow mixing by using the kAudioSessionProperty_OverrideCategoryMixWithOthers property. Your audio continues with the Ring/Silent switch set to silent and with the screen locked.