windows平台DirectSound编程的替代者XAudio2编程

仿真的音效终于安排给做了,以前我主动要做,被主管经理推迟了。现在研究DirectSound实现了混音效果。

但是还是觉得意犹未尽。仔细的看了现在装的DirectSDK2010(常见名字为:DXSDK_Jun10),sample里面关于声音的部分是:DirectX audio。XAudio2是DirectX的一部分,是Windows上的高性能音频渲染引擎。


Microsoft audio technologies consist of APIs for controlling audio on Xbox 360 and Windows, and tools for producing and encoding audio content in a format that is useable by those APIs.

微软音频技术包括在Xbox 360和Windows音频控制的API,还包括生产工具和一个可以通过这些API格式的音频内容编码。

The audio technologies build upon each other.

音频技术建立在彼此之上。

You can think of them as a stack with higher-level technologies at the top of the stack, and the audio hardware at the bottom of the stack.

您可以将它们作为堆栈顶部的一个更高级别的技术,并在堆栈底部的音频硬件。

The selection of which technology to use depends on the desired level of direct access to the audio hardware.

使用何种技术取决于对音频硬件的直接访问所需的水平。

XACT provides a content-driven API allowing most facets of audio to be controlled at design time, while XAudio2 provides a programmatic API allowing developers to build their own audio engine.

XACT提供内容驱动的API允许音频方面进行控制,在设计时,同时提供了一个可编程的API允许开发者XAudio2建立自己的音频引擎。

You can use multiple APIs at the same time.

您可以同时使用多层次的API。

For example, instances of XACT and XAudio2 can be used simultaneously.

例如,对XACT 和XAduio2实例可以同时使用。

Some tools and APIs exist exclusively to provide services to other APIs.

某些工具和原料药只存在于为其他蜜蜂提供服务。

For example, the XACT GUI is used to package audio content for use in the XACT API, and the XAPO API is used to create audio effects for use in XAudio2.

例如,XACT的GUI用于包装使用XACT API的音频内容,和XAPO API用于创建用于XAudio2音效。



An audio developer's typical interaction with Microsoft audio technologies will be integrating XACT or XAudio2, or both technologies, into a game to play audio created by an audio designer.

音频开发的微软音频技术的典型的互动将整合XACT或XAudio2,或两项技术使用,为游戏音频的音频设计师创造。

XACT and XAudio2 offer different levels of functionality, and a developer's tasks will be influenced by the choice of audio technology.

XACT和XAudio2提供不同层次的功能,和开发人员的任务将由音频技术选择的影响。

Deciding to use XACT or XAudio2XACT is a high-level game audio API designed for game developers who want a ready-made solution for content-driven game audio.

决定使用XACT或xaudio2xact是一种高级的游戏音频API设计那些内容驱动游戏音频游戏开发者一个现成的解决方案。

XACT employs XAudio2 for all of its mixing, signal processing, and sample level work.

该员工所有的XAudio2混合信号处理,和样品的工作水平。

XAudio2 is a low-level signal processing and mixing engine similar to DirectSound or XAudio.

XAudio2是一种低级的信号处理和混合发动机类似DirectSound或xaudio。

It is designed for developers who want to write their own game audio engines, or who prefer not to use a content-driven solution such as XACT.

它是专为那些想写自己的游戏音频引擎的开发者,或者不愿意使用内容驱动的解决方案的开发者。

See XACT Overviews and XAudio2 Overviews for overviews of both of these technologies.

看到XACT的概述和XAduio2概述去了解这些技术概述。

For how-to information about integrating these technologies into your game, see Integrating XACT Into Your Game and XAudio2 Getting Started.

关于这些技术整合到你的游戏的指导信息,整合到你的游戏,那么看XAudio2入门。



Additional Audio Technologies额外的音频技术

X3DAudio and XAPO are technologies that add functionality to XACT and XAudio2.

x3daudio和XAPO技术是对XACT和XAudio2添加功能的技术。

X3DAudioX3DAudio is an API used in conjunction with XAudio2 and XACT to position sound in 3D space.

x3daudiox3daudio是一个API用于XAudio2和XACT在三维空间位置的声音一起。

In particular, titles that feature 3D scenes will want to use X3DAudio to create the illusion of sound coming from a point in space relative to the position of the camera.

特别是,标题特征的三维场景将要使用的x3daudio创造的声音来自一个点在空间的相对位置的摄像头的幻象。

Sounds not requiring 3D positioning, such as soundtracks or non-positioned ambient sounds, may bypass X3DAudio completely.

声音不需要三维定位,如音乐或非定位环境声音,可以完全绕过x3daudio。


For an overview of X3DAudio, see X3DAudio Overview.

为x3daudio概述,看到x3daudio概述。


For information about using X3DAudio with XACT, see How To: Integrate X3DAudio with XACT.

有关使用x3daudio那么的信息,请参阅如何x3daudio那么整合。

For information about using X3DAudio with XAudio2, see How to: Integrate X3DAudio with XAudio2.

有关使用x3daudio与XAudio2信息,请参阅如何x3daudio XAudio2整合与。

XAPO


The XAPO API is used to create audio effects for use in XAudio2.

the XAPO API用于创建用于XAudio2音效。

For an overview of XAPO, see XAPO Overview.

对于XAPO概述,看到XAPO概述。

For information about using XAPO with XAudio2, see How to: Use an XAPO in XAudio2.

有关使用XAPO与XAudio2信息,请参阅如何在使用XAPO XAudio2。

XAPOFXThe XAPO effect library (XAPOFX) provides several XAPO implementations and a common method of instantiating them.

xapofxthe XAPO效果库(xapofx)提供了几种XAPO的实现和实例化他们常用的一种方法。

For an overview of XAPOFX, see XAPOFX Overview.

为xapofx概述,看到xapofx概述。

For information about using XAPOFX with XAudio2, see How to: Use XAPOFX in XAudio2.

有关使用xapofx与XAudio2信息,请参阅如何在使用xapofx XAudio2。

XMAEncoder LibraryThe XMAEncoder.

XMAEncoder LibraryThe XMAEncoder。

lib statically-linked library is available in the XDK as an alternative to the XMAEncode command-line utility.

库静态链接库是在XDK作为替代的xmaencode命令行实用程序。

The XMAEncoder library enables the creation of custom-encoding tools for use in a game's build process.

的xmaencoder库允许自定义编码工具创建用于游戏的构建过程。

See XMA Overview for more information.

更多信息见XMA概述。


An audio designer's typical interaction with Microsoft audio technologies will be through tools for processing and packing audio into an appropriate format for use with XACT and XAudio2.
音频设计师的微软音频技术的典型的互动是通过工具进行加工和包装成一个合适的音频格式使用XACT和XAudio2。


 Depending on the technology, a designer will make use of some or all of the following tools.
根据不同的技术,设计师将使用一些或所有以下工具。


 Audio ToolsThe following tools are available for processing and packaging audio files for use with XACT and XAudio2.
音频工具,以下工具可用于加工和包装使用XACT和XAudio2音频文件。




ToolDescription
XACTGUI tool used to package audio files for use with the XACT API.
XACT Command-Line ToolCommand-line tool used to package audio files for use with the XACT API.
AdpcmEncode (DirectX SDK only)Command-line tool that converts between ADPCM and PCM sound files.
Wave Merge Tool (XDK only)Command-line tool that combines mono wave files into a 4-channel or 6-channel WaveFormatEx interleaved PCM wave file.
XMA Command-Line Encoder (XDK only)Encodes one or more sound files in the XMA format.
XMA2 Command-Line Encoder (XDK only)Encodes one or more sound files in the XMA2 format.
xWMA Command-Line EncoderEncodes sound files in the xWMA format.



Deprecated Audio Technologies .

过时的音频技术。

Some existing audio technologies have been replaced by newer versions.

一些现有的音频技术已被新版本所取代。

The older versions of those technologies have been deprecated.

这些技术已经过时的旧版本。

New projects should use the technology's current version.

新项目应使用技术的当前版本。

The following table lists audio technologies with deprecated versions, and the version that should be used instead.

下表列出了音频技术过时的版本,而版本,应该用来代替。


Deprecated Technology.              Replacement .
过时的技术。                                置换。

XAudio              .                 (Xbox only) XAudio2 .
                                            For information on migrating from XAudio to XAudio2 see XAudio2 Migration Guide.
                                               在迁移到xaudio XAudio2看XAudio2迁移指南信息。


 DirectSound (Windows only).                XAudio2 (for game developers).XAudio2(游戏开发者)。
                                                             Windows Core Audio (for professional audio and media developers).
                                                                   核心音频(专业音频和媒体开发人员)。


 XACT.                                                          XACT3 .
 For information on migrating from XACT to XACT3 see XACT3 Migration Guide.
在迁移到xact3 XACT看到xact3迁移指南信息。


 

以下搜集其他网络资料:

时间是把杀猪刀,滑稽的是我成了猪

当初使用WaveXxx而不闻不问新技术说实话完全感染自老一代MFC开发者的固执和自信,这不,弃用了。 
Windows Vista中新出现的CoreAudio接管了DSound、WaveXxx、MediaFundation,通过CoreAudio,Windows的音频性能可以与MacOS X相媲美。

WASAPI和XAudio2

WASAPI被Foobar2000用户吹得要上天了,其实就是少了个SRC过程,好像出自封建思维的bit-perfect就是王道似的。什么人声甜美声场宽毛刺少等等故弄玄虚之流,有这功夫还是花点钱吧,你需要更好的器材。WASAPI真正厉害的在于APO(Audio Processing Objects),用它做出来的音效理论上兼容所有设备。

XAudio2出自于DirectX,XAudio用于Xbox,XAudio2之初可用于三红机和Vista及两者以上。目前在Windows10中它的版本是2.9,并继续在WinRT技术与UWP中供开发者使用。使用XAudio2更易于音频编程,播放音频的时候你只需不断地提交音频缓冲区的数据逐渐组成队列就好。至于音质,你的程序在Xp上跑的是DSound,自Vista之后的系统跑的是WASAPI,同样可以跳过SRC。

原来原网址在这里:http://blog.csdn.net/github_32886825/article/details/50710464


说闲话 is easy,这就给你code:

这个函数是我做语音合成的时候写的,大部分场景与此类似,全是定式:





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

零点零一

您的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值