IOS 播放音乐实例 .
来源:互联网 发布:网店优化技巧 编辑:程序博客网 时间:2024/06/15 22:44
- (BOOL) prepAudio
{
NSError *error;
NSString *path = [[NSBundlemainBundle] pathForResource:@"test"ofType:@"mp3"];
if (![[NSFileManagerdefaultManager] fileExistsAtPath:path])
{
returnNO;
}
self.player = [[AVAudioPlayeralloc] initWithContentsOfURL:[NSURLfileURLWithPath:path] error:&error];
if (!self.player)
{
NSLog(@"Error: %@", [errorlocalizedDescription]);
returnNO;
}
[self.playerprepareToPlay];
returnYES;
}
- (void) play
{
[self.playerplay];
}
- (void) pause
{
[self.playerpause];
}
- (void) stop
{
[self.playerstop];
}
- IOS 播放音乐实例
- IOS 播放音乐实例 .
- IOS循环播放音乐实例
- IOS处理音乐播放中断实例
- Service播放音乐实例
- ios后台播放音乐
- iOS后台播放音乐
- IOS播放音乐
- ios 音乐后台播放
- iOS后台播放音乐
- iOS后台播放音乐
- IOS音乐播放器
- iOS后台播放音乐
- iOS后台播放音乐
- iOS后台播放音乐
- iOS后台播放音乐
- iOS后台播放音乐
- iOS 后台播放音乐
- AheadLib 2.2.150
- 红字冲销法
- php 5.3新增的闭包语法介绍function() use() {}
- hibernate3-maven-plugin配置
- Bing Maps Tile System
- IOS 播放音乐实例 .
- Gallery使用示例(二)
- andriod SDK Manager打不开
- java 鸡兔同笼问题
- 2.物理查询处理
- hdu 2391
- VS2010工程中的*.vcxproj.filters文件
- Gallery使用示例(一)
- Mysql数据库的基本命令