$aleOrigin

Audio

Please consider subscribing to Mobile Developer Tips
RSS feed or following us on Twitter


Volume Control Alert

If you need a quick and dirty volume control, an alert specifically tailored for this purpose is included in the MediaPlayer framework. The alert looks as follows:: To display the alert, adding the following code and include the MediaPlayer framework in your project:

Audio

Playing Sounds/Audio – AVAudioPlayer

I previously wrote about using Audio Session Services which offers a quick and easy approach for playing short sounds. However, there are a number of limitations, including no control over the volume, playing time is limited to 30 seconds and the only file types supported are AIFF, WAV and CAF. Sounds with AVAudioPlayer AVAudioPlayer offers [...]

Audio

Silent Mode Switch and Playing Sounds

In a previous tip, Playing Short Sounds, I wrote an example to show how you can play a short sound, up to 30 seconds, by calling one of the C-based functions in the Audio Session Services library. There is one aspect of this that can be troublesome – by default, playing an Audio Session sound [...]

Audio

Playing Sounds/Audio – Audio Session Services

If you need to play short sounds, less than 30 seconds, Audio Session Services are your friend. Here is a snippet of code to play a wav file: SystemSoundID soundID; NSString *path = [[NSBundle mainBundle] pathForResource:@"RapidFire" ofType:@"wav"];   AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path],&soundID); AudioServicesPlaySystemSound (soundID);

Audio
All Content Copyright © 2008-2012 • Mobile Developer Tips, All Rights Reserved.
iPhone and iPad are registered trademarks of Apple, Inc.
iOS is a registered trademark of Cisco Technology, Inc.