j'ai du son sur le simulateur pas sur l'IPAD

jfrey

Membre enregistré
2 Septembre 2011
1
0
58
HAAAA je deviens fou, j'ai suivi pas à pas le tutoriel suivant

http://www.youtube.com/watch?v=dcLcZqJsHMc



ce programme fonctionne correctement en mode simulateur mais pas en mode device sur l'IPAD
voici mon code

pour le .m


Bloc de code:
#import "TestSon2fileViewController.h"
#import <AVFoundation/AVFoundation.h>
 
@implementation TestSon2fileViewController
 
- (IBAction)playSound1 {
NSString *path=[[NSBundle mainBundle] pathForResource:@"gagne01" ofType:@"mp3"];
AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL : [NSURL fileURLWithPath: path] error:NULL];
theAudio.delegate=self;
[theAudio play];
}
 
- (IBAction)playSound2 {
NSString *path=[[NSBundle mainBundle] pathForResource:@"perdu1" ofType:@"mp3"];
AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL : [NSURL fileURLWithPath: path] error:NULL];
theAudio.delegate=self;
[theAudio play];
}
et pour le .h
Bloc de code:
#import <UIKit/UIKit.h>
 
@interface TestSon2fileViewController : UIViewController {
 
 
}
 
- (IBAction)playSound1;
- (IBAction)playSound2;
 
 
@end
que ce passe t il est qu'il est possible que j'ai un problème avec mon IPAD ou une initialisation mal faite ?