我想在专为Mac OS X Lion 10.7设计的Objective-C应用程序中播放.mp3文件,而不是iPhone。谢谢!
答案 0 :(得分:20)
看一下NSSound
课程:
NSSound *sound = [[NSSound alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"mySound" ofType:@"mp3"] byReference:NO];
[sound play];
[sound release];