我想读取MP3文件与AVAudioPlayer读取MP3文件与AVAudioPlayer
#import <AVFoundation/AVFoundation.h>
AVAudioPlayer *player;
@property(retain,nonatomic) AVAudioPlayer *player;
@synthesize player
-(IBAction) lirepiste
{
NSString *file [email protected]"http://media.islamway.net/lessons/othymeen/40nowaweyya/1.mp3";
player = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL URLWithString:file,error:nil];
[player play];
}
没有错误没有崩溃,但也没有读
我忘了将AVFoundation框架添加到我的项目中,对不起=) – 2013-01-15 08:50:59