I have a sound that plays in a loop when noise is recorded using AVAudioRecorder.
Here is my code:
NSString *pathToFile = [[NSBundle mainBundle] pathForResource:@"foghornRepeat2" ofType:@"aif"];
foghornRepeat =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:pathToFile] error:nil];
[foghornRepeat prepareToPlay];
foghornRepeat.numberOfLoops = -1;
[foghornRepeat setVolume:1];
Then playback and stop occurs when recording sound through a microphone. Any idea why it would be really quiet on the iphone? This is good on my iPod touch.
Is there any other way I can do this?
Thanks tom
source
share