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 ...
随机推荐
- ios之UITableView
今天要分享的是IOS开发中一个使用率非常高的一个控件-------UITableView,这两天正在使用tableview做信息的显示,在写代码时对tableview和tableviewcell的几种 ...
- KVM中存储的配置
存储配置和启动顺序 QEMU提供了对多种块存储设备的模拟,包括IDE设备.SCSI设备.软盘.U盘.virtio磁盘等,而且对设备的启动顺序提供了灵活的配置. 1. 存储的基本配置选项 在qemu-k ...
- cobbler 无人值守-安装
环境准备 准备两台主机,如centos6和centos7 centos7当作server服务器 关闭selinux 关闭防火墙 安装 cobbler包光盘里是没有的,要配置epel源,这里就说怎么配置 ...
- Python机器学习及实践+从零开始通往Kaggle竞赛之路
内容简介 本书面向所有对机器学习与数据挖掘的实践及竞赛感兴趣的读者,从零开始,以Python编程语言为基础,在不涉及大量数学模型与复杂编程知识的前提下,逐步带领读者熟悉并且掌握当下最流行的机器学习.数 ...
- IntrospectorCleanupListener监听器防止内存溢出
<listener> <listener-class>org.springframework.web.util.IntrospectorCleanupListener</ ...
- iframe in ipad safari
http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebconten ...
- [转]android 如何获取第三方app的sha1值
对于android 应用的sha1值和md5值的获取,如果是我们自己的应用,不论是获取测试的和正式的都是比较方便的.但是如何去获取别人开发的app的sha1和md5呢,并且我们只有apk有没有相关的文 ...
- poj——3177Redundant Paths
poj——3177Redundant Paths 洛谷—— P2860 [USACO06JAN]冗余路径Redundant Paths Time Limit: 1000MS Memory ...
- new String()理解
public static void main(String[] args){ String a=new String("ddy"); String b=new String(&q ...
- 细说分布式Redis架构设计和踩过的那些坑
细说分布式Redis架构设计和踩过的那些坑_redis 分布式_ redis 分布式锁_分布式缓存redis 细说分布式Redis架构设计和踩过的那些坑