How to: Use Submix Voices:https://msdn.microsoft.com/en-us/library/windows/desktop/ee415794(v=vs.85).aspx

This topic shows you how you can set groups of voices to send their output to the same submix voice. This enables a single change to a submix voice to affect a whole group of voices.

这篇文章向你展示怎样设置一组声音,使它们的输出发送到同一个Submix Voice。这样能够实现一个Submix Voice一个改变能够影响一整组声音。

1.Create a submix
voice
 to which all of the game's sound effect voices will send.

创建一个全部游戏声效都会输出到此的Submix Voice:

IXAudio2SubmixVoice * pSFXSubmixVoice;
pXAudio2->CreateSubmixVoice(&pSFXSubmixVoice,1,44100,0,0,0,0);

2.Create an XAUDIO2_VOICE_SENDS structure
that contains a reference to the submix voice.

创建一个包括对Submix Voice引用的XAUDIO2_VOICE_SENDS结构体:
XAUDIO2_SEND_DESCRIPTOR SFXSend = {0, pSFXSubmixVoice};
XAUDIO2_VOICE_SENDS SFXSendList = {1, &SFXSend};

3.Pass the XAUDIO2_VOICE_SENDS structure
to new source voices as they are created.

当创建Source Voices的时候,将XAUDIO2_VOICE_SENDS结构体传递给它们:
IXAudio2SourceVoice* pSFXSourceVoice;
if( FAILED(hr = pXaudio2->CreateSourceVoice( &pSFXSourceVoice, (WAVEFORMATEX*)&wfx,
0, XAUDIO2_DEFAULT_FREQ_RATIO, pCallback, pSFXSendList, NULL ) ) )
return hr;

4.Apply changes to all sound effect voices by adjusting the submix voice.

通过调节Submix Voice,改变全部和它有关联的声效:

In this example, changing the volume of the submix voice with the SetVolume function
effectively changes the volume of all voices that output to it.

比如:使用SetVolume函数来改动Submix Voice的音量,能够有效得改变全部输出到它的voices的volume。
pSFXSubmixVoice->SetVolume(0.1);

交流QQ:1245178753

How to: Use Submix Voices的更多相关文章

  1. How to install more voices to Windows Speech?

    !!!WARNING!!! This involves manual edits to your registry. If you mess it up, don't blame me. Do at ...

  2. (转) [it-ebooks]电子书列表

    [it-ebooks]电子书列表   [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...

  3. 后HTML5时代

    十二年前,无论多么复杂的布局,在我们神奇的table面前,都不是问题:十年前,阿捷的一本<网站重构>,为我们开启了新的篇章:八年前,我们研究yahoo.com,惊叹它在IE5下都表现得如此 ...

  4. [Erlang 0122] Erlang Resources 2014年1月~6月资讯合集

    虽然忙,有些事还是要抽时间做; Erlang Resources 小站 2014年1月~6月资讯合集,方便检索.      小站地址: http://site.douban.com/204209/   ...

  5. net-force.nl/steganography writeup

    做CTF题好长一段时间了,真的可以学到很多东西.这次,我们开启 net-force.nl 的 Steganography之旅,所谓的隐写术. level 801: Training - Can you ...

  6. webrtc中APM(AudioProcessing module)的使用2

    这个其实就是从Audio_processing.h中拿出来的. APM should be placed in the signal chain as close to the audio hardw ...

  7. 【VC++技术杂谈004】使用微软TTS语音引擎实现文本朗读

    本文主要介绍如何使用微软TTS语音引擎实现文本朗读,以及生成wav格式的声音文件. 1.语音引擎及语音库的安装 TTS(Text-To-Speech)是指文本语音的简称,即通过TTS引擎把文本转化为语 ...

  8. AssetBundle loading failed because.....已解决

    http://blog.csdn.net/ldghd/article/details/9632455 *****************************      一      ******* ...

  9. HTML中strong与b,em与i标签的区别

    先看效果 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titl ...

随机推荐

  1. Beego:原生方式使用MySQL

    示例: package controllers import ( "database/sql" "fmt" "github.com/astaxie/b ...

  2. Linux中vim编辑器常用命令

    移动光标 Ctrl+f:屏幕向下移动一页,相当于[Page Down]按键Ctrl+b:屏幕向上移动一页,相当与[PageUp]按键 0或功能键[Home]:数字‘0’:移动到这一行的最前面的字符处$ ...

  3. LeetCode(37) Sudoku Solver

    题目 Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by ...

  4. centos的那些小事儿!

    操作系统:centos7 1.[root@chaoge ~]# ifconfig-bash: ifconfig: 未找到命令 安装net-tools即可: [root@chaoge ~]# yum i ...

  5. MongoDB中WiredTiger的数据可用性设置

    此文已由作者温正湖授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. MongoDB中WiredTiger的参数配置主要通过 wiredtiger_open (http://so ...

  6. Couchbase V(管理任务)

    Couchbase V(管理任务) 多读写 在Couchbase2.1中支持硬盘多读些(Multi- Readers and Writers),一般双核4G服务默认3个thread 4核16G内存一个 ...

  7. Cow Exhibition (01背包)

    "Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with G ...

  8. vue.js基础知识总结

    初始化一个项目 npm init -y 安装一些依赖 npm install 名称 --save 例如 npm install vue axios bootstrap --save --save 表示 ...

  9. 售货员的难题(codevs 2596)

    题目描述 Description 某乡有n个村庄(1<n<=15),有一个售货员,他要到各个村庄去售货,各村庄之间的路程s(0<s<1000)是已知的,且A村到B村与B村到A村 ...

  10. [NOIP2001] 提高组 洛谷P1024 一元三次方程求解

    题目描述 有形如:ax3+bx2+cx+d=0 这样的一个一元三次方程.给出该方程中各项的系数(a,b,c,d 均为实数),并约定该方程存在三个不同实根(根的范围在-100至100之间),且根与根之差 ...