How to: Use Submix Voices
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.
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.
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.
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.
pSFXSubmixVoice->SetVolume(0.1);
交流QQ:1245178753
How to: Use Submix Voices的更多相关文章
- 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 ...
- (转) [it-ebooks]电子书列表
[it-ebooks]电子书列表 [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...
- 后HTML5时代
十二年前,无论多么复杂的布局,在我们神奇的table面前,都不是问题:十年前,阿捷的一本<网站重构>,为我们开启了新的篇章:八年前,我们研究yahoo.com,惊叹它在IE5下都表现得如此 ...
- [Erlang 0122] Erlang Resources 2014年1月~6月资讯合集
虽然忙,有些事还是要抽时间做; Erlang Resources 小站 2014年1月~6月资讯合集,方便检索. 小站地址: http://site.douban.com/204209/ ...
- net-force.nl/steganography writeup
做CTF题好长一段时间了,真的可以学到很多东西.这次,我们开启 net-force.nl 的 Steganography之旅,所谓的隐写术. level 801: Training - Can you ...
- webrtc中APM(AudioProcessing module)的使用2
这个其实就是从Audio_processing.h中拿出来的. APM should be placed in the signal chain as close to the audio hardw ...
- 【VC++技术杂谈004】使用微软TTS语音引擎实现文本朗读
本文主要介绍如何使用微软TTS语音引擎实现文本朗读,以及生成wav格式的声音文件. 1.语音引擎及语音库的安装 TTS(Text-To-Speech)是指文本语音的简称,即通过TTS引擎把文本转化为语 ...
- AssetBundle loading failed because.....已解决
http://blog.csdn.net/ldghd/article/details/9632455 ***************************** 一 ******* ...
- HTML中strong与b,em与i标签的区别
先看效果 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titl ...
随机推荐
- luogu P1238 走迷宫--DFS模板好(水)题
题目描述 有一个m*n格的迷宫(表示有m行.n列),其中有可走的也有不可走的,如果用1表示可以走,0表示不可以走,文件读入这m*n个数据和起始点.结束点(起始点和结束点都是用两个数据来描述的,分别表示 ...
- 环境变量HISTCONTROL命令及对快捷键Ctrl+o命令的影响
在linux中环境变量HISTCONTROL可以控制历史的记录方式. HISTCONTROL有以下的选项: ignoredups 默认,忽略重复命令 ignorespace ...
- vue项目中设置跨域
config->index.js 'use strict' // Template version: 1.3.1 // see http://vuejs-templates.github.io/ ...
- 剑指Offer(书):剪绳子
题目:给你一根长度为n的绳子,请把绳子剪成m段,每段绳子的长度记为k[0],k[1]....,k[m].请问k[0]xk[1]x...,k[m]可能的最大乘积是多少.例如:长度为8剪成2 3 3 得到 ...
- Spring Boot 集成Angular程序
假设 1.你已经完成了Spring Boot的示例,在浏览其中输入http://localhost:8080/index,能够返回html页面. 2.你已经完成了Angular程序,名字为quicks ...
- Ubuntu16.04进入无限登录状态的解决办法
具体来说就是,输入密码之后又到了登录界面,无限循环(也许可能不能输入密码,这种状态我没有测试) 此方案仅适用于安装过NVIDIA显卡驱动的系统并且在登录界面会发现分辨率变了 如果你没有安装过NVIDI ...
- [MVC]Area区域相关技术
MVC提供Area机制,在同一个项目之内就能够切割出不同的ASP.NET MVC网站. 插入:首先在相同的位置,比如说同一个文件夹(如:Controllers)是不能创建俩个相同名称的文件(如:Hom ...
- [MVC]在练习MusicStore过程中问题实录
1,问题描述:MVC在添加基于框架的控制器时,出现无法检索xxx的元数据 参考目录:http://www.cnblogs.com/0banana0/p/4050793.html#undefined 解 ...
- Cannot delete or update a parent row: a foreign key constraint fails....
在操作”小弟“这张表时候报错 想在“小弟”上面加入数据或者更新数据,就要听老大的, 这句话后面跟着的表就是“老大”,必须老大有数据索引,“小弟“才可以加入或者更新 查看“小弟”表的外键,会发现有对“老 ...
- [HNOI2015]实验比较 树形dp+组合数学
在合并的时候有可以加等于,或者继续用小于, 比如siz[x]和siz[y]合并,小于的区间为max(siz[x],siz[y])<=k<=siz[x]+siz[y], 然后就是合并成多少个 ...