AdjustSound

所属分类音频处理
开发工具:Visual C++
文件大小:17KB
下载次数:82
上传日期:2004-07-08 10:01:18
上 传 者freeit
说明:  AdjustSound sample shows how to load and play a wave file using a DirectSound buffer and adjust its focus, frequency, pan, and volume

文件列表:
AdjustSound\adjustsound.cpp (25709, 2002-11-12)
AdjustSound\adjustsound.dsp (4918, 2002-11-12)
AdjustSound\adjustsound.dsw (545, 2002-11-12)
AdjustSound\adjustsound.gif (5304, 2002-11-12)
AdjustSound\AdjustSound.rc (6057, 2002-11-12)
AdjustSound\adjustsound.sln (922, 2002-11-12)
AdjustSound\adjustsound.vcproj (4921, 2002-11-12)
AdjustSound\resource.h (1562, 2002-11-12)
AdjustSound (0, 2004-07-08)

//----------------------------------------------------------------------------- // // Sample Name: AdjustSound Sample // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- Description =========== AdjustSound sample shows how to load and play a wave file using a DirectSound buffer and adjust its focus, frequency, pan, and volume. Path ==== Source: DXSDK\Samples\C++\DirectSound\AdjustSound Executable: DXSDK\Samples\C++\DirectSound\Bin User's Guide ============ Load a wave file by clicking Sound File. Select Focus and Buffer Mixing options; note that the various settings are explained under Expected Behavior as you select them. Click Play. If you don't hear any sound, check the Status pane. The application might fail to create the buffer in hardware if this option has been selected. By using the sliders you can adjust the frequency, pan, and volume dynamically as the buffer is playing. Programming Notes ================= For a simpler example of how to setup a DirectSound buffer without as many controls, see the PlaySound sample. To set the focus of a buffer call IDirectSound::CreateSoundBuffer with DSBCAPS_GLOBALFOCUS or DSBCAPS_STICKYFOCUS or neither of these flags. To set the memory location of a buffer call IDirectSound::CreateSoundBuffer with DSBCAPS_LOCHARDWARE or DSBCAPS_LOCSOFTWARE or neither of these flags. To control various aspects of DirectSound buffer: To adjust the frequency call IDirectSoundBuffer::SetFrequency To adjust the pan call IDirectSoundBuffer::SetPan To adjust the volume call IDirectSoundBuffer::SetVolume

近期下载者

相关文件

评论我要评论

收藏者