i record some file then play it with :
NSArray *dirPaths;
NSString *docsDir;
dirPaths = NSSearchPathForDirectoriesInDomains(
NSDocumentDirectory, NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
NSString *soundFilePath = [docsDir
stringByAppendingPathComponent:@"temp0.caf"];
//play
[[SimpleAudioEngine sharedEngine] preloadEffect:soundFilePath];
[[SimpleAudioEngine sharedEngine] playEffect:soundFilePath pitch:1.5f pan:0.0f gain:0.3f];
it works at the first time, but second time it plays the same file again even that i have already recorded some other file .
any help ?
Maybe your audio engine is preloading that effect and keeping that preload, try:
Also, when and where is that code called. Its called after your record right? Maybe try:
At the top. Try this, if it doesn't work I need to see your recording code