avaudioplayer

How to use AVAudioPlayer to play a playlist in iPhone/iPad

Please I know how to play a sound in AVAudioPlayer but I would like to know how to give it a list of on-disk files to play one after the other (play list) Anyone has any idea? ...

iTunes app preview player

Hey there, Any ideas where to begin if I'm trying to create a preview player like the one in the iTunes app for the iPhone? Essentially I'm looking to build a circular progression player that uses the AVAudioPlayer. I have no idea where to begin. Thanks, Howie ...

I want to play mp3 files on my server with AVAudioPlayer

I want to play mp3 files on my server with AVAudioPlayer I've tried this code, but it does not work. -(IBAction)playSound { NSString *path = [[NSBundle mainBundle] pathForResource:@"http://www.domain.com/audio/test.mp3"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NU...

Audio Session "Ducking" Broken in iOS 4...?

Hello all, I've an app which uses the MPAudioPlayerController to access the iPod music library, and an AVAudioPlayer to overlay audio on top of the music. I've used this documentation as a guide. Specifically: Finally, you can enhance a category to automatically lower the volume of other audio when your audio is playing. This could...

iphone: playing audio playlist in the background?

Hi guys, I'm trying to play sequence of audio files in the background using AVAudioPlayer. When the app is not in the background it plays well, but when the app goes to the background it won't play the second song. Here is my code: -(void)playAudio:(NSString *)path{ NSURL *url = [NSURL fileURLWithPath:path]; NSError *error...

Generate DTMF tones to be played by the iPhone.

Hi! I want to develop an application for the iPhone that generates custom DTMF tones. I assume the pure tone will be played from a memory buffer and not from an uploaded file, and I think I should use AVAudioPlayer class and the method "initWithData:error:", but how do I implement it? Whatever I do, I can't make it work! I saw this cod...

iphone sdk: Is it possible to play audio playlist in the background in iOS 4

I tried to implement this. My original post is here http://stackoverflow.com/questions/3297571/iphone-playing-audio-playlist-in-the-background So after some testing I begin to doubt whether it's even possible. does anyone know whether it's possible to use AVAudioPlayer to play multiple tracks in the background? I myself haven't found a...

Seemingly Simple AVAudioPlayer code will not play audio file on iPhone

I am trying to play a short sound whenever clicks a button on the iPhone; however, for some reason whenever I click the button (which calls the playClickSound method below), no sound plays. I have the project linked with AudioFoundation.framework and the sound file (clickSound.mp3) in the Resources folder of my application bundle. Can so...

iPhone SDK: Observe current time of AVAudioPlayer

Hi, is there a best practice for getting an event on every second of playback of an AVAudioPlayer instance? I need to change a view automatically depending on the current playback time. Thank You! ...

How to get AVAudioPlayer output to Speaker and verify if i am right on iphone simulator?

Hello I got some questions on playback music via speaker. i found an example in the following link http://stackoverflow.com/questions/1022992/how-to-get-avaudioplayer-output-to-the-speaker but the question is how to make sure i successfully implemented playing music via "speaker"? I wrote the code as the link, but it seems no difference ...

Record/Save Sound iPhoneOS

Hi, I have to record sound files in my application and saved so that the user can access them later.Can anyone recommends any APIs for this and suggest any portion of documentation to study or blogs/tutorials if any. Thanks Tamur ...

can i have mic detection value in decibel range 0.0 to 120.0

Now I m using the class AVAudioPlayer . But still i m not getting right value in decibel. there is any way to get the value in decibel range 0.0 to 120.0 (not in -0.0 to -120). if yes then plz tell me some body.... ...

Access iPhone's Bluetooth and normal audio session at the same time?

Hey guys, I have a bit of an interesting problem and I'm not sure how to go about solving it. I need to take the audio from a connected bluetooth headset and pipe it directly to the speaker on the iPhone's device and vice-versa. Accessing the Bluetooth audio session is easy enough: // Use a Play and Record Category, because we'll be bot...

AVAudioPlayer doesn't work after 248 times

I am developing an application that involves clicking a button repeatedly, and I am giving an audio feedback for this click, a click wave file. it works fine, but I have a problem, after exactly 248 times, the sound is not played any more, the app doesn't crash however. and I get the following error: Error Domain=NSOSStatusErrorDomain ...

Audio playback does not start

NSError *err; // Initialize audio player audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&err]; audioPlayer.delegate = self; [audioPlayer play]; With the code above, I'm trying to initialize playback of a .mp3 file, however the playback does not start at all. There is no sound. What am I doing wrong? I have inspe...

playing iPod music and avaudioplayer together

I am trying to write an application where the user records a sound and would be listening to the same with a background music from music library. However, when i try to play the recorded file using AVAudioplayer, the background music (iPod Player) is going very low and not audible. Is there any session property i need to set for playing ...

How do you use AVAudioPlayer to play music while in the background?

I currently use AVAudioPlayer to play music while in the foreground, but when I press the home button my application goes to the background and the music stops. I set the category for my AVAudioSession to AVAudioSessionCategoryPlayback and set active to YES. Additionally, I added the audio key to UIBackgroundModes in my Info.plist. Is...

AVAudioPlayer leak in Simulator

Hi, I have the following code, that leaks in instruments when running in simulator ( memomry allocation is stable though) and is fine on the device. The code gets called everytime a button gets pressed. Im a newbie - so any help and comments welcome :-) if ( audioPlayer){ if ( [audioPlayer isPlaying] ) { [audioPlayer stop];...

Disable in App sounds

Hi all, I have a question regarding sounds in my app. I need the user to be able to mute all sounds coming from my game, for example if they just want to listen to the ipod while playing. There is a similar question here http://stackoverflow.com/questions/1147555/disable-all-program-sounds but there doesnt seem to be an answer. At the ...

Generating a DTMF tone doesn't work - application crashes!

Hi, I want to generate a custom DTMF tone and play it on the iPhone. In order to do so, I have created and allocated a memory buffer with a custom tone (ptr). Now I want to create a NSData object, initialized with the memory buffer, and pass it to AVAudioPlayer using initWithData:error: instance method. I wrote the following code, but ...