Hello,
I've a problem with riproducing audio in background. The first time I try to play the audio in background doesn't happens nothing, but the second time works. I don't why this happens.
Any suggest?
This is the function for play a sound
-(void)playAudio:(NSString *)path{
NSURL *url = [NSURL fileURLWithPath:path];
NSError *e...
I'm trying to play a very small audio file - it's roughly 0.05s in length, and it's an uncompressed .wav file.
Rgiht now, I'm using AVAudioPlayer to play the sound.
I intend to play the sound with high rapidity alongside a spinner, a la The Price Is Right or Wheel of Fortune. If I instantiate the AVAudioPlayer with a loop count of 100...
Hi All,
In my application, I am displaying multiple images in rows and columns when i click on a image i will play corresponding sound using
someName = [someName stringByAppendingFormat:@".mp3"];
[audioPlayer stop];
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%s", [[NSBundle mainBundle] resourcePath],[someName...
Hello everyone
I think that it's clear from the title...
The Problem:
I already have some objective-c code that uses AVFoundation and its AVAudioPlayer to play some sounds in my iPhone apps, it takes a path for a folder in the documents and plays all the files in it one after the other using an AVAudioPlayer object (I implemented AVAud...
Hello everyone...
I ran audio in the background in my iPhone app using AVAudioPlayer and AVAudioSession...
Now my problem is that I already have a written code that takes a number of songs as input from the user and plays them one after the other using AVAudioPlayer...
The problem is that when the app goes to the background while one ...
Hello guys,
I'm using AVAudioPlayer from iOS SDK for playing short sounds on each click in tableView rows.
I have manually made @selector on button in each row that fires up method playSound:(id)receiver {}. From receiver I get sound url so I can play it up.
This method looks like that:
- (void)playSound:(id)sender {
[audioPlayer ...
Hi All,
In my application i am having 25 images, each image has corresponding music. I am playing the music when clicking on the image using avaudioplayer. But when i am clicking on all the images very fastly i am getting a error in console AudioQueuePrime posting message to kill mediaserverd (20) I am not able to fine why i am getting....
Hello everyone,
I'm trying to play an audio file in iPhone and iPod with AVAudioPlayer,
the code works fine in iPhone and iPod touch 4th generation, I could hear the music.
but when I test it on iPod touch 2nd, iPod touch 3rd, I couldn't hear anything.
Below is the code I use for playing audio file, is there anything I miss here:
NSS...
Hello All,
I have been having problems with stopping the AVAudioPlayer from another class of witch it was initiated in. For example, if I go to "class 1" I can start and stop the audio but if I go to "class 2" Nothing will happen. Also I have [audioPlayer stop]; in class 1 viewWillDissapear and that doesnt work either.
...
else if(seg...
Run into an interesting problem and not sure how to manage it.
What would be the best way to handle the AVAudioPlayer callback method, audioPlayerDidFinishPlaying, if, for example, an instance of AVAudioPlayer is created with a callback for when the audio has finished but the object containing the AVAudioPlayer (and callback) is dealloc...
Well, all is in the title :
I'm trying to use AVAudioPlayer in my app so that when a user initiate a call, the audio resume.
As for now, audio resume correctly in case of incoming phone call (with use of AVAudioPlayerDelegate methods audioPlayerBeginInterruption & audioPlayerEndInterruption).
When if I initiate a phone call, audioPlayer...
I am using a simple bit of code to play an audio file:
NSString *pathToMusicFile1 = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"mp3"];
mySong1 = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:pathToMusicFile1] error:NULL];
NSLog(@"Song1 Loaded");
mySong1.numberOfLoops = -1;
mySong1.volume = 1.0;
[mySong1...
I have tried many methods to implement a regular UISlider and control the device volume, but it's all Native-C functions which results in many untraceable bugs.
I tried the MPVolumeView it works like charm, it even controls the device volume even after you close the app, just like the iPod app.
My question is, is there anyway to custo...
I am working on an interactive children's book for the iPad that has a "read to me" option.
For each page (that has an index), theres an audio clip that produces the "read to me" feature. The feature works well, except for the fact that when I turn the page, the previous pages audio still plays, even when the new audio starts, here's my...
I used the AVAudioPlayer to play a 10 sec wav file and it works fine.
Now I what to stop the wav at the 4th sec and then play it again from the
very 1st sec.
Here is the code I tried:
NSString *ahhhPath = [[NSBundle mainBundle] pathForResource:@"Ahhh" ofType:@"wav"];
AVAudioPlayer *ahhhhhSound =[[AVAudioPlayer alloc] initWithContentsO...
hi made application in which i used avaudioplayer for playing background sound. but i get leak in my project when first time sounds come. can any one guide me how to implement avaudioplayer without leak.
...
I'd like to change the pitch of an audio file by changing the sample rate programmatically. I am recording the file using AVAudioRecorder. I have noticed a settings parameter within AVAudioPlayer, however, it is read only. Can anyone lend a helping hand? :)
...
Is there something extra that i need to do to get AVAudioSessionCategoryAmbient working?
if i choose playback it works fine...which is fine, but i would rather allow background music.
I didn't post code because it works perfectly well if i change my category, so what i really would like a list of the steps i need to take to make it work...
HI, i'm trying to create a repeating dtmf tone so i can play it with AVAudioPlayer. Currently
when i loop it in some audio editing software such as audacity there is always a glitch or change in tone at the point where it repeats. Is there some particular length of time i need to create it to avoid this. I initally created a one second ...
hello all,
in my app i use AudioToolbox framework and i need to play a loop can i ?
this is the AVAudioplayer code that goes slowly with 2 touches simultaneously
- (AVAudioPlayer *)getNoteFromFilename:(NSString *)name andoftype:(NSString *)type{
NSString *soundPath = [[NSBundle mainBundle] pathForResource:name
...