SharpDX.DirectSound The assembly provides managed DirectSound API. ee416960 DirectSound DirectSound The structure contains all information necessary to uniquely describe the location, orientation, and motion of a 3D sound buffer. This structure is used with theIDirectSound3DBuffer8::GetAllParametersandIDirectSound3DBuffer8::SetAllParametersmethods. ee416816 DS3DBUFFER DS3DBUFFER Initializes a new instance of the class. No documentation. unsigned int dwSize unsigned int dwSize No documentation. D3DVECTOR vPosition D3DVECTOR vPosition No documentation. D3DVECTOR vVelocity D3DVECTOR vVelocity No documentation. unsigned int dwInsideConeAngle unsigned int dwInsideConeAngle No documentation. unsigned int dwOutsideConeAngle unsigned int dwOutsideConeAngle No documentation. D3DVECTOR vConeOrientation D3DVECTOR vConeOrientation No documentation. int lConeOutsideVolume int lConeOutsideVolume No documentation. float flMinDistance float flMinDistance No documentation. float flMaxDistance float flMaxDistance No documentation. unsigned int dwMode unsigned int dwMode No documentation. DSCAPS DSCAPS Initializes a new instance of the class. No documentation. unsigned int dwSize unsigned int dwSize No documentation. DSCAPS_FLAGS dwFlags DSCAPS_FLAGS dwFlags No documentation. unsigned int dwMinSecondarySampleRate unsigned int dwMinSecondarySampleRate No documentation. unsigned int dwMaxSecondarySampleRate unsigned int dwMaxSecondarySampleRate No documentation. unsigned int dwPrimaryBuffers unsigned int dwPrimaryBuffers No documentation. unsigned int dwMaxHwMixingAllBuffers unsigned int dwMaxHwMixingAllBuffers No documentation. unsigned int dwMaxHwMixingStaticBuffers unsigned int dwMaxHwMixingStaticBuffers No documentation. unsigned int dwMaxHwMixingStreamingBuffers unsigned int dwMaxHwMixingStreamingBuffers No documentation. unsigned int dwFreeHwMixingAllBuffers unsigned int dwFreeHwMixingAllBuffers No documentation. unsigned int dwFreeHwMixingStaticBuffers unsigned int dwFreeHwMixingStaticBuffers No documentation. unsigned int dwFreeHwMixingStreamingBuffers unsigned int dwFreeHwMixingStreamingBuffers No documentation. unsigned int dwMaxHw3DAllBuffers unsigned int dwMaxHw3DAllBuffers No documentation. unsigned int dwMaxHw3DStaticBuffers unsigned int dwMaxHw3DStaticBuffers No documentation. unsigned int dwMaxHw3DStreamingBuffers unsigned int dwMaxHw3DStreamingBuffers No documentation. unsigned int dwFreeHw3DAllBuffers unsigned int dwFreeHw3DAllBuffers No documentation. unsigned int dwFreeHw3DStaticBuffers unsigned int dwFreeHw3DStaticBuffers No documentation. unsigned int dwFreeHw3DStreamingBuffers unsigned int dwFreeHw3DStreamingBuffers No documentation. unsigned int dwTotalHwMemBytes unsigned int dwTotalHwMemBytes No documentation. unsigned int dwFreeHwMemBytes unsigned int dwFreeHwMemBytes No documentation. unsigned int dwMaxContigFreeHwMemBytes unsigned int dwMaxContigFreeHwMemBytes No documentation. unsigned int dwUnlockTransferRateHwBuffers unsigned int dwUnlockTransferRateHwBuffers No documentation. unsigned int dwPlayCpuOverheadSwBuffers unsigned int dwPlayCpuOverheadSwBuffers No documentation. unsigned int dwReserved1 unsigned int dwReserved1 No documentation. unsigned int dwReserved2 unsigned int dwReserved2 No documentation. IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8 No documentation. IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer The Lock method locks a portion of the buffer. Locking the buffer returns references into the buffer, allowing the application to read or write audio data into memory. Offset, in bytes, from the start of the buffer to the point where the lock begins. Size, in bytes, of the portion of the buffer to lock. Because the buffer is conceptually circular, this number can exceed the number of bytes between dwOffset and the end of the buffer. Flags modifying the lock event. The following flags are defined: ValueDescription DSBLOCK_FROMWRITECURSORStart the lock at the write cursor. The dwOffset parameter is ignored. DSBLOCK_ENTIREBUFFERLock the entire buffer. The dwBytes parameter is ignored. Address of a variable that receives a pointer to the second locked part of the capture buffer. If NULL is returned, the ppvAudioPtr1 parameter points to the entire locked portion of the capture buffer. Address of a variable that receives a pointer to the first locked part of the buffer. HRESULT IDirectSoundCaptureBuffer::Lock([None] int dwOffset,[None] int dwBytes,[Out] void** ppvAudioPtr1,[Out] int* pdwAudioBytes1,[Out] void** ppvAudioPtr2,[Out, Optional] int* pdwAudioBytes2,[None] int dwFlags) The Unlock method releases a locked sound buffer. Address of the value retrieved in the ppvAudioPtr1 parameter of the {{Lock}} method. Address of the value retrieved in the ppvAudioPtr2 parameter of the IDirectSoundBuffer8::Lock method. No documentation. HRESULT IDirectSoundBuffer::Unlock([In, Buffer] void* pvAudioPtr1,[None] int dwAudioBytes1,[In, Buffer, Optional] void* pvAudioPtr2,[None] int dwAudioBytes2) Writes data to the buffer. Writes data to the buffer. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The GetCaps method retrieves the capabilities of the buffer.
Pointer to a structure that receives information about the capture buffer. On input, the dwSize member must specify the size of the structure in bytes.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_INVALIDPARAM
DSERR_UNSUPPORTED
DSERR_OUTOFMEMORY
ee418164 HRESULT IDirectSoundCaptureBuffer::GetCaps([Out] DSCBCAPS* pDSCBCaps) IDirectSoundCaptureBuffer::GetCaps
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureBuffer::GetCurrentPosition([Out, Optional] unsigned int* pdwCapturePosition,[Out, Optional] unsigned int* pdwReadPosition) IDirectSoundCaptureBuffer::GetCurrentPosition No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureBuffer::GetFormat([In] void* pwfxFormat,[In] unsigned int dwSizeAllocated,[Out, Optional] unsigned int* pdwSizeWritten) IDirectSoundCaptureBuffer::GetFormat The GetStatus method retrieves the status of the capture buffer.
Address of a variable that receives the status of the capture buffer. The status can be set to one or more of the following:
ValueDescription
The buffer is capturing audio data.
The buffer is looping.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418174 HRESULT IDirectSoundCaptureBuffer::GetStatus([Out] DSCBSTATUS_FLAGS* pdwStatus) IDirectSoundCaptureBuffer::GetStatus
The Lock method locks a portion of the buffer. Locking the buffer returns references into the buffer, allowing the application to read or write audio data into memory.
Offset, in bytes, from the start of the buffer to the point where the lock begins.
Size, in bytes, of the portion of the buffer to lock. Because the buffer is conceptually circular, this number can exceed the number of bytes between dwOffset and the end of the buffer.
Address of a variable that receives a reference to the first locked part of the buffer.
Address of a variable that receives the number of bytes in the block at ppvAudioPtr1. If this value is less than dwBytes, the lock has wrapped and ppvAudioPtr2 points to a second block of data at the beginning of the buffer.
Address of a variable that receives a reference to the second locked part of the capture buffer. If null is returned, the ppvAudioPtr1 parameter points to the entire locked portion of the capture buffer.
Address of a variable that receives the number of bytes in the block at ppvAudioPtr2. If ppvAudioPtr2 is null, this value is zero.
Flags modifying the lock event. This value can be zero or the following flag:
ValueDescription
DSCBLOCK_ENTIREBUFFERIgnore dwBytes and lock the entire capture buffer.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following values:

Return code
DSERR_INVALIDPARAM
DSERR_INVALIDCALL

This method accepts an offset and a byte count, and returns two read references and their associated sizes. If the locked portion does not extend to the end of the buffer and wrap to the beginning, the second reference, ppvAudioBytes2, receives null. If the lock does wrap, ppvAudioBytes2 points to the beginning of the buffer.

If the application passes null for the ppvAudioPtr2 and pdwAudioBytes2 parameters, the lock extends no further than the end of the buffer and does not wrap.

The application should read data from the references returned by this method and then immediately call Unlock. The sound buffer should not remain locked while it is running; if it does, the capture cursor will reach the locked bytes and audio problems may result.

ee418179 HRESULT IDirectSoundCaptureBuffer::Lock([In] unsigned int dwOffset,[In] unsigned int dwBytes,[Out] void** ppvAudioPtr1,[Out] unsigned int* pdwAudioBytes1,[Out] void** ppvAudioPtr2,[Out, Optional] unsigned int* pdwAudioBytes2,[In] unsigned int dwFlags) IDirectSoundCaptureBuffer::Lock
The Start method begins capturing data into the buffer. If the buffer is already capturing, the method has no effect.
Flags that specify the behavior of the buffer when capturing sound data. The following flag is defined:
ValueDescription
DSCBSTART_LOOPINGAfter the end of the buffer is reached, capture restarts at the beginning and continues until explicitly stopped.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_INVALIDPARAM
DSERR_NODRIVER
DSERR_OUTOFMEMORY

If the buffer is already capturing, a call to this method using a different value in dwFlags might not change the value returned by GetStatus.

If the application is multithreaded, the thread that starts the buffer must continue to exist as long as the buffer is capturing. Buffers created on WDM drivers stop capturing when the thread is terminated.

ee418181 HRESULT IDirectSoundCaptureBuffer::Start([In] BOOL dwFlags) IDirectSoundCaptureBuffer::Start
The Stop method stops the buffer so that it is no longer capturing data. If the buffer is not capturing, the method has no effect.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

ee418183 HRESULT IDirectSoundCaptureBuffer::Stop() IDirectSoundCaptureBuffer::Stop
No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureBuffer::Unlock([In, Buffer] void* pvAudioPtr1,[In] unsigned int dwAudioBytes1,[In, Buffer, Optional] void* pvAudioPtr2,[In] unsigned int dwAudioBytes2) IDirectSoundCaptureBuffer::Unlock True if the buffer is currently capturing. The offset from the start of the buffer, in bytes, of the capture cursor. The offset from the start of the buffer, in bytes, of the read cursor. True if the capture buffer is looping. Gets the waveform format of the capture buffer. The format. The GetCaps method retrieves the capabilities of the buffer. ee418164 GetCaps GetCaps HRESULT IDirectSoundCaptureBuffer::GetCaps([Out] DSCBCAPS* pDSCBCaps) The GetStatus method retrieves the status of the capture buffer. ee418174 GetStatus GetStatus HRESULT IDirectSoundCaptureBuffer::GetStatus([Out] DSCBSTATUS_FLAGS* pdwStatus) Creates a buffer for capturing waveform audio. a reference to an instance of a structure containing values for the capture buffer being created. No documentation. HRESULT IDirectSoundCapture::CreateCaptureBuffer([In] LPCDSCBUFFERDESC pcDSCBufferDesc,[Out] LPDIRECTSOUNDCAPTUREBUFFER* ppDSCBuffer,[None] IUnknown* pUnkOuter) Retrieves an interface to an effect object associated with the buffer. Index of the object within objects of that class in the path. See Remarks. an effect object associated with the buffer HRESULT IDirectSoundCaptureBuffer8::GetObjectInPath([In] GUID* rguidObject,[None] int dwIndex,[In] GUID* rguidInterface,[Out] void** ppObject) Retrieves the status of capture effects. Sets the notification positions. The positions. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The GetObjectInPath method retrieves an interface to an effect object associated with the buffer.
Value of type REFGUID that specifies the unique class identifier of the object being searched for, such as .
Index of the object within objects of that class in the path. See Remarks.
Unique identifier of the desired interface, such as IID_IDirectSoundCaptureFXAec8.
Address of a variable that receives the desired interface reference.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_INVALIDPARAM
DSERR_OBJECTNOTFOUND

The value in dwIndex is the index of the object within the array of effects in the structure passed to DirectSoundFullDuplexCreate8 or IDirectSoundCapture8::CreateCaptureBuffer.

microsoft.directx_sdk.idirectsoundcapturebuffer8.idirectsoundcapturebuffer8.getobjectinpath HRESULT IDirectSoundCaptureBuffer8::GetObjectInPath([In] const GUID& rguidObject,[In] unsigned int dwIndex,[In] const GUID& rguidInterface,[Out] void** ppObject) IDirectSoundCaptureBuffer8::GetObjectInPath
The GetFXStatus method retrieves the status of capture effects.
Number of elements in the pdwFXStatus array.
Address of an array of DWORD variables that receive the status of each effect. This should contain the same number of elements as the array passed in the dwFXCount member of the structure passed to DirectSoundFullDuplexCreate8 or IDirectSoundCapture8::CreateCaptureBuffer. The possible values returned in the array are as follows:
ValueDescription
DSCFXR_LOCHARDWAREEffect is instantiated in hardware.
DSCFXR_LOCSOFTWAREEffect is instantiated in software.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

microsoft.directx_sdk.idirectsoundcapturebuffer8.idirectsoundcapturebuffer8.getfxstatus HRESULT IDirectSoundCaptureBuffer8::GetFXStatus([In] unsigned int dwEffectsCount,[Out, Buffer] DSCFX_ENUM* pdwFXStatus) IDirectSoundCaptureBuffer8::GetFXStatus
No documentation. DSCBCAPS DSCBCAPS Initializes a new instance of the class. No documentation. unsigned int dwSize unsigned int dwSize No documentation. DSCBCAPS_FLAGS dwFlags DSCBCAPS_FLAGS dwFlags No documentation. unsigned int dwBufferBytes unsigned int dwBufferBytes No documentation. unsigned int dwReserved unsigned int dwReserved No documentation. DSCBUFFERDESC DSCBUFFERDESC Initializes a new instance of the class. No documentation. unsigned int dwSize unsigned int dwSize No documentation. DSCBCAPS_FLAGS dwFlags DSCBCAPS_FLAGS dwFlags No documentation. unsigned int dwBufferBytes unsigned int dwBufferBytes No documentation. unsigned int dwReserved unsigned int dwReserved No documentation. WAVEFORMATEX* lpwfxFormat WAVEFORMATEX lpwfxFormat No documentation. unsigned int dwFXCount unsigned int dwFXCount No documentation. DSCEFFECTDESC* lpDSCFXDesc DSCEFFECTDESC lpDSCFXDesc Gets a value indicating whether [wave mapped]. true if [wave mapped]; otherwise, false. Gets a value indicating whether [control effects]. true if [control effects]; otherwise, false. Gets or sets the format. The format. Describes effects supported by hardware for the buffer. The structure describes the capabilities of the capture device. It is used by theIDirectSoundCapture8::GetCapsmethod. microsoft.directx_sdk.reference.dsccaps DSCCAPS DSCCAPS Initializes a new instance of the class. No documentation. unsigned int dwSize unsigned int dwSize No documentation. unsigned int dwFlags unsigned int dwFlags No documentation. unsigned int dwFormats unsigned int dwFormats No documentation. unsigned int dwChannels unsigned int dwChannels The structure contains parameters for an effect associated with a capture buffer. microsoft.directx_sdk.reference.dsceffectdesc DSCEFFECTDESC DSCEFFECTDESC Initializes a new instance of the class.
Size of the structure, in bytes.
microsoft.directx_sdk.reference.dsceffectdesc unsigned int dwSize unsigned int dwSize
Flags that specify desired parameters of the effect. When this structure is passed to DirectSoundFullDuplexCreate8, or IDirectSoundCapture8::CreateCaptureBuffer, this member must be one of the values shown in the following table.
Value Description
Effect specified by guidDSCFXInstance must be in hardware.
Effect specified by guidDSCFXInstance must be in software.

On return, this member can contain one of the values shown in the following table.

Value Description
Effect was created in hardware.
Effect was created in software.
microsoft.directx_sdk.reference.dsceffectdesc DSCFX_ENUM dwFlags DSCFX_ENUM dwFlags
Value of type that specifies the class identifier of the effect. The following standard identifiers are defined.
Value Description
Acoustic echo cancellation.
Noise suppression.
microsoft.directx_sdk.reference.dsceffectdesc GUID guidDSCFXClass GUID guidDSCFXClass
Value of type that specifies the unique identifier of the preferred effect. The following standard identifiers are defined.
Value Description
Microsoft acoustic echo cancellation. Available in software only.
Microsoft noise suppression. Available in software only.
System default acoustic echo cancellation.
System default noise suppression.
microsoft.directx_sdk.reference.dsceffectdesc GUID guidDSCFXInstance GUID guidDSCFXInstance
Reserved. Must be zero.
microsoft.directx_sdk.reference.dsceffectdesc unsigned int dwReserved1 unsigned int dwReserved1
Reserved. Must be zero.
microsoft.directx_sdk.reference.dsceffectdesc unsigned int dwReserved2 unsigned int dwReserved2
No documentation. IDirectSoundFXChorus IDirectSoundFXChorus Default number of milliseconds the input is delayed before it is played back. The default value is 50. Maximum number of milliseconds the input is delayed before it is played back. Minimum number of milliseconds the input is delayed before it is played back. Default percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. The default value is 10. Maximum percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. Minimum percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. Default percentage of output signal to feed back into the effect's input. The default value is 25. Maximum percentage of output signal to feed back into the effect's input. Minimum percentage of output signal to feed back into the effect's input. Default frequency of the LFO. The default value is 1.1. Maximum frequency of the LFO. Minimum frequency of the LFO. Positive 180 phase differential between left and right LFOs. Positive 90 phase differential between left and right LFOs. Default phase differential between left and right LFOs. The default value is Phase90. Maximum phase differential between left and right LFOs. Minimum phase differential between left and right LFOs. Negative 180 phase differential between left and right LFOs. Negative 90 phase differential between left and right LFOs. Zero phase differential between left and right LFOs. Default waveform shape of the LFO. By default, the waveform is a sine. Sine waveform shape of the LFO. Triangle waveform shape of the LFO. Default ratio of wet (processed) signal to dry (unprocessed) signal. Maximum ratio of wet (processed) signal to dry (unprocessed) signal. Minimum ratio of wet (processed) signal to dry (unprocessed) signal. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXChorus::SetAllParameters([In] const DSFXChorus* pcDsFxChorus) IDirectSoundFXChorus::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXChorus::GetAllParameters([Out] DSFXChorus* pDsFxChorus) IDirectSoundFXChorus::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXChorus::GetAllParameters([Out] DSFXChorus* pDsFxChorus) No documentation. IDirectSoundFXCompressor IDirectSoundFXCompressor Default time before compression reaches its full value, in decibels (dB). The default value is 10 ms. Maximum time before compression reaches its full value, in decibels (dB). Minimum time before compression reaches its full value, in decibels (dB). Default output gain of signal after compression, in decibels (dB). The default value is 0 dB. Maximum output gain of signal after compression, in decibels (dB). Minimum output gain of signal after compression, in decibels (dB). Default time after threshold is reached before attack phase is started, in milliseconds. The default value is 4 ms. Maximum time after threshold is reached before attack phase is started, in milliseconds. Minimum time after threshold is reached before attack phase is started, in milliseconds. Default compression ratio. The default value is 3, which means 3:1 compression. Maximum compression ratio. Minimum compression ratio. Default speed at which compression is stopped after input drops below Threshold, in miliseconds. The default value is 200 ms. Maximum speed at which compression is stopped after input drops below Threshold, in miliseconds. Minimum speed at which compression is stopped after input drops below Threshold, in miliseconds. Default point at which compression begins, in decibels, in decibels (dB). The default value is -20 dB. Maximum point at which compression begins, in decibels, in decibels (dB). Minimum point at which compression begins, in decibels, in decibels (dB). Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXCompressor::SetAllParameters([In] const DSFXCompressor* pcDsFxCompressor) IDirectSoundFXCompressor::SetAllParameters The GetAllParameters method retrieves the compression parameters of a buffer.
Address of a structure that receives the effect parameters.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418216 HRESULT IDirectSoundFXCompressor::GetAllParameters([Out] DSFXCompressor* pDsFxCompressor) IDirectSoundFXCompressor::GetAllParameters
The GetAllParameters method retrieves the compression parameters of a buffer. ee418216 GetAllParameters GetAllParameters HRESULT IDirectSoundFXCompressor::GetAllParameters([Out] DSFXCompressor* pDsFxCompressor) Contains information about a DirectSound device. Initializes a new instance of the class. The driver GUID. The description. Name of the module. Identifies the DirectSound driver being enumerated String that provides a textual description of the DirectSound device. String that specifies the module name of the DirectSound driver corresponding to this device. No documentation. IDirectSound8 IDirectSound8 No documentation. IDirectSound IDirectSound Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The CreateSoundBuffer method creates a sound buffer object to manage audio samples.
Address of a structure that describes the sound buffer to create.
Address of a variable that receives the interface of the new buffer object. Use QueryInterface to obtain . is not available for the primary buffer.
Address of the controlling object's interface for COM aggregation. Must be null.

If the method succeeds, the return value is DS_OK, or DS_NO_VIRTUALIZATION if a requested 3D algorithm was not available and stereo panning was substituted. See the description of the guid3DAlgorithm member of . If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_ALLOCATED
DSERR_BADFORMAT
DSERR_BUFFERTOOSMALL
DSERR_CONTROLUNAVAIL
DSERR_DS8_REQUIRED
DSERR_INVALIDCALL
DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_OUTOFMEMORY
DSERR_UNINITIALIZED
DSERR_UNSUPPORTED

DirectSound does not initialize the contents of the buffer, and the application cannot assume that it contains silence.

If an attempt is made to create a buffer with the flag on a system where hardware acceleration is not available, the method fails with either DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL, depending on the operating system.

ee418039 HRESULT IDirectSound::CreateSoundBuffer([In] const DSBUFFERDESC* pcDSBufferDesc,[Out] void** ppDSBuffer,[In] IUnknown* pUnkOuter) IDirectSound::CreateSoundBuffer
The GetCaps method retrieves the capabilities of the hardware device that is represented by the device object.
Address of a structure that receives the capabilities of this sound device.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_UNINITIALIZED

Information retrieved in the structure describes the maximum capabilities of the sound device and those currently available, such as the number of hardware mixing channels and the amount of on-board sound memory. You can use this information to fine-tune performance and optimize resource allocation.

Because of resource-sharing requirements, the maximum capabilities in one area might be available only at the cost of another area.

ee418043 HRESULT IDirectSound::GetCaps([Out] DSCAPS* pDSCaps) IDirectSound::GetCaps
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound::DuplicateSoundBuffer([In] IDirectSoundBuffer* pDSBufferOriginal,[Out] void** ppDSBufferDuplicate) IDirectSound::DuplicateSoundBuffer No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound::SetCooperativeLevel([In] HWND hwnd,[In] DSSCL_ENUM dwLevel) IDirectSound::SetCooperativeLevel No documentation. No documentation. HRESULT IDirectSound::Compact() IDirectSound::Compact The GetSpeakerConfig method retrieves the speaker configuration.
Address of the speaker configuration (see remarks in IDirectSound8::SetSpeakerConfig).

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_INVALIDPARAM
DSERR_UNINITIALIZED

The value returned at pdwSpeakerConfig can be a packed DWORD containing both configuration and geometry information. Use the DSSPEAKER_CONFIG and DSSPEAKER_GEOMETRY macros to unpack the DWORD, as in the following example:

 if (DSSPEAKER_CONFIG(dwSpeakerConfig) == ) { if (DSSPEAKER_GEOMETRY(dwSpeakerConfig) == ) { // Configuration is wide stereo. ...} } 

To use #defines implemented in Windows Vista, set the DIRECTSOUND_VERSION to 0x1000 before including dsound.h.

ee418045 HRESULT IDirectSound::GetSpeakerConfig([Out] unsigned int* pdwSpeakerConfig) IDirectSound::GetSpeakerConfig
TheSetSpeakerConfigmethod specifies the speaker configuration of the device.
The speaker configuration. See the following remarks.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_INVALIDPARAM
DSERR_UNINITIALIZED

In Windows Vista and later versions of Windows, SetSpeakerConfig is a NOP. For Windows Vista and later versions, the speaker configuration is a system setting that should not be modified by an application. End users can set the speaker configuration through control panels.

Speaker Configurations

These tables contain the possible speaker configurations.

Value Description
The audio is played through a speaker arrangement of five surround speakers with a subwoofer. ( is still defined, but is obsolete as of Windows Vista. Use instead.)
The audio is played through a home theater speaker arrangement of five surround speakers with a subwoofer. This value applies to Windows Vista or later.
The audio is passed through directly, without being configured for speakers.
The audio is played through headphones.
The audio is played through a single speaker.
The audio is played through quadraphonic speakers.
The audio is played through stereo speakers (default value).
The audio is played through surround speakers.
The audio is played through a wide speaker arrangement of seven surround speakers with a subwoofer. ( is still defined, but is obsolete as of Windows XP SP 2. Use instead.)
The audio is played through a home theater speaker arrangement of seven surround speakers with a subwoofer. This value applies to Windows XP SP2 or later.

can be combined with one of the values shown in the following table.

Value Description
The speakers are directed over an arc of 20 degrees.
The speakers are directed over an arc of 10 degrees.
The speakers are directed over an arc of 5 degrees.
The speakers are directed over an arc of 180 degrees.

If a geometry value is to be used, it must be packed in a DWORD along with the flag. This can be done by using the DSSPEAKER_COMBINED macro, as in the following C++ example:

 lpds->SetSpeakerConfig(DSSPEAKER_COMBINED( , )); 

To use #defines implemented in Windows Vista, set the DIRECTSOUND_VERSION to 0x1000 before including dsound.h.

ee418050 HRESULT IDirectSound::SetSpeakerConfig([In] unsigned int dwSpeakerConfig) IDirectSound::SetSpeakerConfig
The GetCaps method retrieves the capabilities of the hardware device that is represented by the device object.

Information retrieved in the structure describes the maximum capabilities of the sound device and those currently available, such as the number of hardware mixing channels and the amount of on-board sound memory. You can use this information to fine-tune performance and optimize resource allocation.

Because of resource-sharing requirements, the maximum capabilities in one area might be available only at the cost of another area.

ee418043 GetCaps GetCaps HRESULT IDirectSound::GetCaps([Out] DSCAPS* pDSCaps)
Initializes a new instance of the class. Initializes a new instance of the class. The driver GUID. Retrieves the speaker configuration of the device. Sets the speaker configuration of the device. Enumerates the DirectSound devices installed in the system. A collection of the devices found. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The VerifyCertification method ascertains whether the device driver is certified for DirectX.
Address of a DWORD variable that receives one of the values shown in the following table.
ValueDescription
DS_CERTIFIEDDriver is certified for DirectSound.
DS_UNCERTIFIEDDriver is not certified for DirectSound.

If the function succeeds, the return value is DS_OK.

If the function fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_INVALIDPARAM
DSERR_UNSUPPORTED

This method may attempt to retrieve certification information from the Internet.

On emulated devices, the method returns DSERR_UNSUPPORTED. Emulated devices are identified by the flag in the dwFlags member of .

microsoft.directx_sdk.idirectsound8.idirectsound8.verifycertification HRESULT IDirectSound8::VerifyCertification([Out] unsigned int* pdwCertified) IDirectSound8::VerifyCertification
Verifies the certification. Return true if the driver is certified No documentation. IDirectSoundCapture IDirectSoundCapture Initializes a new instance of the class. Initializes a new instance of the class. Enumerates the DirectSoundCapture devices installed in the system. A collection of the devices found. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
Pointer to a structure containing values for the capture buffer being created.
Address of a variable that receives an interface reference. Use QueryInterface to obtain . See Remarks.
Address of the controlling object's interface for COM aggregation. Must be null.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values.

Return code
DSERR_INVALIDPARAM
DSERR_BADFORMAT
DSERR_GENERIC
DSERR_NODRIVER
DSERR_OUTOFMEMORY
DSERR_UNINITIALIZED

On Microsoft Windows98 and Windows2000, each capture device supports a single buffer.

The interface is supported only on buffers created by an object of class CLSID_DirectSoundCapture8. If the IDirectSoundCapture8 interface was obtained from DirectSoundCaptureCreate8, is supported. If IDirectSoundCapture8 was obtained from the earlier DirectSoundCaptureCreate function, only is supported.

ee418156 HRESULT IDirectSoundCapture::CreateCaptureBuffer([In] const DSCBUFFERDESC* pcDSCBufferDesc,[Out] IDirectSoundCaptureBuffer** ppDSCBuffer,[In] IUnknown* pUnkOuter) IDirectSoundCapture::CreateCaptureBuffer
The GetCaps method retrieves the capabilities of the capture device.
Pointer to a structure to be receive information about the capture device. When the method is called, the dwSize member must specify the size of the structure in bytes.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_INVALIDPARAM
DSERR_UNSUPPORTED
DSERR_NODRIVER
DSERR_OUTOFMEMORY
DSERR_UNINITIALIZED
ee418158 HRESULT IDirectSoundCapture::GetCaps([Out] DSCCAPS* pDSCCaps) IDirectSoundCapture::GetCaps
The GetCaps method retrieves the capabilities of the capture device. ee418158 GetCaps GetCaps HRESULT IDirectSoundCapture::GetCaps([Out] DSCCAPS* pDSCCaps) No documentation. IDirectSoundFXDistortion IDirectSoundFXDistortion Default percentage of distortion intensity. Maximum percentage of distortion intensity. Minimum percentage of distortion intensity. Default amount of signal change after distortion. Maximum amount of signal change after distortion. Minimum amount of signal change after distortion. Default width of frequency band that determines range of harmonic content addition. Maximum width of frequency band that determines range of harmonic content addition. Minimum width of frequency band that determines range of harmonic content addition. Default center frequency of harmonic content addition. Maximum center frequency of harmonic content addition. Minimum center frequency of harmonic content addition. Default filter cutoff for high-frequency harmonics attenuation. Maximum filter cutoff for high-frequency harmonics attenuation. Minimum filter cutoff for high-frequency harmonics attenuation. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The SetAllParameters method sets the distortion parameters of a buffer.
Address of a structure that specifies the effect parameters.

If the method succeeds, the return value is DS_OK or S_FALSE. See the Remarks for . If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418220 HRESULT IDirectSoundFXDistortion::SetAllParameters([In] const DSFXDistortion* pcDsFxDistortion) IDirectSoundFXDistortion::SetAllParameters
The GetAllParameters method retrieves the distortion parameters of a buffer.
Address of a structure that receives the effect parameters.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418219 HRESULT IDirectSoundFXDistortion::GetAllParameters([Out] DSFXDistortion* pDsFxDistortion) IDirectSoundFXDistortion::GetAllParameters
The GetAllParameters method retrieves the distortion parameters of a buffer. ee418219 GetAllParameters GetAllParameters HRESULT IDirectSoundFXDistortion::GetAllParameters([Out] DSFXDistortion* pDsFxDistortion) No documentation. IDirectSoundFXEcho IDirectSoundFXEcho Default percentage of output fed back into input. Maximum percentage of output fed back into input. Minimum percentage of output fed back into input. Default delay for left channel, in milliseconds. Maximum delay for left channel, in milliseconds. Minimum delay for left channel, in milliseconds. Default value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Maximum value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Minimum value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Default delay for right channel, in milliseconds. Maximum delay for right channel, in milliseconds. Minimum delay for right channel, in milliseconds. Default ratio of wet (processed) signal to dry (unprocessed) signal. Maximum ratio of wet (processed) signal to dry (unprocessed) signal. Minimum ratio of wet (processed) signal to dry (unprocessed) signal. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The SetAllParameters method sets the echo parameters of a buffer.
Address of a structure that specifies the effect parameters.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418224 HRESULT IDirectSoundFXEcho::SetAllParameters([In] const DSFXEcho* pcDsFxEcho) IDirectSoundFXEcho::SetAllParameters
No documentation. No documentation. No documentation. HRESULT IDirectSoundFXEcho::GetAllParameters([Out] DSFXEcho* pDsFxEcho) IDirectSoundFXEcho::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXEcho::GetAllParameters([Out] DSFXEcho* pDsFxEcho) The namespace provides a managed DirectSound API. ee416960 DirectSound DirectSound No documentation. IDirectSound3DBuffer IDirectSound3DBuffer Default cone angle, in degrees. Default outside cone volume. Volume levels are expressed as attenuation, in hundredths of a decibel. Default maximum distance, in meters. Default minimum distance, in meters. Maximum cone angle, in degrees. Minimum cone angle, in degrees. Initializes a new instance of the class. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The GetAllParameters method retrieves the 3D properties of the sound buffer.
Address of a structure that receives the information describing the 3D characteristics of the sound buffer.

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be DSERR_INVALIDPARAM.

ee417963 HRESULT IDirectSound3DBuffer::GetAllParameters([Out] DS3DBUFFER* pDs3dBuffer) IDirectSound3DBuffer::GetAllParameters
The GetConeAngles method retrieves the inside and outside angles of the sound projection cone.
Addresses of a variable that receives the inside angle of the sound projection cone, in degrees. This is the angle within which the sound is at its normal volume.
Addresses of a variable that receives the outside angle of the sound projection cone, in degrees. This is the angle outside of which the sound is at its outside volume.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The minimum, maximum, and default cone angles are defined in Dsound.h as DS3D_MINCONEANGLE, DS3D_MAXCONEANGLE, and DS3D_DEFAULTCONEANGLE.

ee417965 HRESULT IDirectSound3DBuffer::GetConeAngles([Out] unsigned int* pdwInsideConeAngle,[Out] unsigned int* pdwOutsideConeAngle) IDirectSound3DBuffer::GetConeAngles
The GetConeOrientation method retrieves the orientation of the sound projection cone.
Address of a structure that receives the orientation of the sound projection cone. The vector information represents the center of the sound cone.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The values returned are not necessarily the same as those set by using the SetConeOrientation method. DirectSound normalizes orientation vectors so that all axes have a magnitude of less than or equal to 1.0.

ee417966 HRESULT IDirectSound3DBuffer::GetConeOrientation([Out] D3DVECTOR* pvOrientation) IDirectSound3DBuffer::GetConeOrientation
The GetConeOutsideVolume method retrieves the volume of the sound outside the outside angle of the sound projection cone.
Address of a variable that receives the cone outside volume for this buffer.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Volume levels are expressed as attenuation, in hundredths of a decibel. Allowable values are between DSBVOLUME_MAX (no attenuation) and DSBVOLUME_MIN (silence). The default value is DS3D_DEFAULTCONEOUTSIDEVOLUME (no attenuation). These values are defined in Dsound.h. DirectSound does not support amplification.

ee417969 HRESULT IDirectSound3DBuffer::GetConeOutsideVolume([Out] int* plConeOutsideVolume) IDirectSound3DBuffer::GetConeOutsideVolume
The GetMaxDistance method retrieves the maximum distance, which is the distance from the listener beyond which sounds in this buffer are no longer attenuated.
Address of a variable that receives the maximum distance, in meters by default. D3DVALUE is defined as float.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The default maximum distance, defined as DS3D_DEFAULTMAXDISTANCE, is effectively infinite.

ee417971 HRESULT IDirectSound3DBuffer::GetMaxDistance([Out] float* pflMaxDistance) IDirectSound3DBuffer::GetMaxDistance
The GetMinDistance method retrieves the minimum distance, which is the distance from the listener at which sounds in this buffer begin to be attenuated.
Address of a variable that receives the minimum distance, in meters by default. D3DVALUE is defined as float.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

By default, the minimum distance value is DS3D_DEFAULTMINDISTANCE, defined as 1.0 (corresponding to 1.0 meter at the default distance factor of 1.0 meters per unit).

ee417973 HRESULT IDirectSound3DBuffer::GetMinDistance([Out] float* pflMinDistance) IDirectSound3DBuffer::GetMinDistance
The GetMode method retrieves the operation mode for 3D sound processing.
Address of a variable that receives the mode setting. This value will be one of those in the following table.
ValueDescription
Processing of 3D sound is disabled. The sound seems to originate from the center of the listener's head.
Sound parameters (position, velocity, and orientation) are relative to the listener's parameters. In this mode, the absolute parameters of the sound are updated automatically as the listener's parameters change, so that the relative parameters remain constant.
Normal processing. This is the default mode.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee417975 HRESULT IDirectSound3DBuffer::GetMode([Out] unsigned int* pdwMode) IDirectSound3DBuffer::GetMode
No documentation. No documentation. No documentation. HRESULT IDirectSound3DBuffer::GetPosition([Out] D3DVECTOR* pvPosition) IDirectSound3DBuffer::GetPosition The GetVelocity method retrieves the velocity of the sound source.
Address of a structure that receives the sound buffer's velocity, in meters per second by default.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Velocity is used for Doppler effects only. It does not actually move the buffer. For more information, see Doppler Effect.

The default unit of measurement is meters per second, but this can be changed by using the SetDistanceFactor method.

ee417979 HRESULT IDirectSound3DBuffer::GetVelocity([Out] D3DVECTOR* pvVelocity) IDirectSound3DBuffer::GetVelocity
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DBuffer::SetAllParameters([In] const DS3DBUFFER* pcDs3dBuffer,[In] unsigned int dwApply) IDirectSound3DBuffer::SetAllParameters The SetConeAngles method sets the inside and outside angles of the sound projection cone.
Inside cone angle, in degrees. This is the angle within which the sound is at its normal volume.
Outside cone angle, in degrees. This is the angle outside of which the sound is at its outside volume.
Value that indicates when the setting should be applied. Must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The minimum, maximum, and default cone angles are defined in Dsound.h as DS3D_MINCONEANGLE, DS3D_MAXCONEANGLE, and DS3D_DEFAULTCONEANGLE. Each angle must be in the range of 0 degrees (no cone) to 360 degrees (the full sphere). The default value is 360.

ee417984 HRESULT IDirectSound3DBuffer::SetConeAngles([In] unsigned int dwInsideConeAngle,[In] unsigned int dwOutsideConeAngle,[In] unsigned int dwApply) IDirectSound3DBuffer::SetConeAngles
The SetConeOrientation method sets the orientation of the sound projection cone.
Value that specifies the x coordinate of the sound cone orientation vector. D3DVALUE is defined as float.
Value that specifies the y coordinate of the sound cone orientation vector. D3DVALUE is defined as float.
Value that specifies the z coordinate of the sound cone orientation vector. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

This method has no effect unless the cone angle and cone outside volume have also been set to values other than the default.

ee417986 HRESULT IDirectSound3DBuffer::SetConeOrientation([In] float x,[In] float y,[In] float z,[In] unsigned int dwApply) IDirectSound3DBuffer::SetConeOrientation
The SetConeOutsideVolume method sets the volume of the sound outside the outside angle of the sound projection cone.
Cone outside volume, in hundredths of a decibel.
Value that specifies when the setting should be applied. This value must be one of the those shown in the following table.
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Volume levels are represented by attenuation. Allowable values are between DSBVOLUME_MAX (no attenuation) and DSBVOLUME_MIN (silence). The default value is DS3D_DEFAULTCONEOUTSIDEVOLUME (no attenuation). These values are defined in Dsound.h. DirectSound does not support amplification.

ee417987 HRESULT IDirectSound3DBuffer::SetConeOutsideVolume([In] int lConeOutsideVolume,[In] unsigned int dwApply) IDirectSound3DBuffer::SetConeOutsideVolume
The SetMaxDistance method sets the maximum distance, which is the distance from the listener beyond which sounds in this buffer are no longer attenuated.
Maximum distance, in meters by default. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The default maximum distance, defined as DS3D_DEFAULTMAXDISTANCE, is effectively infinite.

The default unit of measurement is meters, but this can be changed by using the SetDistanceFactor method.

ee417989 HRESULT IDirectSound3DBuffer::SetMaxDistance([In] float flMaxDistance,[In] unsigned int dwApply) IDirectSound3DBuffer::SetMaxDistance
The SetMinDistance method sets the minimum distance, which is the distance from the listener at which sounds in this buffer begin to be attenuated.
Minimum distance, in meters by default. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

By default, the minimum distance value is DS3D_DEFAULTMINDISTANCE, defined as 1.0 (corresponding to 1.0 meter at the default distance factor of 1.0 meters per unit).

The default unit of measurement is meters, but this can be changed by using the SetDistanceFactor method.

ee417991 HRESULT IDirectSound3DBuffer::SetMinDistance([In] float flMinDistance,[In] unsigned int dwApply) IDirectSound3DBuffer::SetMinDistance
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DBuffer::SetMode([In] unsigned int dwMode,[In] unsigned int dwApply) IDirectSound3DBuffer::SetMode The SetPosition method sets the position of the sound source.
Value that specifies the x coordinate of the position vector. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies the y coordinate of the position vector. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies the z coordinate of the position vector. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The default unit of measurement is meters, but this can be changed by using the SetDistanceFactor method.

ee417996 HRESULT IDirectSound3DBuffer::SetPosition([In] float x,[In] float y,[In] float z,[In] unsigned int dwApply) IDirectSound3DBuffer::SetPosition
The SetVelocity method sets the velocity of the sound source.
Value that specifies the x coordinate of the velocity vector, in meters per second by default. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies the y coordinate of the velocity vector, in meters per second by default. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies the z coordinate of the velocity vector, in meters per second by default. DirectSound may adjust these values to prevent floating-point overflow. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Velocity is used only for calculating Doppler effect. It does not change the position of the buffer. For more information, see Doppler Effect.

The default unit of measurement is meters per second, but this can be changed by using the SetDistanceFactor method.

ee418001 HRESULT IDirectSound3DBuffer::SetVelocity([In] float x,[In] float y,[In] float z,[In] unsigned int dwApply) IDirectSound3DBuffer::SetVelocity
Gets or sets all the parameters of a buffer The orientation of the sound projection cone. The volume of the sound outside the outside angle of the sound projection cone. Settings are not applied until the application calls the SoundListener3D.CommitDeferredSettings() if true. The inside angle of the sound projection cone. The maximum distance, which is the distance from the listener beyond which sounds in this buffer are no longer attenuated. The minimum distance, which is the distance from the listener at which sounds in this buffer begin to be attenuated. The operation mode for 3-D sound processing. The outside angle of the sound projection cone. The position of the sound source. The velocity of the sound source. The structure describes an effect associated with a buffer.

Custom effects can be implemented as DMOs. Effect DMOs must implement the and interfaces.

If dwFlags is zero, the effect is placed in hardware if possible. If the hardware does not support the effect (always the case since DirectX 9.0), software is used. If the effect is not available at all, the call to SetFX fails.

ee416828 DSEFFECTDESC DSEFFECTDESC
Initializes a new instance of the class.
Size of the structure, in bytes.
ee416828 unsigned int dwSize unsigned int dwSize
Flags. Can be zero or one of the following values.
Value Description
DSFX_LOCHARDWARE Effect must be in hardware. If the effect is not available in hardware, raises an error. Since DirectX 9.0, DirectX does not support hardware acceleration of effects, so this flag should not be used.
DSFX_LOCSOFTWARE Effect must be in software, even if the hardware supports acceleration of guidDSFXClass. If the effect is not available in software, SetFX raises an error. Since DirectX 9.0, all effects are in software regardless of whether this flag is set.
ee416828 unsigned int dwFlags unsigned int dwFlags
Class identifier of the effect. The following standard effect classes are defined.
Value Description
Chorus
Compressor
Distortion
Echo
Flanger
Gargle
Interactive 3D Level 2 reverb
Parametric equalizer
Waves reverb
ee416828 GUID guidDSFXClass GUID guidDSFXClass
Reserved for future use.
ee416828 ULONG_PTR dwReserved1 ULONG_PTR dwReserved1
Reserved for future use.
ee416828 ULONG_PTR dwReserved2 ULONG_PTR dwReserved2
Enumerator callback for DirectSound and DirectCaptureSound. Initializes a new instance of the class. Natives the pointer. Gets or sets the informations. The informations. No documentation. IDirectSoundFXFlanger IDirectSoundFXFlanger Default number of milliseconds the input is delayed before it is played back. Maximum number of milliseconds the input is delayed before it is played back. Minimum number of milliseconds the input is delayed before it is played back. Default percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point. Maximum percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point. Minimum percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point. Default percentage of output signal to feed back into the effect's input. Maximum percentage of output signal to feed back into the effect's input. Minimum percentage of output signal to feed back into the effect's input. Default frequency of the LFO(low-frequency oscillator). Maximum frequency of the LFO(low-frequency oscillator). Minimum frequency of the LFO(low-frequency oscillator). Positive 180 phase differential between left and right LFOs. Positive 90 phase differential between left and right LFOs. Default phase differential between left and right LFOs. Maximum phase differential between left and right LFOs. Minimum phase differential between left and right LFOs. Negative 180 phase differential between left and right LFOs. Negative 90 phase differential between left and right LFOs. Zero phase differential between left and right LFOs. Default waveform shape of the LFO. By default, the waveform is a sine. Sine waveform shape of the LFO. By default, the waveform is a sine. Triangular waveform shape of the LFO. By default, the waveform is a sine. Default ratio of wet (processed) signal to dry (unprocessed) signal. Maximum ratio of wet (processed) signal to dry (unprocessed) signal. Minimum ratio of wet (processed) signal to dry (unprocessed) signal. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXFlanger::SetAllParameters([In] const DSFXFlanger* pcDsFxFlanger) IDirectSoundFXFlanger::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXFlanger::GetAllParameters([Out] DSFXFlanger* pDsFxFlanger) IDirectSoundFXFlanger::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXFlanger::GetAllParameters([Out] DSFXFlanger* pDsFxFlanger) No documentation. IDirectSoundFullDuplex IDirectSoundFullDuplex Initializes a new instance of the class. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. IDirectSoundFXGargle IDirectSoundFXGargle Default rate of modulation, in Hertz. Maximum rate of modulation, in Hertz. Minimum rate of modulation, in Hertz. Default shape of the modulation waveform. Square shape of the modulation waveform. Triangular shape of the modulation waveform. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXGargle::SetAllParameters([In] const DSFXGargle* pcDsFxGargle) IDirectSoundFXGargle::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXGargle::GetAllParameters([Out] DSFXGargle* pDsFxGargle) IDirectSoundFXGargle::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXGargle::GetAllParameters([Out] DSFXGargle* pDsFxGargle) No documentation. DSCFX_AEC_MODE DSCFX_AEC_MODE No documentation. DSCFX_AEC_MODE_PASS_THROUGH DSCFX_AEC_MODE_PASS_THROUGH No documentation. DSCFX_AEC_MODE_HALF_DUPLEX DSCFX_AEC_MODE_HALF_DUPLEX No documentation. DSCFX_AEC_MODE_FULL_DUPLEX DSCFX_AEC_MODE_FULL_DUPLEX No documentation. DSCFX_AEC_STATUS DSCFX_AEC_STATUS No documentation. DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED No documentation. DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED No documentation. DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED No documentation. DSCFX_AEC_STATUS_CURRENTLY_CONVERGED DSCFX_AEC_STATUS_CURRENTLY_CONVERGED No documentation. DSBCAPS_FLAGS DSBCAPS_FLAGS No documentation. DSBCAPS_PRIMARYBUFFER DSBCAPS_PRIMARYBUFFER No documentation. DSBCAPS_STATIC DSBCAPS_STATIC No documentation. DSBCAPS_LOCHARDWARE DSBCAPS_LOCHARDWARE No documentation. DSBCAPS_LOCSOFTWARE DSBCAPS_LOCSOFTWARE No documentation. DSBCAPS_CTRL3D DSBCAPS_CTRL3D No documentation. DSBCAPS_CTRLFREQUENCY DSBCAPS_CTRLFREQUENCY No documentation. DSBCAPS_CTRLPAN DSBCAPS_CTRLPAN No documentation. DSBCAPS_CTRLVOLUME DSBCAPS_CTRLVOLUME No documentation. DSBCAPS_CTRLPOSITIONNOTIFY DSBCAPS_CTRLPOSITIONNOTIFY No documentation. DSBCAPS_CTRLFX DSBCAPS_CTRLFX No documentation. DSBCAPS_STICKYFOCUS DSBCAPS_STICKYFOCUS No documentation. DSBCAPS_GLOBALFOCUS DSBCAPS_GLOBALFOCUS No documentation. DSBCAPS_GETCURRENTPOSITION2 DSBCAPS_GETCURRENTPOSITION2 No documentation. DSBCAPS_MUTE3DATMAXDISTANCE DSBCAPS_MUTE3DATMAXDISTANCE No documentation. DSBCAPS_LOCDEFER DSBCAPS_LOCDEFER No documentation. DSBCAPS_TRUEPLAYPOSITION DSBCAPS_TRUEPLAYPOSITION None. None None No documentation. DSBSTATUS_FLAGS DSBSTATUS_FLAGS No documentation. DSBSTATUS_PLAYING DSBSTATUS_PLAYING No documentation. DSBSTATUS_BUFFERLOST DSBSTATUS_BUFFERLOST No documentation. DSBSTATUS_LOOPING DSBSTATUS_LOOPING No documentation. DSBSTATUS_LOCHARDWARE DSBSTATUS_LOCHARDWARE No documentation. DSBSTATUS_LOCSOFTWARE DSBSTATUS_LOCSOFTWARE No documentation. DSBSTATUS_TERMINATED DSBSTATUS_TERMINATED None. None None No documentation. DSCAPS_FLAGS DSCAPS_FLAGS No documentation. DSCAPS_PRIMARYMONO DSCAPS_PRIMARYMONO No documentation. DSCAPS_PRIMARYSTEREO DSCAPS_PRIMARYSTEREO No documentation. DSCAPS_PRIMARY8BIT DSCAPS_PRIMARY8BIT No documentation. DSCAPS_PRIMARY16BIT DSCAPS_PRIMARY16BIT No documentation. DSCAPS_CONTINUOUSRATE DSCAPS_CONTINUOUSRATE No documentation. DSCAPS_EMULDRIVER DSCAPS_EMULDRIVER No documentation. DSCAPS_CERTIFIED DSCAPS_CERTIFIED No documentation. DSCAPS_SECONDARYMONO DSCAPS_SECONDARYMONO No documentation. DSCAPS_SECONDARYSTEREO DSCAPS_SECONDARYSTEREO No documentation. DSCAPS_SECONDARY8BIT DSCAPS_SECONDARY8BIT No documentation. DSCAPS_SECONDARY16BIT DSCAPS_SECONDARY16BIT None. None None No documentation. DSCBCAPS_FLAGS DSCBCAPS_FLAGS No documentation. DSCBCAPS_WAVEMAPPED DSCBCAPS_WAVEMAPPED No documentation. DSCBCAPS_CTRLFX DSCBCAPS_CTRLFX None. None None No documentation. DSCBSTATUS_FLAGS DSCBSTATUS_FLAGS No documentation. DSCBSTATUS_CAPTURING DSCBSTATUS_CAPTURING No documentation. DSCBSTATUS_LOOPING DSCBSTATUS_LOOPING None. None None No documentation. DSCCAPS_FLAGS DSCCAPS_FLAGS No documentation. DSCCAPS_EMULDRIVER DSCCAPS_EMULDRIVER No documentation. DSCCAPS_CERTIFIED DSCCAPS_CERTIFIED No documentation. DSCCAPS_MULTIPLECAPTURE DSCCAPS_MULTIPLECAPTURE None. None None No documentation. DSCFX_ENUM DSCFX_ENUM No documentation. DSCFX_LOCHARDWARE DSCFX_LOCHARDWARE No documentation. DSCFX_LOCSOFTWARE DSCFX_LOCSOFTWARE No documentation. DSSCL_ENUM DSSCL_ENUM No documentation. DSSCL_NORMAL DSSCL_NORMAL No documentation. DSSCL_PRIORITY DSSCL_PRIORITY No documentation. DSSCL_EXCLUSIVE DSSCL_EXCLUSIVE No documentation. DSSCL_WRITEPRIMARY DSSCL_WRITEPRIMARY No documentation. DSOUND_ENUM_1 DSOUND_ENUM_1 No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_CITY DSFX_I3DL2_ENVIRONMENT_PRESET_CITY No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL No documentation. DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE No documentation. DSOUND_ENUM_2 DSOUND_ENUM_2 No documentation. DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW No documentation. DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW No documentation. DSFX_I3DL2_MATERIAL_PRESET_THINDOOR DSFX_I3DL2_MATERIAL_PRESET_THINDOOR No documentation. DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR No documentation. DSFX_I3DL2_MATERIAL_PRESET_WOODWALL DSFX_I3DL2_MATERIAL_PRESET_WOODWALL No documentation. DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL No documentation. DSFX_I3DL2_MATERIAL_PRESET_STONEWALL DSFX_I3DL2_MATERIAL_PRESET_STONEWALL No documentation. DSFX_I3DL2_MATERIAL_PRESET_CURTAIN DSFX_I3DL2_MATERIAL_PRESET_CURTAIN No documentation. DSBLOCK_ENUM DSBLOCK_ENUM No documentation. DSBLOCK_FROMWRITECURSOR DSBLOCK_FROMWRITECURSOR No documentation. DSBLOCK_ENTIREBUFFER DSBLOCK_ENTIREBUFFER None. None None No documentation. DS3DMODE DS3DMODE No documentation. DS3DMODE_NORMAL DS3DMODE_NORMAL No documentation. DS3DMODE_HEADRELATIVE DS3DMODE_HEADRELATIVE No documentation. DS3DMODE_DISABLE DS3DMODE_DISABLE No documentation. DSBPLAY_FLAGS DSBPLAY_FLAGS No documentation. DSBPLAY_LOOPING DSBPLAY_LOOPING No documentation. DSBPLAY_LOCHARDWARE DSBPLAY_LOCHARDWARE No documentation. DSBPLAY_LOCSOFTWARE DSBPLAY_LOCSOFTWARE No documentation. DSBPLAY_TERMINATEBY_TIME DSBPLAY_TERMINATEBY_TIME No documentation. DSBPLAY_TERMINATEBY_DISTANCE DSBPLAY_TERMINATEBY_DISTANCE No documentation. DSBPLAY_TERMINATEBY_PRIORITY DSBPLAY_TERMINATEBY_PRIORITY None. None None No documentation. DSOUND_ENUM_0 DSOUND_ENUM_0 No documentation. DSFXR_PRESENT DSFXR_PRESENT No documentation. DSFXR_LOCHARDWARE DSFXR_LOCHARDWARE No documentation. DSFXR_LOCSOFTWARE DSFXR_LOCSOFTWARE No documentation. DSFXR_UNALLOCATED DSFXR_UNALLOCATED No documentation. DSFXR_FAILED DSFXR_FAILED No documentation. DSFXR_UNKNOWN DSFXR_UNKNOWN No documentation. DSFXR_SENDLOOP DSFXR_SENDLOOP No documentation. DSSPEAKER_ENUM DSSPEAKER_ENUM No documentation. DSSPEAKER_DIRECTOUT DSSPEAKER_DIRECTOUT No documentation. DSSPEAKER_HEADPHONE DSSPEAKER_HEADPHONE No documentation. DSSPEAKER_MONO DSSPEAKER_MONO No documentation. DSSPEAKER_QUAD DSSPEAKER_QUAD No documentation. DSSPEAKER_STEREO DSSPEAKER_STEREO No documentation. DSSPEAKER_SURROUND DSSPEAKER_SURROUND No documentation. DSSPEAKER_5POINT1 DSSPEAKER_5POINT1 No documentation. DSSPEAKER_7POINT1 DSSPEAKER_7POINT1 No documentation. DSSPEAKER_7POINT1_SURROUND DSSPEAKER_7POINT1_SURROUND No documentation. DSSPEAKER_5POINT1_SURROUND DSSPEAKER_5POINT1_SURROUND No documentation. DSSPEAKER_7POINT1_WIDE DSSPEAKER_7POINT1_WIDE No documentation. DSSPEAKER_5POINT1_BACK DSSPEAKER_5POINT1_BACK No documentation. DSSPEAKER_GEOMETRY_ENUM DSSPEAKER_GEOMETRY_ENUM No documentation. DSSPEAKER_GEOMETRY_MIN DSSPEAKER_GEOMETRY_MIN No documentation. DSSPEAKER_GEOMETRY_NARROW DSSPEAKER_GEOMETRY_NARROW No documentation. DSSPEAKER_GEOMETRY_WIDE DSSPEAKER_GEOMETRY_WIDE No documentation. DSSPEAKER_GEOMETRY_MAX DSSPEAKER_GEOMETRY_MAX Functions Constant AcousticEchoCancellationCaptureEffect. GUID_DSCFX_CLASS_AEC Constant MicrosoftAcousticEchoCancellationCaptureEffect. GUID_DSCFX_MS_AEC Constant SystemAcousticEchoCancellationCaptureEffect. GUID_DSCFX_SYSTEM_AEC Constant NoiseSuppressionCaptureEffect. GUID_DSCFX_CLASS_NS Constant MicrosoftNoiseSuppressionCaptureEffect. GUID_DSCFX_MS_NS Constant SystemNoiseSuppressionCaptureEffect. GUID_DSCFX_SYSTEM_NS Functions Constant FullHrt3DAlgorithm. DS3DALG_HRTF_FULL Constant LightHrt3DAlgorithm. DS3DALG_HRTF_LIGHT Constant NoVirtualization3DAlgorithm. DS3DALG_NO_VIRTUALIZATION Functions Constant AllObjects. GUID_All_Objects The GetDeviceID function retrieves the unique device identifier of the default playback and capture devices selected by the user in Control Panel.
Address of a variable that specifies a valid device identifier, or the address of one of the following predefined variables.
ValueDescription
DSDEVID_DefaultPlaybackSystem-wide default audio playback device.
DSDEVID_DefaultCaptureSystem-wide default audio capture device.
DSDEVID_DefaultVoicePlaybackDefault voice playback device.
DSDEVID_DefaultVoiceCaptureDefault voice capture device.
Address of a variable that receives the unique identifier of the device.

If the function succeeds, it returns DS_OK. If it fails, the return value may be DSERR_INVALIDPARAM.

If pGuidSrc points to a valid device identifier, the same value is returned in pGuidDest. If pGuidSrc is one of the listed constants, pGuidDest returns the address of the corresponding device .

microsoft.directx_sdk.reference.getdeviceid HRESULT GetDeviceID([In, Optional] const GUID* pGuidSrc,[Out] GUID* pGuidDest) GetDeviceID
The DirectSoundCaptureCreate8 function creates and initializes an object that supports the IDirectSoundCapture8 interface. Although the olderDirectSoundCaptureCreatefunction can also be used to obtain theIDirectSoundCapture8interface, the object created by that function cannot be used to create capture buffers that support theIDirectSoundCaptureBuffer8interface. No documentation. No documentation. No documentation.

If the function succeeds, it returns DS_OK. If it fails, the return value may be one of the following values.

Return Code
DSERR_ALLOCATED
DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_OUTOFMEMORY

On sound cards that do not support full duplex, this method will fail and return DSERR_ALLOCATED.

microsoft.directx_sdk.reference.directsoundcapturecreate8 HRESULT DirectSoundCaptureCreate8([In, Optional] const GUID* pcGuidDevice,[Out, Fast] IDirectSoundCapture** ppDSC8,[In] IUnknown* pUnkOuter) DirectSoundCaptureCreate8
No documentation. No documentation. No documentation. No documentation. HRESULT DirectSoundEnumerateA([In] __function__stdcall* pDSEnumCallback,[In, Optional] void* pContext) DirectSoundEnumerateA No documentation. No documentation. No documentation. No documentation. HRESULT DirectSoundEnumerateW([In] __function__stdcall* pDSEnumCallback,[In, Optional] void* pContext) DirectSoundEnumerateW No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT DirectSoundCaptureCreate([In, Optional] const GUID* pcGuidDevice,[Out] IDirectSoundCapture** ppDSC,[In] IUnknown* pUnkOuter) DirectSoundCaptureCreate

The DirectSoundFullDuplexCreate function is documented under a different name. For complete documentation of this function, see DirectSoundFullDuplexCreate8.

No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation.

If this function succeeds, it returns . Otherwise, it returns an error code.

bb432248 HRESULT DirectSoundFullDuplexCreate([In, Optional] const GUID* pcGuidCaptureDevice,[In, Optional] const GUID* pcGuidRenderDevice,[In] const DSCBUFFERDESC* pcDSCBufferDesc,[In] const DSBUFFERDESC* pcDSBufferDesc,[In] HWND hWnd,[In] unsigned int dwLevel,[Out, Fast] IDirectSoundFullDuplex** ppDSFD,[Out] IDirectSoundCaptureBuffer8** ppDSCBuffer8,[Out] IDirectSoundBuffer8** ppDSBuffer8,[In] IUnknown* pUnkOuter) DirectSoundFullDuplexCreate
The DirectSoundCreate8 function creates and initializes an object that supports theIDirectSound8interface. No documentation. No documentation. No documentation.

If the function succeeds, it returns DS_OK. If it fails, the return value may be one of the following.

Return Code
DSERR_ALLOCATED
DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_NODRIVER
DSERR_OUTOFMEMORY

The application must call the IDirectSound8::SetCooperativeLevel method immediately after creating a device object.

microsoft.directx_sdk.reference.directsoundcreate8 HRESULT DirectSoundCreate8([In, Optional] const GUID* pcGuidDevice,[Out, Fast] IDirectSound8** ppDS8,[In] IUnknown* pUnkOuter) DirectSoundCreate8
The DirectSoundCaptureEnumerate function enumerates the DirectSoundCapture objects installed in the system.
Address of the DSEnumCallback function that will be called for each DirectSoundCapture object installed in the system.
Address of the user-defined context passed to the enumeration callback function every time that function is called.

If the function succeeds, it returns DS_OK. If it fails, the return value may be DSERR_INVALIDPARAM.

microsoft.directx_sdk.reference.directsoundcaptureenumerate HRESULT DirectSoundCaptureEnumerateA([In] __function__stdcall* pDSEnumCallback,[In, Optional] void* pContext) DirectSoundCaptureEnumerateA
The DirectSoundCaptureEnumerate function enumerates the DirectSoundCapture objects installed in the system.
Address of the DSEnumCallback function that will be called for each DirectSoundCapture object installed in the system.
Address of the user-defined context passed to the enumeration callback function every time that function is called.

If the function succeeds, it returns DS_OK. If it fails, the return value may be DSERR_INVALIDPARAM.

microsoft.directx_sdk.reference.directsoundcaptureenumerate HRESULT DirectSoundCaptureEnumerateW([In] __function__stdcall* pDSEnumCallback,[In, Optional] void* pContext) DirectSoundCaptureEnumerateW
No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT DirectSoundCreate([In, Optional] const GUID* pcGuidDevice,[Out] IDirectSound** ppDS,[In] IUnknown* pUnkOuter) DirectSoundCreate Functions Constant StandardI3DL2REVERB. GUID_DSFX_STANDARD_I3DL2REVERB Constant StandardDistortion. GUID_DSFX_STANDARD_DISTORTION Constant StandardFlanger. GUID_DSFX_STANDARD_FLANGER Constant StandardChorus. GUID_DSFX_STANDARD_CHORUS Constant StandardCompressor. GUID_DSFX_STANDARD_COMPRESSOR Constant WavesReverb. GUID_DSFX_WAVES_REVERB Constant StandardEcho. GUID_DSFX_STANDARD_ECHO Constant StandardParameq. GUID_DSFX_STANDARD_PARAMEQ Constant StandardGargle. GUID_DSFX_STANDARD_GARGLE No documentation. IDirectSoundCaptureFXAec IDirectSoundCaptureFXAec Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureFXAec::SetAllParameters([In] const DSCFXAec* pDscFxAec) IDirectSoundCaptureFXAec::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureFXAec::GetAllParameters([Out] DSCFXAec* pDscFxAec) IDirectSoundCaptureFXAec::GetAllParameters The IDirectSoundCaptureFXAec8::GetStatus method retrieves the status of the effect.
Address of a DWORD variable to receive the status. The following flags are defined. See Remarks.
ConstantValue
0x0
0x1
0x2
0x8

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following values.

Return code
DSERR_INVALIDPARAM
DSERR_OUTOFMEMORY
Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

The three least significant bits in *pdwStatus describe the convergence history; that is, the success of the effect in canceling the echo. The convergence history can be used by the application to determine if the algorithm has converged and remained in the converged state since it started processing data.

Initially, the AEC algorithm sets the three lower bits to 0 for the uninitialized state (). When the AEC algorithm has converged, the convergence history is switched to the state. If the AEC algorithm ever loses convergence, the convergence history is then transitioned to the state. A transition from to is also possible. The convergence history remains in the state until the algorithm is reset or timely data is no longer arriving on the capture or render stream.

ee418190 HRESULT IDirectSoundCaptureFXAec::GetStatus([Out] DSCFX_AEC_STATUS* pdwStatus) IDirectSoundCaptureFXAec::GetStatus
The IDirectSoundCaptureFXAec8::Reset method resets the effect to its initial state.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_OUTOFMEMORY.

Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

Applications should not reset an effect except when necessary because it has entered an incorrect state. This might be done in response to user input. An effect must not be reset arbitrarily at startup, because another application might be using the same effect.

ee418192 HRESULT IDirectSoundCaptureFXAec::Reset() IDirectSoundCaptureFXAec::Reset
No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundCaptureFXAec::GetAllParameters([Out] DSCFXAec* pDscFxAec) The IDirectSoundCaptureFXAec8::GetStatus method retrieves the status of the effect.
Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

The three least significant bits in *pdwStatus describe the convergence history; that is, the success of the effect in canceling the echo. The convergence history can be used by the application to determine if the algorithm has converged and remained in the converged state since it started processing data.

Initially, the AEC algorithm sets the three lower bits to 0 for the uninitialized state (). When the AEC algorithm has converged, the convergence history is switched to the state. If the AEC algorithm ever loses convergence, the convergence history is then transitioned to the state. A transition from to is also possible. The convergence history remains in the state until the algorithm is reset or timely data is no longer arriving on the capture or render stream.

ee418190 GetStatus GetStatus HRESULT IDirectSoundCaptureFXAec::GetStatus([Out] DSCFX_AEC_STATUS* pdwStatus)
No documentation. bb280379 IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb Default ratio of the decay time at high frequencies to the decay time at low frequencies. Maximum ratio of the decay time at high frequencies to the decay time at low frequencies. Minimum ratio of the decay time at high frequencies to the decay time at low frequencies. Default decay time, in seconds. Maximum decay time, in seconds. Minimum decay time, in seconds. Default modal density in the late reverberation decay, in percent. Maximum modal density in the late reverberation decay, in percent. Minimum modal density in the late reverberation decay, in percent. Default echo density in the late reverberation decay, in percent. Maximum echo density in the late reverberation decay, in percent. Minimum echo density in the late reverberation decay, in percent. Default reference high frequency, in hertz. Maximum reference high frequency, in hertz. Minimum reference high frequency, in hertz. Default attenuation of early reflections relative to Room, in mB. Default delay time of the first reflection relative to the direct path, in seconds. Maximum delay time of the first reflection relative to the direct path, in seconds. Minimum delay time of the first reflection relative to the direct path, in seconds. Maximum attenuation of early reflections relative to Room, in mB. Minimum attenuation of early reflections relative to Room, in mB. Default attenuation of late reverberation relative to Room, in mB. Default time limit between the early reflections and the late reverberation relative to the time of the first reflection, in seconds. Maximum time limit between the early reflections and the late reverberation relative to the time of the first reflection, in seconds. Minimum time limit between the early reflections and the late reverberation relative to the time of the first reflection, in seconds. Maximum attenuation of late reverberation relative to Room, in mB. Minimum attenuation of late reverberation relative to Room, in mB. Default attenuation of the room effect, in millibels (mB). Default attenuation of the room high-frequency effect, in mB. Maximum attenuation of the room high-frequency effect, in mB. Minimum attenuation of the room high-frequency effect, in mB. Maximum attenuation of the room effect, in millibels (mB). Minimum attenuation of the room effect, in millibels (mB). Default rolloff factor for the reflected signals. The rolloff factor for the direct path is controlled by the DirectSound listener. Maximum rolloff factor for the reflected signals. The rolloff factor for the direct path is controlled by the DirectSound listener. Minimum rolloff factor for the reflected signals. The rolloff factor for the direct path is controlled by the DirectSound listener. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::SetAllParameters([In] const DSFXI3DL2Reverb* pcDsFxI3DL2Reverb) IDirectSoundFXI3DL2Reverb::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::GetAllParameters([Out] DSFXI3DL2Reverb* pDsFxI3DL2Reverb) IDirectSoundFXI3DL2Reverb::GetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::SetPreset([In] unsigned int dwPreset) IDirectSoundFXI3DL2Reverb::SetPreset No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::GetPreset([Out] unsigned int* pdwPreset) IDirectSoundFXI3DL2Reverb::GetPreset No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::SetQuality([In] int lQuality) IDirectSoundFXI3DL2Reverb::SetQuality No documentation. No documentation. No documentation. HRESULT IDirectSoundFXI3DL2Reverb::GetQuality([Out] int* plQuality) IDirectSoundFXI3DL2Reverb::GetQuality No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXI3DL2Reverb::GetAllParameters([Out] DSFXI3DL2Reverb* pDsFxI3DL2Reverb) No documentation. GetPreset GetPreset HRESULT IDirectSoundFXI3DL2Reverb::GetPreset([Out] unsigned int* pdwPreset) No documentation. GetQuality GetQuality HRESULT IDirectSoundFXI3DL2Reverb::GetQuality([Out] int* plQuality) No documentation. IDirectSoundCaptureFXNoiseSuppress IDirectSoundCaptureFXNoiseSuppress Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureFXNoiseSuppress::SetAllParameters([In] const DSCFXNoiseSuppress* pcDscFxNoiseSuppress) IDirectSoundCaptureFXNoiseSuppress::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundCaptureFXNoiseSuppress::GetAllParameters([Out] DSCFXNoiseSuppress* pDscFxNoiseSuppress) IDirectSoundCaptureFXNoiseSuppress::GetAllParameters The IDirectSoundCaptureFXNoiseSuppress8::Reset method resets the effect to its initial state.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_OUTOFMEMORY.

Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

Applications should not reset an effect except when necessary because it has entered an incorrect state. This might be done in response to user input. An effect must not be reset arbitrarily at startup, because another application might be using the same effect.

ee418201 HRESULT IDirectSoundCaptureFXNoiseSuppress::Reset() IDirectSoundCaptureFXNoiseSuppress::Reset
No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundCaptureFXNoiseSuppress::GetAllParameters([Out] DSCFXNoiseSuppress* pDscFxNoiseSuppress) Gets or sets he noise suppression parameters of a buffer. No documentation. IDirectSoundFXParamEq IDirectSoundFXParamEq Default bandwidth, in semitones. Maximum bandwidth, in semitones. Minimum bandwidth, in semitones. Default center frequency, in hertz. Maximum center frequency, in hertz. Minimum center frequency, in hertz. Default gain. Maximum gain. Minimum gain. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The SetAllParameters method sets the parametric equalizer parameters of a buffer.
Address of a structure that specifies the effect parameters.

If the method succeeds, the return value is DS_OK or S_FALSE. See the Remarks for . If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418240 HRESULT IDirectSoundFXParamEq::SetAllParameters([In] const DSFXParamEq* pcDsFxParamEq) IDirectSoundFXParamEq::SetAllParameters
No documentation. No documentation. No documentation. HRESULT IDirectSoundFXParamEq::GetAllParameters([Out] DSFXParamEq* pDsFxParamEq) IDirectSoundFXParamEq::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXParamEq::GetAllParameters([Out] DSFXParamEq* pDsFxParamEq) No documentation. IDirectSoundBuffer8 IDirectSoundBuffer8 No documentation. IDirectSoundBuffer IDirectSoundBuffer Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::GetCaps([Out] DSBCAPS* pDSBufferCaps) IDirectSoundBuffer::GetCaps The GetCurrentPosition method retrieves the position of the play and write cursors in the sound buffer.
Address of a variable that receives the offset, in bytes, of the play cursor. This parameter can be null if the value is not wanted.
Address of a variable that receives the offset, in bytes, of the write cursor. This parameter can be null if the value is not wanted.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

The write cursor is the point in the buffer ahead of which it is safe to write data to the buffer. Data should not be written to the part of the buffer after the play cursor and before the write cursor.

ee418062 HRESULT IDirectSoundBuffer::GetCurrentPosition([Out, Optional] unsigned int* pdwCurrentPlayCursor,[Out, Optional] unsigned int* pdwCurrentWriteCursor) IDirectSoundBuffer::GetCurrentPosition
The GetFormat method retrieves a description of the format of the sound data in the buffer, or the buffer size needed to retrieve the format description.
Address of a or structure that receives a description of the sound data in the buffer. To retrieve the buffer size needed to contain the format description, specify null. In this case the variable at pdwSizeWritten receives the size of the structure needed to receive the data.
Size, in bytes, of the structure at pwfxFormat. If pwfxFormat is not null, this value must be equal to or greater than the size of the expected data.
Address of a variable that receives the number of bytes written to the structure at pwfxFormat. This parameter can be null.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The format structure can have a variable length that depends on the format. Before retrieving the format description, the application should query the buffer object for the size of the format by calling this method and specifying null for the pwfxFormat parameter. The necessary size of the structure is returned in the pdwSizeWritten parameter. The application can then allocate sufficient memory and call GetFormat again to retrieve the format description.

ee418064 HRESULT IDirectSoundBuffer::GetFormat([Out, Buffer, Optional] WAVEFORMATEX* pwfxFormat,[In] unsigned int dwSizeAllocated,[Out, Optional] unsigned int* pdwSizeWritten) IDirectSoundBuffer::GetFormat
No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::GetVolume([Out] int* plVolume) IDirectSoundBuffer::GetVolume No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::GetPan([Out] int* plPan) IDirectSoundBuffer::GetPan No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::GetFrequency([Out] unsigned int* pdwFrequency) IDirectSoundBuffer::GetFrequency The GetStatus method retrieves the status of the sound buffer.
Address of a variable that receives the status of the sound buffer. The status can be a combination of the following flags:
ValueDescription
The buffer is lost and must be restored before it can be played or locked.
The buffer is being looped. If this value is not set, the buffer will stop when it reaches the end of the sound data. This value is returned only in combination with .
The buffer is playing. If this value is not set, the buffer is stopped.
The buffer is playing in software. Set only for buffers created with the flag.
The buffer is playing in hardware. Set only for buffers created with the flag.
The buffer was prematurely terminated by the voice manager and is not playing. Set only for buffers created with the flag.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

is set if the buffer is being heard. Because of latency, a call to Play or Stop might not immediately change the status.

ee418070 HRESULT IDirectSoundBuffer::GetStatus([Out] unsigned int* pdwStatus) IDirectSoundBuffer::GetStatus
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::Initialize([In] IDirectSound* pDirectSound,[In] const DSBUFFERDESC* pcDSBufferDesc) IDirectSoundBuffer::Initialize No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::Lock([In] unsigned int dwOffset,[In] unsigned int dwBytes,[Out] void** ppvAudioPtr1,[Out] unsigned int* pdwAudioBytes1,[Out] void** ppvAudioPtr2,[Out, Optional] unsigned int* pdwAudioBytes2,[In] DSBLOCK_ENUM dwFlags) IDirectSoundBuffer::Lock No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::Play([In] unsigned int dwReserved1,[In] unsigned int dwPriority,[In] DSBPLAY_FLAGS dwFlags) IDirectSoundBuffer::Play No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::SetCurrentPosition([In] unsigned int dwNewPosition) IDirectSoundBuffer::SetCurrentPosition The SetFormat method sets the format of the primary buffer. Whenever this application has the input focus, DirectSound will set the primary buffer to the specified format.
Address of a structure that describes the new format for the primary sound buffer.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_BADFORMAT
DSERR_INVALIDCALL
DSERR_INVALIDPARAM
DSERR_OUTOFMEMORY
DSERR_PRIOLEVELNEEDED
DSERR_UNSUPPORTED

The format of the primary buffer should be set before secondary buffers are created.

The method fails if the application has the cooperative level.

If the application is using DirectSound at the cooperative level, and the format is not supported, the method fails.

If the cooperative level is , DirectSound stops the primary buffer, changes the format, and restarts the buffer. The method succeeds even if the hardware does not support the requested format; DirectSound sets the buffer to the closest supported format. To determine whether this has happened, an application can call the GetFormat method for the primary buffer and compare the result with the format that was requested with the SetFormat method.

This method is not available for secondary sound buffers. If a new format is required, the application must create a new DirectSoundBuffer object.

ee418077 HRESULT IDirectSoundBuffer::SetFormat([In] const void* pcfxFormat) IDirectSoundBuffer::SetFormat
The SetVolume method sets the attenuation of the sound.
Attenuation, in hundredths of a decibel (dB).

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

Allowable values are between DSBVOLUME_MAX (no attenuation) and DSBVOLUME_MIN (silence). These values are defined in Dsound.h as 0 and ?10,000 respectively. The value DSBVOLUME_MAX represents the original, unadjusted volume of the stream. The value DSBVOLUME_MIN indicates an audio volume attenuated by 100 dB, which, for all practical purposes, is silence. DirectSound does not support amplification.

ee418150 HRESULT IDirectSoundBuffer::SetVolume([In] int lVolume) IDirectSoundBuffer::SetVolume
No documentation. No documentation. No documentation. HRESULT IDirectSoundBuffer::SetPan([In] int lPan) IDirectSoundBuffer::SetPan The SetFrequency method sets the frequency at which the audio samples are played.
Frequency, in hertz (Hz), at which to play the audio samples. A value of DSBFREQUENCY_ORIGINAL resets the frequency to the default value of the buffer format.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

Increasing or decreasing the frequency changes the perceived pitch of the audio data. This method does not affect the format of the buffer.

Before setting the frequency, you should ascertain whether the frequency is supported by checking the dwMinSecondarySampleRate and dwMaxSecondarySampleRate members of the structure for the device. Some operating systems do not support frequencies greater than 100,000 Hz.

This method is not valid for the primary buffer.

ee418143 HRESULT IDirectSoundBuffer::SetFrequency([In] unsigned int dwFrequency) IDirectSoundBuffer::SetFrequency
No documentation. No documentation. HRESULT IDirectSoundBuffer::Stop() IDirectSoundBuffer::Stop The Unlock method releases a locked sound buffer.
Address of the value retrieved in the ppvAudioPtr1 parameter of the Lock method.
Number of bytes written to the portion of the buffer at pvAudioPtr1. See Remarks.
Address of the value retrieved in the ppvAudioPtr2 parameter of the IDirectSoundBuffer8::Lock method.
Number of bytes written to the portion of the buffer at pvAudioPtr2. See Remarks.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_INVALIDCALL
DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

An application must pass both references, pvAudioPtr1 and pvAudioPtr2, returned by the IDirectSoundBuffer8::Lock method to ensure the correct pairing of IDirectSoundBuffer8::Lock and IDirectSoundBuffer8::Unlock. The second reference is needed even if nothing was written to the second reference.

The values in dwAudioBytes1 and dwAudioBytes2 must specify the number of bytes actually written to each part of the buffer, which might be less than the size of the lock. DirectSound uses these values to determine how much data to commit to the device.

ee418153 HRESULT IDirectSoundBuffer::Unlock([In, Buffer] void* pvAudioPtr1,[In] unsigned int dwAudioBytes1,[In, Buffer, Optional] void* pvAudioPtr2,[In] unsigned int dwAudioBytes2) IDirectSoundBuffer::Unlock
No documentation. No documentation. HRESULT IDirectSoundBuffer::Restore() IDirectSoundBuffer::Restore HRESULT IDirectSoundBuffer::Play([None] int dwReserved1,[None] int dwPriority,[None] int dwFlags) The Lock method readies all or part of the buffer for a data write and returns pointers to which data can be written. Offset, in bytes, from the start of the buffer to the point where the lock begins. This parameter is ignored if DSBLOCK_FROMWRITECURSOR is specified in the dwFlags parameter. Size, in bytes, of the portion of the buffer to lock. The buffer is conceptually circular, so this number can exceed the number of bytes between dwOffset and the end of the buffer. Flags modifying the lock event. The following flags are defined: ValueDescription DSBLOCK_FROMWRITECURSORStart the lock at the write cursor. The dwOffset parameter is ignored. DSBLOCK_ENTIREBUFFERLock the entire buffer. The dwBytes parameter is ignored. Address of a variable that receives a pointer to the second locked part of the capture buffer. If NULL is returned, the ppvAudioPtr1 parameter points to the entire locked portion of the capture buffer. Address of a variable that receives a pointer to the first locked part of the buffer. HRESULT IDirectSoundBuffer::Lock([None] int dwOffset,[None] int dwBytes,[Out] void** ppvAudioPtr1,[Out] int* pdwAudioBytes1,[Out] void** ppvAudioPtr2,[Out, Optional] int* pdwAudioBytes2,[None] int dwFlags) The Unlock method releases a locked sound buffer. Address of the value retrieved in the ppvAudioPtr1 parameter of the {{Lock}} method. Address of the value retrieved in the ppvAudioPtr2 parameter of the IDirectSoundBuffer8::Lock method. No documentation. HRESULT IDirectSoundBuffer::Unlock([In, Buffer] void* pvAudioPtr1,[None] int dwAudioBytes1,[In, Buffer, Optional] void* pvAudioPtr2,[None] int dwAudioBytes2) Writes data to the buffer. The data. The buffer offset. The flags. Writes data to the buffer. The data. The start index. The count. The buffer offset. The flags. Sets the notification positions. The positions. No documentation. GetCaps GetCaps HRESULT IDirectSoundBuffer::GetCaps([Out] DSBCAPS* pDSBufferCaps) No documentation. GetVolume GetVolume HRESULT IDirectSoundBuffer::GetVolume([Out] int* plVolume) No documentation. GetPan GetPan HRESULT IDirectSoundBuffer::GetPan([Out] int* plPan) No documentation. GetFrequency GetFrequency HRESULT IDirectSoundBuffer::GetFrequency([Out] unsigned int* pdwFrequency) The GetStatus method retrieves the status of the sound buffer.

is set if the buffer is being heard. Because of latency, a call to Play or Stop might not immediately change the status.

ee418070 GetStatus GetStatus HRESULT IDirectSoundBuffer::GetStatus([Out] unsigned int* pdwStatus)
No documentation. SetCurrentPosition SetCurrentPosition HRESULT IDirectSoundBuffer::SetCurrentPosition([In] unsigned int dwNewPosition) Sets the new format for the primary sound buffer. The wave format. HRESULT IDirectSoundBuffer::SetFormat([In] const WAVEFORMATEX* pcfxFormat) Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. The SetFX method enables effects on a buffer.

For this method to succeed, CoInitialize must have been called. Additionally, the buffer must not be playing or locked.

Number of elements in the pDSFXDesc and pdwResultCodes arrays. If this value is 0, pDSFXDesc and pdwResultCodes must both be null. Set to 0 to remove all effects from the buffer.
Address of an array of structures, of size dwEffectsCount, that specifies the effects wanted on the buffer. Must be null if dwEffectsCount is 0.
Address of an array of DWORD elements, of size dwEffectsCount. Each element receives one of the values shown in the following table, indicating the result of the attempt to create the corresponding effect in the pDSFXDesc array.
Note
This parameter must be null if dwEffectsCount is 0, or can be null if results are not wanted.
ValueDescription
Effect is instantiated in hardware.
Effect is instantiated in software.
Effect has not yet been assigned to hardware or software. This value is returned if the buffer was created with the flag in .
No effect was created because resources weren't available.
Effect is available but was not created because one of the other effects requested could not be created. If any of the effects requested cannot be created, none of them are, and the call fails.
Effect is not registered on the system, and the method failed as a result.

If the method succeeds, the return value is DS_OK or DS_INCOMPLETE. If the method fails, the return value may be one of the error values shown in the following table.

Return code
CO_E_NOTINITIALIZED
DSERR_CONTROLUNAVAIL
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_INVALIDCALL
DSERR_NOINTERFACE
DSERR_PRIOLEVELNEEDED

In addition, the method can return an error value from DMO methods, including and . See the DirectShow documentation for possible error values.

If the method fails, the value for each effect in pdwResultCodes is either DSFXF_PRESENT or . Check these values to determine which effects caused the failure.

For the method to succeed, the buffer must have been created with the flag and must not be playing or locked.

If the method returns DSERR_NOINTERFACE or another COM error, check the result code array for or to ascertain which effect caused the error. If the method returns DSERR_INVALIDPARAM, check the result codes for to see which effects failed to acquire resources.

An effect must be set on a buffer before the effect interface can be obtained. To obtain the effect interface, use GetObjectInPath.

microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.setfx HRESULT IDirectSoundBuffer8::SetFX([In] unsigned int dwEffectsCount,[In, Buffer, Optional] DSEFFECTDESC* pDSFXDesc,[InOut, Buffer] DSOUND_ENUM_0* pdwResultCodes) IDirectSoundBuffer8::SetFX
The AcquireResources method allocates resources for a buffer that was created with the flag in theDSBUFFERDESCstructure. No documentation. No documentation. No documentation.

If the method succeeds, the return value is DS_OK or DS_INCOMPLETE. If the method fails, the return value may be one of the error values shown in the following table.

Return code
DSERR_CONTROLUNAVAIL
DSERR_INVALIDCALL
DSERR_INVALIDPARAM

Normally, buffers created with are not allocated resources until Play is called. can be used to allocate resources for a deferred buffer before it is played. By doing so, the application can retrieve information about effects processing and set effect parameters. If the method fails, check the values in pdwResultCodes to determine which effects caused the failure.

A buffer with acquired resources that is not yet playing is not a candidate for premature termination by the voice management flags passed to the Play method.

Resources that have been acquired by AcquireResources are released when playback is stopped.

If the method is called on a buffer on which it has already been called, the status of the effects is returned but no additional resources are allocated.

The dwEffectsCount parameter to this function must be the same as the one passed in the call to SetFX.

If an attempt is made to acquire resources for a buffer with the flag on a system where hardware acceleration is not available, the method fails with either DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL, depending on the operating system.

microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.acquireresources HRESULT IDirectSoundBuffer8::AcquireResources([In] unsigned int dwFlags,[In] unsigned int dwEffectsCount,[Out, Buffer] unsigned int* pdwResultCodes) IDirectSoundBuffer8::AcquireResources
The GetObjectInPath method retrieves an interface for an effect object associated with the buffer.
Unique class identifier of the object being searched for, such as . Set this parameter to to search for objects of any class.
Index of the object within objects of that class in the path. See Remarks.
Unique identifier of the desired interface. See Remarks.
Address of a variable that receives the desired interface reference.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_INVALIDPARAM
DSERR_OBJECTNOTFOUND

Any DMO that has been set on a buffer by using SetFX can be retrieved, even it has not been allocated resources.

The following interfaces can be retrieved for the various DMOs supplied with DirectX.

rguidInterface *ppObject
IID_IDirectSoundFXGargle8 IDirectSoundFXGargle8
IID_IDirectSoundFXChorus8 IDirectSoundFXChorus8
IID_IDirectSoundFXFlanger8 IDirectSoundFXFlanger8
IID_IDirectSoundFXEcho8 IDirectSoundFXEcho8
IID_IDirectSoundFXDistortion8 IDirectSoundFXDistortion8
IID_IDirectSoundFXCompressor8 IDirectSoundFXCompressor8
IID_IDirectSoundFXParamEq8 IDirectSoundFXParamEq8
IID_IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb8
IID_IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb8

In addition, the following interfaces are available for any of the standard DMOs. For information on these interfaces, see the Help for DirectX Media Objects.

rguidInterface *ppObject
IID_IMediaObject
IID_IMediaObjectInPlace
IID_IMediaParams IMediaParams

NoteWhen the DirectSound API is used to play buffers, parameter curves (envelopes) set by using the IMediaParams interface do not work, because DirectSound does not timestamp the DMO buffers.

The value in dwIndex is the index of the object within the array of effects passed to SetFX. This is not necessarily the actual position of the object in the effects chain, because some effects might not have been created.

An object is returned solely on the basis of whether it matches rguidObject and dwIndex. It is up to the application to ensure that rguidInterface specifies an interface that can be expected to be found on the object.

microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.getobjectinpath HRESULT IDirectSoundBuffer8::GetObjectInPath([In] const GUID& rguidObject,[In] unsigned int dwIndex,[In] const GUID& rguidInterface,[Out] void** ppObject) IDirectSoundBuffer8::GetObjectInPath
Initializes a new instance of the class. an instance of the The buffer description. Retrieves an interface to an effect object associated with the buffer. Index of the object within objects of that class in the path. See Remarks. an effect object associated with the buffer HRESULT IDirectSoundCaptureBuffer8::GetObjectInPath([In] GUID* rguidObject,[None] int dwIndex,[In] GUID* rguidInterface,[Out] void** ppObject) Enables effects on a buffer. Effects guids No documentation. HRESULT IDirectSoundBuffer8::SetFX([None] int dwEffectsCount,[In, Buffer, Optional] LPDSEFFECTDESC pDSFXDesc,[Out, Buffer, Optional] int* pdwResultCodes) No documentation. IDirectSoundNotify IDirectSoundNotify Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSoundNotify::SetNotificationPositions([In] unsigned int dwPositionNotifies,[In, Buffer] const DSBPOSITIONNOTIFY* pcPositionNotifies) IDirectSoundNotify::SetNotificationPositions No documentation. IDirectSound3DListener IDirectSound3DListener Default distance factor. The default value is (1.0). Default Doppler factor. The default value is (1.0). Default rolloff factor. The default value is (1.0). Maximum distance factor. The default value is (1.0). Maximum Doppler factor. The default value is (1.0). Maximum rolloff factor. The default value is (1.0). Minimum distance factor. The default value is (1.0). Minimum Doppler factor. The default value is (1.0). Minimum rolloff factor. The default value is (1.0). Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::GetAllParameters([Out] DS3DLISTENER* pListener) IDirectSound3DListener::GetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::GetDistanceFactor([Out] float* pflDistanceFactor) IDirectSound3DListener::GetDistanceFactor The GetDopplerFactor method retrieves the multiplier for the Doppler effect.
Address of a variable that receives the Doppler factor value. D3DVALUE is defined as float.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The Doppler factor has a range of DS3D_MINDOPPLERFACTOR (no Doppler effects) to DS3D_MAXDOPPLERFACTOR (defined as 10 times the Doppler effects found in the real world). The default value is DS3D_DEFAULTDOPPLERFACTOR (1.0).

ee418010 HRESULT IDirectSound3DListener::GetDopplerFactor([Out] float* pflDopplerFactor) IDirectSound3DListener::GetDopplerFactor
No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::GetOrientation([Out] D3DVECTOR* pvOrientFront,[Out] D3DVECTOR* pvOrientTop) IDirectSound3DListener::GetOrientation No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::GetPosition([Out] D3DVECTOR* pvPosition) IDirectSound3DListener::GetPosition The GetRolloffFactor method retrieves the rolloff factor, which determines the rate of attenuation over distance.
Address of a variable that receives the rolloff factor. D3DVALUE is defined as float.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The rolloff factor has a range of DS3D_MINROLLOFFFACTOR (no rolloff) to DS3D_MAXROLLOFFFACTOR (defined as 10 times the rolloff found in the real world). The default value is DS3D_DEFAULTROLLOFFFACTOR (1.0). For more information, see Rolloff Factor.

ee418016 HRESULT IDirectSound3DListener::GetRolloffFactor([Out] float* pflRolloffFactor) IDirectSound3DListener::GetRolloffFactor
The GetVelocity method retrieves the listener's velocity.
Address of a structure that receives the listener's velocity.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

Velocity is used only for calculating Doppler effect. It does not change the listener's position. To move the listener, use the SetPosition method.

The default velocity is (0,0,0).

By default, measurement units are meters per second, but this can be changed by calling the SetDistanceFactor method.

ee418018 HRESULT IDirectSound3DListener::GetVelocity([Out] D3DVECTOR* pvVelocity) IDirectSound3DListener::GetVelocity
The SetAllParameters method sets all 3D parameters of the sound environment and the listener.
Address of a structure that contains information describing all 3D listener parameters.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

ee418020 HRESULT IDirectSound3DListener::SetAllParameters([In] const DS3DLISTENER* pcListener,[In] unsigned int dwApply) IDirectSound3DListener::SetAllParameters
The SetDistanceFactor method sets the distance factor, which is the number of meters in a vector unit.
Distance factor. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The distance factor has a range of DS3D_MINDISTANCEFACTOR to DS3D_MAXDISTANCEFACTOR, defined in Dsound.h as FLT_MIN and FLT_MAX respectively. The default value is DS3D_DEFAULTDISTANCEFACTOR, or 1.0.

ee418022 HRESULT IDirectSound3DListener::SetDistanceFactor([In] float flDistanceFactor,[In] unsigned int dwApply) IDirectSound3DListener::SetDistanceFactor
The SetDopplerFactor method sets the multiplier for the Doppler effect.
Doppler factor. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The Doppler factor has a range of DS3D_MINDOPPLERFACTOR (no Doppler effects) to DS3D_MAXDOPPLERFACTOR (defined as 10 times the Doppler effects found in the real world). The default value is DS3D_DEFAULTDOPPLERFACTOR (1.0).

ee418024 HRESULT IDirectSound3DListener::SetDopplerFactor([In] float flDopplerFactor,[In] unsigned int dwApply) IDirectSound3DListener::SetDopplerFactor
No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::SetOrientation([In] float xFront,[In] float yFront,[In] float zFront,[In] float xTop,[In] float yTop,[In] float zTop,[In] unsigned int dwApply) IDirectSound3DListener::SetOrientation No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::SetPosition([In] float x,[In] float y,[In] float z,[In] unsigned int dwApply) IDirectSound3DListener::SetPosition The SetRolloffFactor method sets the rolloff factor, which determines the rate of attenuation over distance.
Rolloff factor. D3DVALUE is defined as float.
Value that specifies when the setting should be applied. This value must be one of the following:
ValueDescription
DS3D_DEFERREDSettings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.
DS3D_IMMEDIATESettings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.

The rolloff factor has a range of DS3D_MINROLLOFFFACTOR (no rolloff) to DS3D_MAXROLLOFFFACTOR (defined as 10 times the rolloff found in the real world). The default value is DS3D_DEFAULTROLLOFFFACTOR (1.0). For more information, see Rolloff Factor.

ee418030 HRESULT IDirectSound3DListener::SetRolloffFactor([In] float flRolloffFactor,[In] unsigned int dwApply) IDirectSound3DListener::SetRolloffFactor
No documentation. No documentation. No documentation. No documentation. No documentation. No documentation. HRESULT IDirectSound3DListener::SetVelocity([In] float x,[In] float y,[In] float z,[In] unsigned int dwApply) IDirectSound3DListener::SetVelocity The CommitDeferredSettings method commits any deferred settings made since the last call to this method.

If the method succeeds, the return value is DS_OK.

ee418006 HRESULT IDirectSound3DListener::CommitDeferredSettings() IDirectSound3DListener::CommitDeferredSettings
Initializes a new instance of the class with a previously created sound buffer. The SlimDX::DirectSound::SoundBuffer object. Determines if settings are set immediately or deferred. Gets or sets the distance factor, which is the number of meters in a vector unit. Gets or sets the multiplier for the Doppler effect. Describes the listener's front orientation. Gets or sets the listener's position. Gets or sets the rolloff factor, which determines the rate of attenuation over distance. Describes the listener's top orientation. Gets or sets the listener's velocity. No documentation. IDirectSoundFXWavesReverb IDirectSoundFXWavesReverb Default high-frequency reverb time ratio. Maximum high-frequency reverb time ratio. Minimum high-frequency reverb time ratio. Default input gain of signal, in decibels (dB). Maximum input gain of signal, in decibels (dB). Minimum input gain of signal, in decibels (dB). Default reverb mix, in dB. Maximum reverb mix, in dB. Minimum reverb mix, in dB. Default reverb time, in milliseconds. Maximum reverb time, in milliseconds. Minimum reverb time, in milliseconds. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. No documentation. No documentation. HRESULT IDirectSoundFXWavesReverb::SetAllParameters([In] const DSFXWavesReverb* pcDsFxWavesReverb) IDirectSoundFXWavesReverb::SetAllParameters No documentation. No documentation. No documentation. HRESULT IDirectSoundFXWavesReverb::GetAllParameters([Out] DSFXWavesReverb* pDsFxWavesReverb) IDirectSoundFXWavesReverb::GetAllParameters No documentation. GetAllParameters GetAllParameters HRESULT IDirectSoundFXWavesReverb::GetAllParameters([Out] DSFXWavesReverb* pDsFxWavesReverb) The structure contains parameters for acoustic echo cancellation in a capture buffer.

The dwMode member is ignored when this structure is passed to IDirectSoundCaptureFXAec8::SetAllParameters.

Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

microsoft.directx_sdk.reference.dscfxaec DSCFXAec DSCFXAec
Operation mode. This member contains one of the following values.
Value Description
The effect is passing capture and render data through without modifying it.
The effect is running in half duplex mode. Not presently supported.
The effect is running in full duplex mode.
microsoft.directx_sdk.reference.dscfxaec DSCFX_AEC_MODE dwMode DSCFX_AEC_MODE dwMode
Boolean value that specifies whether the effect is enabled.
microsoft.directx_sdk.reference.dscfxaec BOOL fEnable BOOL fEnable
Boolean value that specifies whether to enable background comfort noise, which makes the capture signal sound more natural by preventing periods of dead silence. By default, background comfort noise is not enabled.
microsoft.directx_sdk.reference.dscfxaec BOOL fNoiseFill BOOL fNoiseFill
No documentation. DSBCAPS DSBCAPS No documentation. unsigned int dwSize unsigned int dwSize No documentation. DSBCAPS_FLAGS dwFlags DSBCAPS_FLAGS dwFlags No documentation. unsigned int dwBufferBytes unsigned int dwBufferBytes No documentation. unsigned int dwUnlockTransferRate unsigned int dwUnlockTransferRate No documentation. unsigned int dwPlayCpuOverhead unsigned int dwPlayCpuOverhead Initializes a new instance of the class. The structure contains parameters for a chorus effect. microsoft.directx_sdk.reference.dsfxchorus DSFXChorus DSFXChorus
Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from DSFXCHORUS_WETDRYMIX_MIN through DSFXCHORUS_WETDRYMIX_MAX (all wet). The default value is 50.
microsoft.directx_sdk.reference.dsfxchorus float fWetDryMix float fWetDryMix
Percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. Must be in the range from DSFXCHORUS_DEPTH_MIN through DSFXCHORUS_DEPTH_MAX. The default value is 10.
microsoft.directx_sdk.reference.dsfxchorus float fDepth float fDepth
Percentage of output signal to feed back into the effect's input, in the range from DSFXCHORUS_FEEDBACK_MIN to DSFXCHORUS_FEEDBACK_MAX. The default value is 25.
microsoft.directx_sdk.reference.dsfxchorus float fFeedback float fFeedback
Frequency of the LFO, in the range from DSFXCHORUS_FREQUENCY_MIN to DSFXCHORUS_FREQUENCY_MAX. The default value is 1.1.
microsoft.directx_sdk.reference.dsfxchorus float fFrequency float fFrequency
Waveform shape of the LFO. Defined values are DSFXCHORUS_WAVE_TRIANGLE and DSFXCHORUS_WAVE_SIN. By default, the waveform is a sine.
microsoft.directx_sdk.reference.dsfxchorus int lWaveform int lWaveform
Number of milliseconds the input is delayed before it is played back, in the range from DSFXCHORUS_DELAY_MIN to DSFXCHORUS_DELAY_MAX. The default value is 16 ms.
microsoft.directx_sdk.reference.dsfxchorus float fDelay float fDelay
Phase differential between left and right LFOs, in the range from DSFXCHORUS_PHASE_MIN through DSFXCHORUS_PHASE_MAX. Possible values are defined as follows.
Value
DSFXCHORUS_PHASE_NEG_180
DSFXCHORUS_PHASE_NEG_90
DSFXCHORUS_PHASE_ZERO
DSFXCHORUS_PHASE_90
DSFXCHORUS_PHASE_180

The default value is DSFXCHORUS_PHASE_90.

microsoft.directx_sdk.reference.dsfxchorus int lPhase int lPhase
The structure contains parameters for a compression effect. ee416833 DSFXCompressor DSFXCompressor
Output gain of signal after compression, in the range from DSFXCOMPRESSOR_GAIN_MIN to DSFXCOMPRESSOR_GAIN_MAX. The default value is 0 dB.
ee416833 float fGain float fGain
Time before compression reaches its full value, in the range from DSFXCOMPRESSOR_ATTACK_MIN to DSFXCOMPRESSOR_ATTACK_MAX. The default value is 10 ms.
ee416833 float fAttack float fAttack
Speed at which compression is stopped after input drops below fThreshold, in the range from DSFXCOMPRESSOR_RELEASE_MIN to DSFXCOMPRESSOR_RELEASE_MAX. The default value is 200 ms.
ee416833 float fRelease float fRelease
Point at which compression begins, in decibels, in the range from DSFXCOMPRESSOR_THRESHOLD_MIN to DSFXCOMPRESSOR_THRESHOLD_MAX. The default value is -20 dB.
ee416833 float fThreshold float fThreshold
Compression ratio, in the range from DSFXCOMPRESSOR_RATIO_MIN to DSFXCOMPRESSOR_RATIO_MAX. The default value is 3, which means 3:1 compression.
ee416833 float fRatio float fRatio
Time after lThreshold is reached before attack phase is started, in milliseconds, in the range from DSFXCOMPRESSOR_PREDELAY_MIN to DSFXCOMPRESSOR_PREDELAY_MAX. The default value is 4 ms.
ee416833 float fPredelay float fPredelay
The structure contains parameters for a distortion effect.

The values in fPostEQBandwidth, fPostEQCenterFrequency, and fPreLowpassCutoff cannot exceed one-third of the frequency of the buffer. If an attempt is made to set a value greater than this, but within the range of accepted values, the parameter is set to the nearest supported value and S_FALSE is returned by IDirectSoundFXDistortion8::SetAllParameters.

microsoft.directx_sdk.reference.dsfxdistortion DSFXDistortion DSFXDistortion
Amount of signal change after distortion, in the range from DSFXDISTORTION_GAIN_MIN through DSFXDISTORTION_GAIN_MAX. The default value is -18 dB.
microsoft.directx_sdk.reference.dsfxdistortion float fGain float fGain
Percentage of distortion intensity, in the range in the range from DSFXDISTORTION_EDGE_MIN through DSFXDISTORTION_EDGE_MAX. The default value is 15 percent.
microsoft.directx_sdk.reference.dsfxdistortion float fEdge float fEdge
Center frequency of harmonic content addition, in the range from DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN through DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX. The default value is 2400 Hz.
microsoft.directx_sdk.reference.dsfxdistortion float fPostEQCenterFrequency float fPostEQCenterFrequency
Width of frequency band that determines range of harmonic content addition, in the range from DSFXDISTORTION_POSTEQBANDWIDTH_MIN through DSFXDISTORTION_POSTEQBANDWIDTH_MAX. The default value is 2400 Hz.
microsoft.directx_sdk.reference.dsfxdistortion float fPostEQBandwidth float fPostEQBandwidth
Filter cutoff for high-frequency harmonics attenuation, in the range from DSFXDISTORTION_PRELOWPASSCUTOFF_MIN through DSFXDISTORTION_PRELOWPASSCUTOFF_MAX. The default value is 8000 Hz.
microsoft.directx_sdk.reference.dsfxdistortion float fPreLowpassCutoff float fPreLowpassCutoff
The structure contains parameters for an echo effect. microsoft.directx_sdk.reference.dsfxecho DSFXEcho DSFXEcho
Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from DSFXECHO_WETDRYMIX_MIN through DSFXECHO_WETDRYMIX_MAX (all wet). The default value is 50.
microsoft.directx_sdk.reference.dsfxecho float fWetDryMix float fWetDryMix
Percentage of output fed back into input, in the range from DSFXECHO_FEEDBACK_MIN through DSFXECHO_FEEDBACK_MAX. The default value is 50.
microsoft.directx_sdk.reference.dsfxecho float fFeedback float fFeedback
Delay for left channel, in milliseconds, in the range from DSFXECHO_LEFTDELAY_MIN through DSFXECHO_LEFTDELAY_MAX. The default value is 500 ms.
microsoft.directx_sdk.reference.dsfxecho float fLeftDelay float fLeftDelay
Delay for right channel, in milliseconds, in the range from DSFXECHO_RIGHTDELAY_MIN through DSFXECHO_RIGHTDELAY_MAX. The default value is 500 ms.
microsoft.directx_sdk.reference.dsfxecho float fRightDelay float fRightDelay
Value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Possible values are defined as DSFXECHO_PANDELAY_MIN (equivalent to ) and DSFXECHO_PANDELAY_MAX (equivalent to TRUE).
microsoft.directx_sdk.reference.dsfxecho int lPanDelay int lPanDelay
The structure contains parameters for a flange effect. microsoft.directx_sdk.reference.dsfxflanger DSFXFlanger DSFXFlanger
Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from DSFXFLANGER_WETDRYMIX_MIN through DSFXFLANGER_WETDRYMIX_MAX (all wet). The default value is 50.
microsoft.directx_sdk.reference.dsfxflanger float fWetDryMix float fWetDryMix
Percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point. Must be in the range from DSFXFLANGER_DEPTH_MIN through DSFXFLANGER_DEPTH_MAX. The default value is 100.
microsoft.directx_sdk.reference.dsfxflanger float fDepth float fDepth
Percentage of output signal to feed back into the effect's input, in the range from DSFXFLANGER_FEEDBACK_MIN to DSFXFLANGER_FEEDBACK_MAX. The default value is -50.
microsoft.directx_sdk.reference.dsfxflanger float fFeedback float fFeedback
Frequency of the LFO, in the range from DSFXFLANGER_FREQUENCY_MIN to DSFXFLANGER_FREQUENCY_MAX. The default value is 0.25.
microsoft.directx_sdk.reference.dsfxflanger float fFrequency float fFrequency
Waveform shape of the LFO. By default, the waveform is a sine. Possible values are defined in the following table.
Value Description
DSFXFLANGER_WAVE_TRIANGLE Triangle.
DSFXFLANGER_WAVE_SIN Sine.
microsoft.directx_sdk.reference.dsfxflanger int lWaveform int lWaveform
Number of milliseconds the input is delayed before it is played back, in the range from DSFXFLANGER_DELAY_MIN to DSFXFLANGER_DELAY_MAX. The default value is 2 ms.
microsoft.directx_sdk.reference.dsfxflanger float fDelay float fDelay
Phase differential between left and right LFOs, in the range from DSFXFLANGER_PHASE_MIN through DSFXFLANGER_PHASE_MAX. Possible values are defined in the following table.
Value
DSFXFLANGER_PHASE_NEG_180
DSFXFLANGER_PHASE_NEG_90
DSFXFLANGER_PHASE_ZERO
DSFXFLANGER_PHASE_90
DSFXFLANGER_PHASE_180

The default value is DSFXFLANGER_PHASE_ZERO.

microsoft.directx_sdk.reference.dsfxflanger int lPhase int lPhase
The structure contains parameters for an amplitude modulation effect. microsoft.directx_sdk.reference.dsfxgargle DSFXGargle DSFXGargle
Rate of modulation, in Hertz. Must be in the range from DSFXGARGLE_RATEHZ_MIN through DSFXGARGLE_RATEHZ_MAX. The default value is 20.
microsoft.directx_sdk.reference.dsfxgargle unsigned int dwRateHz unsigned int dwRateHz
Shape of the modulation waveform. The following values are defined.
Value Description
DSFXGARGLE_WAVE_TRIANGLE Triangular waveform.
DSFXGARGLE_WAVE_SQUARE Square waveform.

The default value is DSFXGARGLE_WAVE_TRIANGLE.

microsoft.directx_sdk.reference.dsfxgargle unsigned int dwWaveShape unsigned int dwWaveShape
The structure contains parameters for an I3DL2 (Interactive 3D Audio Level 2) reverberation effect. ee416838 DSFXI3DL2Reverb DSFXI3DL2Reverb
Attenuation of the room effect, in millibels (mB), in the range from DSFX_I3DL2REVERB_ROOM_MIN to DSFX_I3DL2REVERB_ROOM_MAX. The default value is DSFX_I3DL2REVERB_ROOM_DEFAULT, or -1000 mB.
ee416838 int lRoom int lRoom
Attenuation of the room high-frequency effect, in mB, in the range from DSFX_I3DL2REVERB_ROOMHF_MIN to DSFX_I3DL2REVERB_ROOMHF_MAX. The default value is DSFX_I3DL2REVERB_ROOMHF_DEFAULT, or -100 mB.
ee416838 int lRoomHF int lRoomHF
Rolloff factor for the reflected signals, in the range from DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN to DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX. The default value is DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT, or 0.0. The rolloff factor for the direct path is controlled by the DirectSound listener.
ee416838 float flRoomRolloffFactor float flRoomRolloffFactor
Decay time, in seconds, in the range from DSFX_I3DL2REVERB_DECAYTIME_MIN to DSFX_I3DL2REVERB_DECAYTIME_MAX. The default value is DSFX_I3DL2REVERB_DECAYTIME_DEFAULT, or 1.49 second.
ee416838 float flDecayTime float flDecayTime
Ratio of the decay time at high frequencies to the decay time at low frequencies, in the range from DSFX_I3DL2REVERB_DECAYHFRATIO_MIN to DSFX_I3DL2REVERB_DECAYHFRATIO_MAX. The default value is DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT, or 0.83.
ee416838 float flDecayHFRatio float flDecayHFRatio
Attenuation of early reflections relative to lRoom, in mB, in the range from DSFX_I3DL2REVERB_REFLECTIONS_MIN to DSFX_I3DL2REVERB_REFLECTIONS_MAX. The default value is DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT, or -2602 mB.
ee416838 int lReflections int lReflections
Delay time of the first reflection relative to the direct path, in seconds, in the range from DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN to DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT. The default value is 0.007 seconds.
ee416838 float flReflectionsDelay float flReflectionsDelay
Attenuation of late reverberation relative to lRoom, in mB, in the range -from DSFX_I3DL2REVERB_REVERB_MIN to DSFX_I3DL2REVERB_REVERB_MAX. The default value is DSFX_I3DL2REVERB_REVERB_DEFAULT, or 200 mB.
ee416838 int lReverb int lReverb
Time limit between the early reflections and the late reverberation relative to the time of the first reflection, in seconds, in the range from DSFX_I3DL2REVERB_REVERBDELAY_MIN to DSFX_I3DL2REVERB_REVERBDELAY_MAX. The default value is DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT, or 0.011 seconds.
ee416838 float flReverbDelay float flReverbDelay
Echo density in the late reverberation decay, in percent, in the range from DSFX_I3DL2REVERB_DIFFUSION_MIN to DSFX_I3DL2REVERB_DIFFUSION_MAX. The default value is DSFX_I3DL2REVERB_DIFFUSION_DEFAULT, or 100.0 percent.
ee416838 float flDiffusion float flDiffusion
Modal density in the late reverberation decay, in percent, in the range from DSFX_I3DL2REVERB_DENSITY_MIN to DSFX_I3DL2REVERB_DENSITY_MAX. The default value is DSFX_I3DL2REVERB_DENSITY_DEFAULT, or 100.0 percent.
ee416838 float flDensity float flDensity
Reference high frequency, in hertz, in the range from DSFX_I3DL2REVERB_HFREFERENCE_MIN to DSFX_I3DL2REVERB_HFREFERENCE_MAX. The default value is DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT, or 5000.0 Hz.
ee416838 float flHFReference float flHFReference
The structure describes the 3D world parameters and the position of the listener. This structure is used with theIDirectSound3DListener8::GetAllParametersandIDirectSound3DListener8::SetAllParametersmethods. ee416817 DS3DLISTENER DS3DLISTENER No documentation. unsigned int dwSize unsigned int dwSize No documentation. D3DVECTOR vPosition D3DVECTOR vPosition No documentation. D3DVECTOR vVelocity D3DVECTOR vVelocity No documentation. D3DVECTOR vOrientFront D3DVECTOR vOrientFront No documentation. D3DVECTOR vOrientTop D3DVECTOR vOrientTop No documentation. float flDistanceFactor float flDistanceFactor No documentation. float flRolloffFactor float flRolloffFactor No documentation. float flDopplerFactor float flDopplerFactor Initializes a new instance of the class. The structure contains parameters for noise suppression in a capture buffer.
Windows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

ee416827 DSCFXNoiseSuppress DSCFXNoiseSuppress
Boolean value that specifies whether the effect is enabled.
ee416827 BOOL fEnable BOOL fEnable
No documentation. DSBPOSITIONNOTIFY DSBPOSITIONNOTIFY No documentation. unsigned int dwOffset unsigned int dwOffset No documentation. void* hEventNotify void hEventNotify Gets or sets the wait handle. The wait handle. The structure contains parameters for a parametric equalizer effect.

The value in fCenter cannot exceed one-third of the sampling frequency of the buffer. If an attempt is made to set a value greater than this, but within the range of accepted values, the parameter is set to the nearest supported value and S_FALSE is returned by IDirectSoundFXParamEq8::SetAllParameters.

microsoft.directx_sdk.reference.dsfxparameq DSFXParamEq DSFXParamEq
Center frequency, in hertz, in the range from DSFXPARAMEQ_CENTER_MIN to DSFXPARAMEQ_CENTER_MAX. The default value is 8000.
microsoft.directx_sdk.reference.dsfxparameq float fCenter float fCenter
Bandwidth, in semitones, in the range from DSFXPARAMEQ_BANDWIDTH_MIN to DSFXPARAMEQ_BANDWIDTH_MAX. The default value is 12.
microsoft.directx_sdk.reference.dsfxparameq float fBandwidth float fBandwidth
Gain, in the range from DSFXPARAMEQ_GAIN_MIN to DSFXPARAMEQ_GAIN_MAX. The default value is 0.
microsoft.directx_sdk.reference.dsfxparameq float fGain float fGain
The structure describes the characteristics of a new buffer object. It is used by theIDirectSound8::CreateSoundBuffermethod and by theDirectSoundFullDuplexCreate8function.

An earlier version of this structure, DSBUFFERDESC1, is maintained in Dsound.h for compatibility with DirectX 7 and earlier.

When creating a primary buffer, applications must set the dwBufferBytes member to zero. DirectSound will determine the best buffer size for the particular sound device in use. To determine the size of a created primary buffer, call IDirectSoundBuffer8::GetCaps.

The DSBCAPS_CTRLDEFAULT flag is no longer supported. This flag was defined as | | . By specifying only the flags you need, you cut down on unnecessary resource usage.

On VXD drivers, a sound buffer created with is always a software buffer, because the VXD driver model does not support notifications. With WDM drivers, a notification-enabled buffer can be in hardware, if hardware resources are available.

The and flags are optional and mutually exclusive. forces the buffer to reside in hardware, meaning that it will be mixed by the sound card. forces the buffer to reside in software, where it is mixed by the CPU. These flags are also defined for the dwFlags member .

The 3D algorithms represent selection of the software emulation layer only: that is, the software algorithm that is used when no hardware is present for acceleration. In order to maximize hardware utilization, is treated as a special case. If no free 3D hardware voices are available, the buffer is then treated as a 2D buffer, but with 3D control. Specifically, when a sound buffer is created with , or when the buffer is played if the buffer was created with DSBPLAY_LOCDEFER, the following procedure is followed:

  1. If a free hardware 3D voice is available, that 3D hardware voice is used.

  2. If no free hardware 3D voices are available and a 2D hardware voice is available, that 2D hardware voice will be used. This is possible because the algorithm is a simple stereo pan algorithm

  3. If no free 2D or 3D hardware voices are available, the voice will be played in software using the algorithm.

If a speaker configuration other than or is in effect, the processing will be done as if for a two-speaker configuration.

If a buffer is created using one of the HRTF algorithms, and the HRTF algorithm is not available on the system (for example, a non-WDM system), a success code, DS_NO_VIRTUALIZATION, is returned. The sound buffer created will use instead. For this reason, applications should use the SUCCEEDED or FAILED macros rather than checking explicitly for DS_OK when calling CreateSoundBuffer.

microsoft.directx_sdk.reference.dsbufferdesc DSBUFFERDESC DSBUFFERDESC
No documentation. unsigned int dwSize unsigned int dwSize No documentation. DSBCAPS_FLAGS dwFlags DSBCAPS_FLAGS dwFlags No documentation. unsigned int dwBufferBytes unsigned int dwBufferBytes No documentation. unsigned int dwReserved unsigned int dwReserved No documentation. WAVEFORMATEX* lpwfxFormat WAVEFORMATEX lpwfxFormat No documentation. GUID guid3DAlgorithm GUID guid3DAlgorithm Initializes a new instance of the class. WaveFormat of this sound buffer description The structure contains parameters for a Waves reverberation effect. ee416840 DSFXWavesReverb DSFXWavesReverb
Input gain of signal, in decibels (dB), in the range from DSFX_WAVESREVERB_INGAIN_MIN through DSFX_WAVESREVERB_INGAIN_MAX. The default value is DSFX_WAVESREVERB_INGAIN_DEFAULT, or 0 dB.
ee416840 float fInGain float fInGain
Reverb mix, in dB, in the range from DSFX_WAVESREVERB_REVERBMIX_MIN through DSFX_WAVESREVERB_REVERBMIX_MAX. The default value is DSFX_WAVESREVERB_REVERBMIX_DEFAULT, or 0 dB.
ee416840 float fReverbMix float fReverbMix
Reverb time, in milliseconds, in the range from DSFX_WAVESREVERB_REVERBTIME_MIN through DSFX_WAVESREVERB_REVERBTIME_MAX. The default value is DSFX_WAVESREVERB_REVERBTIME_DEFAULT, or 1000.
ee416840 float fReverbTime float fReverbTime
High-frequency reverb time ratio, in the range from DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN through DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX. The default value is DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT, or 0.001.
ee416840 float fHighFreqRTRatio float fHighFreqRTRatio
A Primary DirectSound Buffer. Initializes a new instance of the class. The base PTR. Initializes a new instance of the class. an instance of the The buffer description.