播放 WAV文件

            string s = @"D:\Administrator\安装文件\完美世界国际版\patcher\skin\sounds\click.wav";
            System.Media.SoundPlayer player = new System.Media.SoundPlayer(s);

player.PlaySync();



            player.Play();//简单播放一遍
            player.PlayLooping();//循环播放

player.PlaySync();//另起线程播放




播放 资源中的WAV文件

            System.IO.Stream s =  Properties.Resources.click;
            System.Media.SoundPlayer player = new System.Media.SoundPlayer(s);

player.PlaySync();


选中项目-属性-资源-添加WAV文件 这种方法添加 进来
直接右键添加进来是不行的

play wav sound的更多相关文章

  1. 如何将Wav文件做到EXE文件里

    1)编写.RC文件 ..RC文件是资源的源文件,编译器也就编译这个文件,生成.RES的资源文件 首先在我们的项目子目录中建立一个纯文本文件,起名叫Sound.rc,文件中 有一行,内容为: SOUND ...

  2. 在DELPHI中*.wav 文件怎么加到资源文件中

    比较“流行”的说法是:“16位的Delphi   1.0和32位的Delphi2.0.3.0都提供了资源         编译工具,其中   Delphi   1.0的资源编译器叫BRCC.EXE,D ...

  3. [转]ANDROID NOTIFICATIONS USING CORDOVA AND IONIC

    本文转自:http://intown.biz/2014/04/11/android-notifications/ ANDROID NOTIFICATIONS USING CORDOVA AND ION ...

  4. TN035: Using Multiple Resource Files and Header Files with Visual C++

    TN035: Using Multiple Resource Files and Header Files with Visual C++ This note describes how the Vi ...

  5. [转]PhoneGap使用PushPlugin插件实现消息推送

    本文转自:http://my.oschina.net/u/1270482/blog/217661 http://devgirl.org/2013/07/17/tutorial-implement-pu ...

  6. CG&Game资源(转)

    cg教程下载: http://cgpeers.com http://cgpersia.com http://bbs.ideasr.com/forum-328-1.html http://bbs.ide ...

  7. haxe 中使用音效

    将wavSound.wav音效文件放到assets/sounds下, 在project.xml加入以下代码: <assets path="assets/sounds" ren ...

  8. 用mp3stego来加密与解密文件的几次尝试

    用法来自实验吧的"Canon"隐写题目的灵感. 先来简单的聊一下这道题目,打开题目后发现了一个mp3文件,除此之外还有一枚压缩包.然而压缩包是加密的,看来我们需要通过解出来mp3里 ...

  9. qt Multimedia 模块类如何使用?

    qt 多媒体模块介绍 类名 英文描述 中文描述 QAudioBuffer Represents a collection of audio samples with a specific format ...

随机推荐

  1. HDU 2369 Broken Keyboard(字符串)

    点我看题目 题意 : 这个人的键盘坏了,最多只能按n个键,给你一串字符串,问你找一个最长的字串,这个字串中包含的不同的字母不能超过n个. 思路 : 比赛的时候脑子没转过来,一直没模拟出来,都不知道怎么 ...

  2. 中国海洋大学第四届朗讯杯高级组 I Cuckoo for Hashing

    http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2719&cid=1203 题意 :意思就是哈希来的,具体大意就是说有两个哈希表,然后有这样 ...

  3. 练习--LINUX进程间通信之无名管道PIPE

    IBM上放的这个系统不错,刚好可以系统回温一下LINUX的系统知识. http://www.ibm.com/developerworks/cn/linux/l-ipc/part1/ 感觉年纪大了,前几 ...

  4. Ci框架整合smarty模板引擎

    Ci框架整合smarty模板引擎 备注:下载smarty时,最好选择2.6版本,其他测试有坑,ci可以是2.2或其他 大体思路:将smarty封装成ci框架的一个类,然后重新配置一下smarty,这样 ...

  5. Java异常处理之throws抛出异常

    package com.test; import java.io.FileReader; public class Test2 { public static void main(String[] a ...

  6. 自定义的IntentFileter 无法找到activity

    <intent-filter > <action android:name="com.leo.enjoytime.VIEW"/></intent-fi ...

  7. 在Hadoop伪分布式模式下安装Hbase

    安装环境:Hadoop 1.2.0, Java 1.7.0_21 1.下载/解压 在hbase官网上选择自己要下的hbase版本,我选择的是hbase-0.94.8. 下载后解压到/usr/local ...

  8. input checkbox问题和li里面包含checkbox

    <input type="checkbox" id="checkbox1"/> $("input#checkbox1").cli ...

  9. How to: Implement a Windows Communication Foundation Service Contract

    This is the second of six tasks required to create a basic Windows Communication Foundation (WCF) se ...

  10. Android开发UI之去掉title bar

    去掉屏幕上的title bar有3个方法: 1.java代码实现: @Override publicvoid onCreate(Bundle savedInstanceState) { super.o ...