DirectSound and DirectMusic

DirectSound and DirectMusic are separate components of DirectX with some overlapping functionality. Both play WAV sounds, and DirectMusic ultimately synthesizes all sounds into waveforms that are played through DirectSound buffers.DirectSound和DirectMusic是DirectX的两个独立组件,但是功能尚有部分重叠。二者都可以播放WAV文件,DirectMusic最终还是合成所有的声音,并通过DirectSound的缓冲区播放出来。

DirectMusic is a much more full-featured API that offers a complete solution for most audio scenarios in games and other interactive applications. Despite its name, DirectMusic plays all kinds of sounds including nonmusical sound effects. DirectSound is the API of choice for scenarios that require low-level management of hardware resources, such as games with many short sounds that must be played with the lowest possible latency and use of system resources. 在大部分的声音场合,DirectMusic提供完整的解决方案,但他并不仅仅是一个全功能的API。 不考虑它的名字,DirectMusic可以播放所有格式的声音,包括非音乐的声音效果。 当你需要对硬件资源进行底层控制,DirectSound是可供选择的另外一个API,比如说①游戏中包含了大量的短的声音、并且不需要频繁播放,②使用系统资源。

You can use the DirectSound API independently to play WAV sounds, even in applications that use DirectMusic to play other content. You can also use DirectSound to manipulate sound buffers that are managed by DirectMusic. For example, you can obtain a DirectSound buffer from a DirectMusic audiopath and move it in 3-D space.

The following table summarizes the functionality offered by the two APIs.

功能DirectMusicDirectSound
播放WAV文件YesYes
播放MIDIYesNo
Play DirectMusic Producer segmentsYesNo
Load content files and manage objectsYesNo, but some support in sample code
Control musical parameters at run timeYesNo
Manage timeline for cuing soundsYesNo
Use downloadable sounds (DLS)YesNo
Set volume, pitch, and pan of individual soundsYes, through DirectSound APIYes
Set volume on multiple sounds (audiopaths)YesNo
Implement 3-D soundsYes, through DirectSound APIYes
Apply effects (DMOs)Yes, through DirectMusic Producer content or DirectSound APIYes
Chain buffers for mix-in (send) effectsYes, through DirectMusic Producer contentNo
Capture WAV soundsNoYes
Implement full duplexNoYes
Capture MIDIYesNo
Control allocation of hardware buffersNoYes

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值