NSString *urlPath = [[NSBundle mainBundle] pathForResource:@"" ofType:@""];

NSURL *url = [NSURL fileURLWithPath:urlPath];

self.player = [[AVAudioPlayer alloc]initWithContentsOfURL:url error:nil];

self.player.volume = 5;

self.player.numberOfLoops = 0;

[self.player play];

@import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

iOS AVAudioPlayer 提示音的更多相关文章

  1. ios系统提示音的使用(不是铃声)

    AudioServices Jump to: navigation, search AudioServices is a group of C functions in AudioToolbox fo ...

  2. ios开发小技巧之提示音播放与震动

    在ios开发中,有时候我们需要频繁播放某种提示声音,比如微博刷新提示音.QQ消息提示音等,对于这些短小且需要频繁播放的音频,最好将其加入到系统声音(system sound)里. 注意: 需要播放的音 ...

  3. 关于微信内置浏览器在ios上播放提示音的经验分享

    document.addEventListener("WeixinJSBridgeReady", function () { window.audio= new Audio() w ...

  4. iOS 提示音播放

    首先找到对应的素材 音频文件 写一个类继承 NSObject 命名为AudioUtil 导入支撑文件 #import <AVFoundation/AVFoundation.h> #impo ...

  5. iOS下WebRTC音视频通话(二)-局域网内音视频通话

    这里是iOS 下WebRTC音视频通话开发的第二篇,在这一篇会利用一个局域网内音视频通话的例子介绍WebRTC中常用的API. 如果你下载并编译完成之后,会看到一个iOS 版的WebRTC Demo. ...

  6. Xamarin.iOS调试提示需要iOS SDK

    Xamarin.iOS调试提示需要iOS SDK   错误信息:The version of Xamarin.iOS requires th iOS 9.3 SDK (shipped with Xco ...

  7. Xamarin.iOS项目提示error MSB3174:”TargetFrameworkVersion”的值无效

    Xamarin.iOS项目提示error MSB3174:”TargetFrameworkVersion”的值无效 错误信息:MSBulid\14.0\bin\Microsoft.Common.Cur ...

  8. Android笔记: 播放提示音 的简单方法

    public static void sendSound(Context mContext) { //上下文 Uri mUri= RingtoneManager.getDefaultUri(Ringt ...

  9. 背水一战 Windows 10 (107) - 通知(Toast): 提示音, 特定场景

    [源码下载] 背水一战 Windows 10 (107) - 通知(Toast): 提示音, 特定场景 作者:webabcd 介绍背水一战 Windows 10 之 通知(Toast) 提示音 特定场 ...

随机推荐

  1. Ubuntu常用命令与技巧

    sudo apt-get install 软件名 安装软件命令 sudo nautilus 打开文件(有root权限) su root 切换到“root” ls 列出当前目录文件(不包括隐含文件) l ...

  2. write a macro to judge big endian or little endian

    Big endian means the most significant byte stores first in memory. int a=0x01020304, if the cpu is b ...

  3. fuck WPFG.org

    今天一旦进入国外网站,就立刻跳转到WPFG.org.可能DNS被劫持污染了吧.用OpenDNS就行了.然后就没有这回事发生了 参考以下: https://www.opendns.com https:/ ...

  4. Spring 的优秀工具类盘点第 2 部分

    特殊字符转义 由于 Web 应用程序需要联合使用到多种语言,每种语言都包含一些特殊的字符,对于动态语言或标签式的语言而言,如果需要动态构造语言的内容时,一个我们经常会碰到的问题就是特殊字符转义的问题. ...

  5. 运行tomcat7w.exe tomcat7.exe ,提示 指定的服务未安装 unable to open the service 'tomcat7'

    运行tomcat7w.exe tomcat7.exe ,提示 指定的服务未安装 unable to open the service 'tomcat7'(用的是绿色的Tomcat7) 解决方法: 打开 ...

  6. python字符串(移除空白,长度,索引,分割,切片,拼接,格式化输出)

    常用功能: 移除空白: >>> name = "meng" >>> name 'meng' >>> name.strip() ...

  7. web项目跨域访问

    1.同域相互访问 假设A.html 与 b.html domain都是localhost (同域) A.html中iframe 嵌入 B.html,name=myframe A.html有js fun ...

  8. HBase二级索引的设计(案例讲解)

    摘要 最近做的一个项目涉及到了多条件的组合查询,数据存储用的是HBase,恰恰HBase对于这种场景的查询特别不给力,一般HBase的查询都是通过RowKey(要把多条件组合查询的字段都拼接在RowK ...

  9. 如何单独编译Android源代码中的模块

    文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6566662 第一次下载好Android源代码工 ...

  10. c++11 之 decltype

    在C++中,decltype作为操作符,用于查询表达式的数据类型.decltype在C++11标准制定时引入,主要是为泛型编程而设计,以解决泛型编程中,由于有些类型由模板参数决定,而难以(甚至不可能) ...