avaudioplayer

Lower iPod volume to play app sound (like the native SMS app)

I've made an iPhone app to be used while exercising. It plays a bell tone to indicate that you (the user) should switch from one step of your exercise routine to the next. I've designed the app so that you can listen to music on the iPod while using the app, and I want the tone to play sufficiently audibly over the music. I've gotten t...

Iphone development : Play MPMediaCollection using AVAudioPlayer

Hi.. I am trying to play music in ipod library using AVAudioPlayer. I have added the music items to using MPMedia framework but do not know how to read the MPMediaCollection so that they can passed to the AVAudioPlayer. Thanks for your help ...

Can not turn off the sound when using SCListener

I use SCListener to listen the input from mic,and use AVAudioPlayer to play the music.They all work will. However, I found some problem: I try to turn off the sound(Ring/Silent), but the sound effect still be played. ps:I use kAudioSessionCategory_PlayAndRecord to play the music and listen the input from mic,Is it something wrong? Can a...

About MPMusicPlayerController and does AVAudioPlayer works in iPhoneSimulator?

From http://stackoverflow.com/questions/2111866/iphone-can-i-do-audioservicesplaysystemsound-looping-with-scheduler MPMusicPlayerController doesn't work because it is about iPod music library and I can't add a music file to it since I'm doing an iPhone game and not interacting with the outside iPod library. Does AVAudioPlayer works in ...

Stopping playback on an AVAudioSession on screen lock

Hi everyone, I have an AVAudioSession under a AVAudioSessionCategoryPlayback category. I need to be able to stop or pause playback when the screen is locked. Is there any way to achieve this? So far the only thing that produces an interruption to my audio session is an incoming call. Thanks in advance! ...

iPhone: How to play a sound at a particular time?

Hi. I have written the following code: -(void)runTimer { myTicker=[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(showActivity) userInfo:nil repeats:YES]; myTicker = [NSTimer scheduledTimerWithTimeInterval:60.00 target:self selector:@selector(vibrate) userInfo:nil repeats:YES]; } -(void)showActivity...

How to debug a AVAudioPlayer play failure?

I'm using an AVAudioPlayer to play a mono AIFF file from my app's Documents directory. On the simulator, [player play] returns YES and I hear the file playing. On the device the play method returns NO and nothing happens. I grabbed the file via the Organizer - it plays back fine on my Mac and seems to be well-formed. I realize the simul...

Playing mp3 on iphone sdk?

-(IBAction)musiconButtonClicked:(id)sender{ NSString *path = [[NSBundle mainBundle] pathForResource:@"NextRevIt" ofType:@"mp3"]; AVAudioPlayer* audioPlayer = [[AVAudioPlayer alloc ] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; [audioPlayer play]; } -(IBAction)musicoffButtonClicked:(id)sender{ [audioPl...

iPhone: AVAudioPlayer/NSURL memory management

I posted a much longer question a few minutes ago, and as it usually goes as soon as I posted it I realized what was going on, so I deleted it since most of the post was irrelevant. Then I went back to Google. Turns out I'm having almost the same exact problem as described in this post, unanswered from June. http://www.iphonedevsdk.com/...

Find out if AVAudioPlayer finished playing inside a function

How can you find out if a AVAudioPlayer finished playing a sound inside of a function? ...

MP3 playback and stop issue?

This code works fine until I exit the view and try to come back into it. If I do this, the stop button no longer works. How do I get it to still work after leaving the view? -(IBAction)musiconButtonClicked:(id)sender{ NSString *path = [[NSBundle mainBundle] pathForResource:@"NextRevIt" ofType:@"mp3"]; self.audioPlayer = [[AVA...

AVAudioPlayer initialization error 1685348671. How to check whether file is valid?

Hi I am using AVAudioPlayer to play some ima4 files. The initialization of the player keeps failing with error code 1685348671 (dta) which according to the documentation means The file is malformed, not a valid instance of an audio file of its type, or not recognized as an audio file. Available in iPhone OS 2.0 and later. Wh...

AVAudioPlayer won't play audio file after AVAudioRecorder

I create a .caf audio file using AVAudioRecorder and if I try and play it back using AVAudioPlay I get no sound on the iPhone (if played in simulator works fine). If I close my application and reopen the file plays fine. Also I am not able to adjust the phone volume after recording unless I close and reopen my application. Any ideas? ...

Problem Playing Audio Iphone

Hi, I'm just trying to get a simple mp3 player working. I'm getting an error that I don't really understand. I have an instance of AVAudioPlayer declared in my h file and I synthesize it in my .m file.... Undefined symbols: ".objc_class_name_AVAudioPlayer", referenced from: literal-pointer@__OBJC@__cls_refs@AVAudioPlayer in P...

Where should I kill my AVFoundation AudioPlayer

Hi, My application consists of a table view. When a cell is touched the navigation controller moves to a tab bar controller and the "root" view of the tab bar controller has a button that plays an mp3. My question is this. When a user clicks the back button to go back to the table view and there is currently audio playing, how do I sto...

avaudioplayer playback progress

Hi, Would anybody have a link to a tutorial to add a playback progress bar to AVAudioPlayer? I've searched extensively on this site and on google to no avail ...

"Cannot find executable for CFBundle/CFPlugIn" error

Cannot find executable for CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded) Cannot find function pointer NewPlugIn for factory C5A4CE5B-0BB8-11D8-9D75-0003939615B6 in CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded) That's the error I get when I try t...

AVAudioPlayer: How to Change the Playback Speed of Audio?

I want to control the playback speed of audio in AVAudioplayer. Is this possible? If so, how would you do it? ...

Fade In and Out Audio in iPhone SDK

Hi Everyone: I am wondering if there is some way to fade in and out audio using AVAudioPlayer in CocoaTouch, with a pause command once the music finishes fading and then a play command once the fading begins. I have heard that one can use NSTimer for this purpose, but I am unsure of the easiest way to accomplish this. Thanks for any h...

iPhone SDK: Change playback speed using core audio AVAudioPlayer

I'd like to be able to play back audio I've recorded using AVAudioRecorder @ 1.5x or 2.0x speed. I don't see anything in AVAudioPlayer that will support that. I'd appreciate some suggestions, with code if possible, on how to accomplish this with the iPhone 3.x SDK. I'm not overly concerned with lowering the pitch to compensate for increa...