【发布时间】:2011-11-20 01:21:42
【问题描述】:
这是我所拥有的:
-(void)awakeFromNib {
NSString *path = [[NSBundle mainBundle] pathForResource:***AUDIOFILE*** ofType:@"mp3"];
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path]
error:NULL];
[theAudio play];
编码很好,除了我不知道如何调出我的资源来播放声音或其他什么。
【问题讨论】:
-
你永远不会在 Xcode 中播放音频文件——它只是一个 IDE
标签: iphone objective-c cocoa-touch audio