Hi I am using MPMoviePlayerController to play a movie in my app. My client wants to boost the audio of the movie that should be greater than iOS system max volume. How to achieve this?
It's impossible to boost volume higher than iOS default settings.
If your client wants louder audio in a video, get them to edit the video content and up the volume of the video's audio (in the case that their video sound is very low).
For example: http://www.youtube.com/watch?v=OvLgQ61wJS8
For iOS, the device user is in control of the volume, you cannot apply sound volume larger than their defined volume or any volume at all if the device is muted.
Related
In my app I have to play the siren sound on tapping the button, I can able to play it when ringer volume is set to some value, but my problem is when user kept their ringer volume to zero, how can I play it with maximum sound?
Officially you can't do this. As a smartphones user, I wouldn't appreciate to set my volume at 10% and have an app that rings at max volume.
You can however try to use Celestial.framework, but your application will be rejected from the App Store.
try this code ,it only work in device
[[MPMusicPlayerController applicationMusicPlayer] setVolume:setvalue];
What would the best method be for mixing background iPod music with sound effects? The sound effects need to be adjustable and sometimes much louder than the background music. When I use MPMusicPlayerController the volume is system-wide and reduces the effects volume as well. I have been reading about AVPlayer and AVAudipPlayer but can't seem to locate a viable solution.
Any help and suggestions would be greatly appreciated.
The problem is that you cannot play much louder sound over iPod music library because as you wrote iPod music use system volume. Unless the music files in your iPod library is compressed with very low volume.
Cocos 2D framework integrates very nice way how to mix-up more sound sources, but again it uses AVAudioPlayer for background music and Open AL for other sounds.
Have you looked at AVAudioSession Categories? I think that could help you with your problem. The docs at Apple.
I tried setting the iPod volume level before, but it affected the volume of my app, which uses MPMusicPlayer. Any solution to this?
If your app is playing music locally (not affecting the iPod app) you can use MPMusicPlayerController to create an application music player and then set the volume property to whatever you want.
MPMusicPlayerController Class Reference
In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.
Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.
AFAIK the standard camera shutter sound cannot be changed via SDK.
This answer supports that. You can replace your own sound by switching sound files, but not in an app.
Some answers such as this one suggest using AVCapture, but this method takes video screenshots, which reduces the image quality. I
t appears that you can't change the shutter sound because you could make it a silent sound, and capturing images covertly is against the App Store policy. See this answer.
TLDR:
The only way to change the shutter sound is to use a video screen grab.
i'm using the code of this link: http://blog.stormyprods.com/2008/09/proper-usage-of-mpvolumeview-class.html
it is working on an ipod touch, but NOT on iphones.
what can be the reason for that?
Two things:
I think iPhone OS 3.0 does a better job of syncing the MPVolumeView slider with changes to the system volume received from the buttons on side. So the workaround on that blog (listening for NSNotifications) may no longer be necessary.
On the iPhone, volume changes are contextual. If your app is currently playing sound, then hitting the volume buttons (or, presumably, MPVolumeView) affects the volume level of your app's audio. But if your app isn't producing sound, then you are just changing the ringer volume. This might explain why your current code works on touches, which don't have ringers.