0
点赞
收藏
分享

微信扫一扫

音频播放


播放音频

#import <AVFoundation/AVFoundation.h> // 包含音频的头文件

@property (nonatomic, retain) AVAudioPlayer *play;

铁血丹心" ofType:@"mp3"];

    self.play = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil];

    [self.play play];

    [_play release];

self.play.volume // 音频的音量

举报

相关推荐

0 条评论