Click or drag to resize
Accord.NET (logo)

SharpDX.DirectSound Namespace

The SharpDX.DirectSound namespace provides a managed DirectSound API.
Classes
  ClassDescription
Public classAcousticEchoCancel

The IDirectSoundCaptureFXAec8 interface is used to set and retrieve parameters on a capture buffer that supports acoustic echo cancellation. This interface requires Microsoft Windows XP or later operating systems.

IDirectSoundCaptureFXAec8 is a define for AcousticEchoCancel. The interface names are interchangeable.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundCaptureFXAec8 interface exposes the following methods.

IDirectSoundCaptureFXAec8 Members
Method Description
IDirectSoundCaptureFXAec8::GetAllParameters The IDirectSoundCaptureFXAec8::GetAllParameters method retrieves the acoustic echo cancellation parameters of a buffer.
IDirectSoundCaptureFXAec8::GetStatus The IDirectSoundCaptureFXAec8::GetStatus method retrieves the status of the effect.
IDirectSoundCaptureFXAec8::Reset The IDirectSoundCaptureFXAec8::Reset method resets the effect to its initial state.
IDirectSoundCaptureFXAec8::SetAllParameters The IDirectSoundCaptureFXAec8::SetAllParameters method sets the acoustic echo cancellation parameters of a buffer.

The LPDIRECTSOUNDCAPTUREFXAEC8 type is defined as a reference to the IDirectSoundCaptureFXAec8 interface:

 typedef struct IDirectSoundCaptureFXAec8 *LPDIRECTSOUNDCAPTUREFXAEC8;	
            
Info

Operating System: Requires Microsoft WindowsXP or later.

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.

Public classBuffer3DSettings
The Buffer3DSettings 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.
Public classBufferCapabilities
No documentation.
Public classCapabilities
The Capabilities structure describes the capabilities of a device. It is used by theIDirectSound8::GetCapsmethod.
Public classCaptureBuffer

The CaptureBuffer interface is used to manipulate sound capture buffers.

To obtain the CaptureBuffer interface, call the IDirectSoundCapture8::CreateCaptureBuffer method to obtain CaptureBufferBase, then pass IID_IDirectSoundCaptureBuffer8 to IDirectSoundCaptureBuffer::QueryInterface.

In addition to the methods inherited from ComObject, the CaptureBuffer interface exposes the following methods, arranged by category.

Capture Management
Method Description
IDirectSoundCaptureBuffer8::Lock 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.
IDirectSoundCaptureBuffer8::Start The Start method begins capturing data into the buffer. If the buffer is already capturing, the method has no effect.
IDirectSoundCaptureBuffer8::Stop 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.
IDirectSoundCaptureBuffer8::Unlock The Unlock method unlocks the buffer.
Effects
Method Description
GetEffectStatus(Int32)The GetFXStatus method retrieves the status of capture effects.
GetEffect(Guid, Int32, Guid, IntPtr)The GetObjectInPath method retrieves an interface to an effect object associated with the buffer.
Initialization
Method Description
IDirectSoundCaptureBuffer8::Initialize The Initialize method initializes a capture buffer object. Because the IDirectSoundCapture8::CreateCaptureBufferIDirectSoundCapture8::CreateCaptureBuffer
Information
Method Description
IDirectSoundCaptureBuffer8::GetCaps The GetCaps method retrieves the capabilities of the buffer.
IDirectSoundCaptureBuffer8::GetCurrentPosition Address of a variable that receives the offset from the start of the buffer, in bytes, of the capture cursor. The parameter can be null if this value is not wanted.
IDirectSoundCaptureBuffer8::GetFormat The GetFormat method retrieves the waveform format of the capture buffer.
IDirectSoundCaptureBuffer8::GetStatus The GetStatus method retrieves the status of the capture buffer.

The LPDIRECTSOUNDCaptureBuffer8 type is defined as a reference to the CaptureBuffer interface:

 typedef struct CaptureBuffer *LPDIRECTSOUNDCaptureBuffer8;	
            
Public classCaptureBufferBase

The CaptureBuffer interface is used to manipulate sound capture buffers.

To obtain the CaptureBuffer interface, call the IDirectSoundCapture8::CreateCaptureBuffer method to obtain CaptureBufferBase, then pass IID_IDirectSoundCaptureBuffer8 to IDirectSoundCaptureBuffer::QueryInterface.

In addition to the methods inherited from ComObject, the CaptureBuffer interface exposes the following methods, arranged by category.

Capture Management
Method Description
IDirectSoundCaptureBuffer8::Lock 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.
IDirectSoundCaptureBuffer8::Start The Start method begins capturing data into the buffer. If the buffer is already capturing, the method has no effect.
IDirectSoundCaptureBuffer8::Stop 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.
IDirectSoundCaptureBuffer8::Unlock The Unlock method unlocks the buffer.
Effects
Method Description
GetEffectStatus(Int32)The GetFXStatus method retrieves the status of capture effects.
GetEffect(Guid, Int32, Guid, IntPtr)The GetObjectInPath method retrieves an interface to an effect object associated with the buffer.
Initialization
Method Description
IDirectSoundCaptureBuffer8::Initialize The Initialize method initializes a capture buffer object. Because the IDirectSoundCapture8::CreateCaptureBufferIDirectSoundCapture8::CreateCaptureBuffer
Information
Method Description
IDirectSoundCaptureBuffer8::GetCaps The GetCaps method retrieves the capabilities of the buffer.
IDirectSoundCaptureBuffer8::GetCurrentPosition Address of a variable that receives the offset from the start of the buffer, in bytes, of the capture cursor. The parameter can be null if this value is not wanted.
IDirectSoundCaptureBuffer8::GetFormat The GetFormat method retrieves the waveform format of the capture buffer.
IDirectSoundCaptureBuffer8::GetStatus The GetStatus method retrieves the status of the capture buffer.

The LPDIRECTSOUNDCaptureBuffer8 type is defined as a reference to the CaptureBuffer interface:

 typedef struct CaptureBuffer *LPDIRECTSOUNDCaptureBuffer8;	
            
Public classCaptureBufferCapabilities
The CaptureBufferCapabilities structure describes the capabilities of a capture buffer. It is used by theIDirectSoundCaptureBuffer8::GetCapsmethod.
Public classCaptureBufferDescription
The CaptureBufferDescription structure describes a capture buffer. It is used by theIDirectSoundCapture8::CreateCaptureBuffermethod and by theDirectSoundFullDuplexCreate8function.

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

Public classCaptureCapabilities
The CaptureCapabilities structure describes the capabilities of the capture device. It is used by theIDirectSoundCapture8::GetCapsmethod.
Public classCaptureEffectDescription
The CaptureEffectDescription structure contains parameters for an effect associated with a capture buffer.
Public classChorus

The IDirectSoundFXChorus8 interface is used to set and retrieve effect parameters on a buffer that supports chorus.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXChorus8 interface exposes the following methods.

IDirectSoundFXChorus8 Members
Method Description
IDirectSoundFXChorus8::GetAllParameters The GetAllParameters method retrieves the chorus parameters of a buffer.
IDirectSoundFXChorus8::SetAllParameters The SetAllParameters method sets the chorus parameters of a buffer.
Public classCompressor

The IDirectSoundFXCompressor8 interface is used to set and retrieve effect parameters on a buffer that supports compression.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXCompressor8 interface exposes the following methods.

IDirectSoundFXCompressor8 Members
Method Description
IDirectSoundFXCompressor8::GetAllParameters The GetAllParameters method retrieves the compression parameters of a buffer.
IDirectSoundFXCompressor8::SetAllParameters The SetAllParameters method sets the compression parameters of a buffer.
Public classDeviceInformation
Contains information about a DirectSound device.
Public classDirectSound

The DirectSound interface is used to create buffer objects, manage devices, and set up the environment. This interface supersedes DirectSoundBase and adds new methods.

Obtain this interface by using the DirectSoundCreate8 or DirectSoundFullDuplexCreate8 function, or by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSound8.

In addition to the methods inherited from ComObject, the DirectSound interface exposes the following methods.

IDirectSound8 Members
Method Description
IDirectSound8::Compact The Compact method has no effect.
IDirectSound8::CreateSoundBuffer The CreateSoundBuffer method creates a sound buffer object to manage audio samples.
IDirectSound8::DuplicateSoundBuffer The DuplicateSoundBuffer method creates a new secondary buffer that shares the original buffer's memory.
IDirectSound8::GetCaps The GetCaps method retrieves the capabilities of the hardware device that is represented by the device object.
IDirectSound8::GetSpeakerConfig The GetSpeakerConfig method retrieves the speaker configuration.
IDirectSound8::Initialize The Initialize method initializes a device object that was created by using the CoCreateInstance function.
IDirectSound8::SetCooperativeLevel The SetCooperativeLevel method sets the cooperative level of the application for this sound device.
IDirectSound8::SetSpeakerConfig The SetSpeakerConfig method specifies the speaker configuration of the device.
VerifyCertification(Int32)The VerifyCertification method ascertains whether the device driver is certified for DirectX.

The LPDIRECTSOUND8 type is defined as a reference to the DirectSound interface:

 typedef struct DirectSound  *LPDIRECTSOUND8;	
            
Public classDirectSoundBase

The DirectSound interface is used to create buffer objects, manage devices, and set up the environment. This interface supersedes DirectSoundBase and adds new methods.

Obtain this interface by using the DirectSoundCreate8 or DirectSoundFullDuplexCreate8 function, or by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSound8.

In addition to the methods inherited from ComObject, the DirectSound interface exposes the following methods.

IDirectSound8 Members
Method Description
IDirectSound8::Compact The Compact method has no effect.
IDirectSound8::CreateSoundBuffer The CreateSoundBuffer method creates a sound buffer object to manage audio samples.
IDirectSound8::DuplicateSoundBuffer The DuplicateSoundBuffer method creates a new secondary buffer that shares the original buffer's memory.
IDirectSound8::GetCaps The GetCaps method retrieves the capabilities of the hardware device that is represented by the device object.
IDirectSound8::GetSpeakerConfig The GetSpeakerConfig method retrieves the speaker configuration.
IDirectSound8::Initialize The Initialize method initializes a device object that was created by using the CoCreateInstance function.
IDirectSound8::SetCooperativeLevel The SetCooperativeLevel method sets the cooperative level of the application for this sound device.
IDirectSound8::SetSpeakerConfig The SetSpeakerConfig method specifies the speaker configuration of the device.
VerifyCertification(Int32)The VerifyCertification method ascertains whether the device driver is certified for DirectX.

The LPDIRECTSOUND8 type is defined as a reference to the DirectSound interface:

 typedef struct DirectSound  *LPDIRECTSOUND8;	
            
Public classDirectSoundCapture

The IDirectSoundCapture8 interface is used to create sound capture buffers.

The interface is obtained by using the DirectSoundCaptureCreate8 or DirectSoundFullDuplexCreate8 functions, or by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSoundCapture8.

IDirectSoundCapture8 is a define for DirectSoundCapture. The two interface names are interchangeable. However, objects supporting this interface can have different functionality, depending on their class. For more information, see DirectSoundCaptureCreate8 and IDirectSoundCapture8::CreateCaptureBuffer.

In addition to the methods inherited from ComObject, the IDirectSoundCapture8 interface exposes the following methods.

IDirectSoundCapture8 Members
Method Description
IDirectSoundCapture8::CreateCaptureBuffer The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
IDirectSoundCapture8::GetCaps The GetCaps method retrieves the capabilities of the capture device.
IDirectSoundCapture8::Initialize The Initialize method initializes a capture device object created by using CoCreateInstance. Calling this method is not required when the DirectSoundCaptureCreate8 or DirectSoundFullDuplexCreate8 function is used to create the object.

The LPDIRECTSOUNDCAPTURE type is defined as a reference to the DirectSoundCapture interface:

 typedef struct DirectSoundCapture *LPDIRECTSOUNDCAPTURE;	
            
Public classDistortion

The IDirectSoundFXDistortion8 interface is used to set and retrieve effect parameters on a buffer that supports distortion.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXDistortion8 interface exposes the following methods.

IDirectSoundFXDistortion8 Members
Method Description
IDirectSoundFXDistortion8::GetAllParameters The GetAllParameters method retrieves the distortion parameters of a buffer.
IDirectSoundFXDistortion8::SetAllParameters The SetAllParameters method sets the distortion parameters of a buffer.
Public classEcho

The IDirectSoundFXEcho8 interface is used to set and retrieve effect parameters on a buffer that supports echo.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXEcho8 interface exposes the following methods.

IDirectSoundFXEcho8 Members
Method Description
IDirectSoundFXEcho8::GetAllParameters The GetAllParameters method retrieves the echo parameters of a buffer.
IDirectSoundFXEcho8::SetAllParameters The SetAllParameters method sets the echo parameters of a buffer.
Public classFlanger

The IDirectSoundFXFlanger8 interface is used to set and retrieve effect parameters on a buffer that supports flange.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXFlanger8 interface exposes the following methods.

IDirectSoundFXFlanger8 Members
Method Description
IDirectSoundFXFlanger8::GetAllParameters The GetAllParameters method retrieves the flange parameters of a buffer.
IDirectSoundFXFlanger8::SetAllParameters The SetAllParameters method sets the flange parameters of a buffer.
Public classFullDuplex

The IDirectSoundFullDuplex8 interface represents a full-duplex stream.

The interface is obtained by using the DirectSoundFullDuplexCreate8 function. This function initializes DirectSound capture and playback.

The interface can also be obtained by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSoundFullDuplex8.

IDirectSoundFullDuplex8 is a define for FullDuplex. The interface names are interchangeable.

In addition to the methods inherited from ComObject, the IDirectSoundFullDuplex8 interface exposes the following method.

IDirectSoundFullDuplex8 Members
Method Description
IDirectSoundFullDuplex8::Initialize The Initialize method initializes a full duplex object that was created by using CoCreateInstance.

The LPDIRECTSOUNDFULLDUPLEX type is defined as a reference to FullDuplex.

 typedef struct FullDuplex *LPDIRECTSOUNDFULLDUPLEX;	
            
Info

Operating System: Requires Microsoft Windows XP or later.

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.

Public classGargle

The IDirectSoundFXGargle8 interface is used to set and retrieve effect parameters on a buffer that supports amplitude modulation.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXGargle8 interface exposes the following methods.

IDirectSoundFXGargle8 Members
Method Description
IDirectSoundFXGargle8::GetAllParameters The GetAllParameters method retrieves the amplitude modulation parameters of a buffer.
IDirectSoundFXGargle8::SetAllParameters The SetAllParameters method sets the amplitude modulation parameters of a buffer.
Public classI3DL2Reverb
No documentation.
Public classListener3DSettings
The Listener3DSettings structure describes the 3D world parameters and the position of the listener. This structure is used with theIDirectSound3DListener8::GetAllParametersandIDirectSound3DListener8::SetAllParametersmethods.
Public classNoiseSuppress

The IDirectSoundCaptureFXNoiseSuppress8 interface is used to set and retrieve parameters on a capture buffer that supports noise suppression. This interface requires Microsoft WindowsXP or later.

IDirectSoundCaptureFXNoiseSuppress8 is a define for NoiseSuppress. The interface names are interchangeable.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundCaptureFXNoiseSuppress8 interface exposes the following methods.

IDirectSoundCaptureFXNoiseSuppress8 Members
Method Description
IDirectSoundCaptureFXNoiseSuppress8::GetAllParameters The IDirectSoundCaptureFXNoiseSuppress8::GetAllParameters method retrieves the noise suppression parameters of a buffer.
IDirectSoundCaptureFXNoiseSuppress8::Reset The IDirectSoundCaptureFXNoiseSuppress8::Reset method resets the effect to its initial state.
IDirectSoundCaptureFXNoiseSuppress8::SetAllParameters The IDirectSoundCaptureFXNoiseSuppress8::SetAllParameters method sets the noise suppression parameters of a buffer.

The LPDIRECTSOUNDNOISESUPPRESS8 type is defined as a reference to the IDirectSoundNoiseSuppress8 interface:

 typedef struct IDirectSoundCaptureFXNoiseSuppress8  *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8;	
            
Info

Operating System: Requires Microsoft WindowsXP or later.

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.

Public classNotificationPosition
No documentation.
Public classParametricEqualizer

The IDirectSoundFXParamEq8 interface is used to set and retrieve effect parameters on a buffer that supports parametric equalizer effects.

In addition to the methods inherited from ComObject, the IDirectSoundFXParamEq8 interface exposes the following methods.

IDirectSoundFXParamEq8 Members
Method Description
IDirectSoundFXParamEq8::GetAllParameters The GetAllParameters method retrieves the parametric equalizer parameters of a buffer.
IDirectSoundFXParamEq8::SetAllParameters The SetAllParameters method sets the parametric equalizer parameters of a buffer.
Public classPrimarySoundBuffer
A Primary DirectSound Buffer.
Public classSecondarySoundBuffer

The SecondarySoundBuffer interface is used to manage sound buffers.

The SecondarySoundBuffer interface supersedes SoundBuffer and adds new methods.

To obtain the interface, use the CreateSoundBuffer method to retrieve SoundBuffer, and then pass IID_IDirectSoundBuffer8 to IDirectSoundBuffer::QueryInterface.

For the primary buffer, you must use the SoundBuffer interface; SecondarySoundBuffer is not available. SoundBuffer is not documented separately. For documentation, see the corresponding SecondarySoundBuffer methods.

Not all methods of SoundBuffer are valid for primary buffers. For example, SetCurrentPosition will fail. See the reference topics for individual methods.

In addition to the methods inherited from ComObject, the SecondarySoundBuffer interface exposes the following methods, arranged by category.

Effects
Method Description
GetEffect(Guid, Int32, Guid, IntPtr)The GetObjectInPath method retrieves an interface for an effect object associated with the buffer.
SetEffect(Int32, SoundBufferEffectDescription, SoundEffectResult)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.
Resource Management
Method Description
AcquireResources(Int32, Int32, Int32)The AcquireResources method allocates resources for a buffer that was created with the Defer flag in the DSBUFFERDESCDSBUFFERDESC
IDirectSoundBuffer8::Restore The Restore method restores the memory allocation for a lost sound buffer.
Play Management
Method Description
IDirectSoundBuffer8::GetCurrentPosition The GetCurrentPosition method retrieves the position of the play and write cursors in the sound buffer.
IDirectSoundBuffer8::Lock The Lock method readies all or part of the buffer for a data write and returns references to which data can be written.
IDirectSoundBuffer8::Play The Play method causes the sound buffer to play, starting at the play cursor.
IDirectSoundBuffer8::SetCurrentPosition The SetCurrentPosition method sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer.
IDirectSoundBuffer8::Stop The Stop method causes the sound buffer to stop playing.
IDirectSoundBuffer8::Unlock The Unlock method releases a locked sound buffer.
Sound Parameters
Method Description
IDirectSoundBuffer8::GetFrequency The GetFrequency method retrieves the frequency, in samples per second, at which the buffer is playing.
IDirectSoundBuffer8::GetPan The GetPan method retrieves the relative volume of the left and right audio channels.
IDirectSoundBuffer8::GetVolume The GetVolume method retrieves the attenuation of the sound.
IDirectSoundBuffer8::SetFrequency The SetFrequency method sets the frequency at which the audio samples are played.
IDirectSoundBuffer8::SetPan The SetPan method sets the relative volume of the left and right channels.
IDirectSoundBuffer8::SetVolume The SetVolume method sets the attenuation of the sound.
Miscellaneous
Method Description
IDirectSoundBuffer8::GetCaps The GetCaps method retrieves the capabilities of the buffer object.
IDirectSoundBuffer8::GetFormat 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.
IDirectSoundBuffer8::GetStatus The GetStatus method retrieves the status of the sound buffer.
IDirectSoundBuffer8::Initialize The Initialize method initializes a sound buffer object if it has not yet been initialized.
IDirectSoundBuffer8::SetFormat 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.

The LPDIRECTSOUNDBUFFER8 type is defined as a reference to the SoundBuffer interface:

 typedef struct SecondarySoundBuffer  *LPDIRECTSOUNDBUFFER8; 	
            
Public classSoundBuffer

The SecondarySoundBuffer interface is used to manage sound buffers.

The SecondarySoundBuffer interface supersedes SoundBuffer and adds new methods.

To obtain the interface, use the CreateSoundBuffer method to retrieve SoundBuffer, and then pass IID_IDirectSoundBuffer8 to IDirectSoundBuffer::QueryInterface.

For the primary buffer, you must use the SoundBuffer interface; SecondarySoundBuffer is not available. SoundBuffer is not documented separately. For documentation, see the corresponding SecondarySoundBuffer methods.

Not all methods of SoundBuffer are valid for primary buffers. For example, SetCurrentPosition will fail. See the reference topics for individual methods.

In addition to the methods inherited from ComObject, the SecondarySoundBuffer interface exposes the following methods, arranged by category.

Effects
Method Description
GetEffect(Guid, Int32, Guid, IntPtr)The GetObjectInPath method retrieves an interface for an effect object associated with the buffer.
SetEffect(Int32, SoundBufferEffectDescription, SoundEffectResult)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.
Resource Management
Method Description
AcquireResources(Int32, Int32, Int32)The AcquireResources method allocates resources for a buffer that was created with the Defer flag in the DSBUFFERDESCDSBUFFERDESC
IDirectSoundBuffer8::Restore The Restore method restores the memory allocation for a lost sound buffer.
Play Management
Method Description
IDirectSoundBuffer8::GetCurrentPosition The GetCurrentPosition method retrieves the position of the play and write cursors in the sound buffer.
IDirectSoundBuffer8::Lock The Lock method readies all or part of the buffer for a data write and returns references to which data can be written.
IDirectSoundBuffer8::Play The Play method causes the sound buffer to play, starting at the play cursor.
IDirectSoundBuffer8::SetCurrentPosition The SetCurrentPosition method sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer.
IDirectSoundBuffer8::Stop The Stop method causes the sound buffer to stop playing.
IDirectSoundBuffer8::Unlock The Unlock method releases a locked sound buffer.
Sound Parameters
Method Description
IDirectSoundBuffer8::GetFrequency The GetFrequency method retrieves the frequency, in samples per second, at which the buffer is playing.
IDirectSoundBuffer8::GetPan The GetPan method retrieves the relative volume of the left and right audio channels.
IDirectSoundBuffer8::GetVolume The GetVolume method retrieves the attenuation of the sound.
IDirectSoundBuffer8::SetFrequency The SetFrequency method sets the frequency at which the audio samples are played.
IDirectSoundBuffer8::SetPan The SetPan method sets the relative volume of the left and right channels.
IDirectSoundBuffer8::SetVolume The SetVolume method sets the attenuation of the sound.
Miscellaneous
Method Description
IDirectSoundBuffer8::GetCaps The GetCaps method retrieves the capabilities of the buffer object.
IDirectSoundBuffer8::GetFormat 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.
IDirectSoundBuffer8::GetStatus The GetStatus method retrieves the status of the sound buffer.
IDirectSoundBuffer8::Initialize The Initialize method initializes a sound buffer object if it has not yet been initialized.
IDirectSoundBuffer8::SetFormat 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.

The LPDIRECTSOUNDBUFFER8 type is defined as a reference to the SoundBuffer interface:

 typedef struct SecondarySoundBuffer  *LPDIRECTSOUNDBUFFER8; 	
            
Public classSoundBuffer3D

The IDirectSound3DBuffer8 interface is used to retrieve and set parameters that describe the position, orientation, and environment of a sound buffer in 3D space.

IDirectSound3DBuffer8 is a define for SoundBuffer3D. The two interface names are interchangeable.

The IDirectSound3DBuffer8 interface is obtained from a buffer that was created with the Control3D flag. You can get it from the SecondarySoundBuffer interface by using the QueryInterface method.

In addition to the methods inherited from ComObject, the IDirectSound3DBuffer8 interface exposes the following methods, arranged by category.

3D mode
Method Description
IDirectSound3DBuffer8::GetMode The GetMode method retrieves the operation mode for 3D sound processing.
IDirectSound3DBuffer8::SetMode The SetMode method sets the operation mode for 3D sound processing.
Batch Parameters
Method Description
IDirectSound3DBuffer8::GetAllParameters The GetAllParameters method retrieves the 3D properties of the sound buffer.
IDirectSound3DBuffer8::SetAllParameters The SetAllParameters method sets all 3D sound buffer properties.
Minimum and Maximum Distance
Method Description
IDirectSound3DBuffer8::GetMaxDistance The GetMaxDistance method retrieves the maximum distance, which is the distance from the listener beyond which sounds in this buffer are no longer attenuated.
IDirectSound3DBuffer8::GetMinDistance The GetMinDistance method retrieves the minimum distance, which is the distance from the listener at which sounds in this buffer begin to be attenuated.
IDirectSound3DBuffer8::SetMaxDistance The SetMaxDistance method sets the maximum distance, which is the distance from the listener beyond which sounds in this buffer are no longer attenuated.
IDirectSound3DBuffer8::SetMinDistance The SetMinDistance method sets the minimum distance, which is the distance from the listener at which sounds in this buffer begin to be attenuated.
Position
Method Description
IDirectSound3DBuffer8::GetPosition The GetPosition method retrieves the position of the sound source.
IDirectSound3DBuffer8::SetPosition The SetPosition method sets the position of the sound source.
Sound Projection Cone
Method Description
IDirectSound3DBuffer8::GetConeAngles The GetConeAngles method retrieves the inside and outside angles of the sound projection cone.
IDirectSound3DBuffer8::GetConeOrientation The GetConeOrientation method retrieves the orientation of the sound projection cone.
IDirectSound3DBuffer8::GetConeOutsideVolume The GetConeOutsideVolume method retrieves the volume of the sound outside the outside angle of the sound projection cone.
IDirectSound3DBuffer8::SetConeAngles The SetConeAngles method sets the inside and outside angles of the sound projection cone.
IDirectSound3DBuffer8::SetConeOrientation The SetConeOrientation method sets the orientation of the sound projection cone.
IDirectSound3DBuffer8::SetConeOutsideVolume The SetConeOutsideVolume method sets the volume of the sound outside the outside angle of the sound projection cone.
Velocity
Method Description
IDirectSound3DBuffer8::GetVelocity The GetVelocity method retrieves the velocity of the sound source.
IDirectSound3DBuffer8::SetVelocity The SetVelocity method sets the velocity of the sound source.

The LPDIRECTSOUND3DBUFFER type is defined as a reference to the IDirectSound3DBuffer8 interface:

 typedef struct SoundBuffer3D  *LPDIRECTSOUND3DBUFFER;	
            
Public classSoundBufferDescription
The SoundBufferDescription 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.

Public classSoundListener3D

The IDirectSound3DListener8 interface is used to retrieve and set parameters that describe a listener's position, orientation, and listening environment in 3D space.

The interface can be obtained by calling the IDirectSoundBuffer8::QueryInterface method on a primary buffer created with the Control3D flag.

In addition to the methods inherited from ComObject, the IDirectSound3DListener8 interface exposes the following methods, arranged by category.

Batch Parameters
Method Description
IDirectSound3DListener8::CommitDeferredSettings The CommitDeferredSettings method commits any deferred settings made since the last call to this method.
IDirectSound3DListener8::GetAllParameters The GetAllParameters method retrieves all 3D parameters of the sound environment and the listener.
IDirectSound3DListener8::SetAllParameters The SetAllParameters method sets all 3D parameters of the sound environment and the listener.
Global Sound Properties
Method Description
IDirectSound3DListener8::GetDistanceFactor The GetDistanceFactor method retrieves the distance factor, which is the number of meters in a vector unit.
IDirectSound3DListener8::GetDopplerFactor The GetDopplerFactor method retrieves the multiplier for the Doppler effect.
IDirectSound3DListener8::GetRolloffFactor The GetRolloffFactor method retrieves the rolloff factor, which determines the rate of attenuation over distance.
IDirectSound3DListener8::SetDistanceFactor The SetDistanceFactor method sets the distance factor, which is the number of meters in a vector unit.
IDirectSound3DListener8::SetDopplerFactor The SetDopplerFactor method sets the multiplier for the Doppler effect.
IDirectSound3DListener8::SetRolloffFactor The SetRolloffFactor method sets the rolloff factor, which determines the rate of attenuation over distance.
Listener Properties
Method Description
IDirectSound3DListener8::GetOrientation The GetOrientation method retrieves the orientation of the listener's head.
IDirectSound3DListener8::GetPosition The GetPosition method retrieves the listener's position.
IDirectSound3DListener8::GetVelocity The GetVelocity method retrieves the listener's velocity.
IDirectSound3DListener8::SetOrientation The SetOrientation method sets the orientation of the listener's head.
IDirectSound3DListener8::SetPosition The SetPosition method sets the listener's position.
IDirectSound3DListener8::SetVelocity The SetVelocity method sets the listener's velocity.

The LPDIRECTSOUND3DLISTENER type is defined as a reference to the SoundListener3D interface:

 typedef struct SoundListener3D  *LPDIRECTSOUND3DLISTENER;	
            
Public classVolume
Functions
Public classWavesReverb

The IDirectSoundFXWavesReverb8 interface is used to set and retrieve effect parameters on a buffer that supports Waves reverberation.

This interface is obtained by calling GetObjectInPath on the buffer that supports the effect.

In addition to the methods inherited from ComObject, the IDirectSoundFXWavesReverb8 interface exposes the following methods.

IDirectSoundFXWavesReverb8 Members
Method Description
IDirectSoundFXWavesReverb8::GetAllParameters The GetAllParameters method retrieves the music reverberation parameters of a buffer.
IDirectSoundFXWavesReverb8::SetAllParameters The SetAllParameters method sets the music reverberation parameters of a buffer.

The Waves reverberation DMO is based on the Waves MaxxVerb technology, which is licenced to Microsoft.

Structures
  StructureDescription
Public structureAcousticEchoCancelSettings
The AcousticEchoCancelSettings structure contains parameters for acoustic echo cancellation in a capture buffer.
Public structureChorusSettings
The ChorusSettings structure contains parameters for a chorus effect.
Public structureCompressorSettings
The CompressorSettings structure contains parameters for a compression effect.
Public structureDistortionSettings
The DistortionSettings structure contains parameters for a distortion effect.
Public structureEchoSettings
The EchoSettings structure contains parameters for an echo effect.
Public structureFlangerSettings
The FlangerSettings structure contains parameters for a flange effect.
Public structureGargleSettings
The GargleSettings structure contains parameters for an amplitude modulation effect.
Public structureI3DL2ReverbSettings
The I3DL2ReverbSettings structure contains parameters for an I3DL2 (Interactive 3D Audio Level 2) reverberation effect.
Public structureNoiseSuppressSettings
The NoiseSuppressSettings structure contains parameters for noise suppression in a capture buffer.
Public structureParametricEqualizerSettings
The ParametricEqualizerSettings structure contains parameters for a parametric equalizer effect.
Public structureWavesReverbSettings
The WavesReverbSettings structure contains parameters for a Waves reverberation effect.
Enumerations
  EnumerationDescription
Public enumerationAcousticEchoCancelMode
The AcousticEchoCancelSettings structure contains parameters for acoustic echo cancellation in a capture buffer.
Public enumerationAcousticEchoCancelStatus

The KSPROPERTY_AEC_STATUS property is used to monitor the status of an AEC node (KSNODETYPE_ACOUSTIC_ECHO_CANCEL). This is an optional property of an AEC node.

Public enumerationBufferFlags
No documentation.
Public enumerationBufferStatus
No documentation.
Public enumerationCapabilitiesFlags
The Capabilities structure describes the capabilities of a device. It is used by theIDirectSound8::GetCapsmethod.
Public enumerationCaptureBufferCapabilitiesFlags
No documentation.
Public enumerationCaptureBufferStatusFlags
No documentation.
Public enumerationCaptureCapabilitiesFlags
The CaptureCapabilities structure describes the capabilities of the capture device. It is used by theIDirectSoundCapture8::GetCapsmethod.
Public enumerationCaptureEffectResult
The CaptureEffectDescription structure contains parameters for an effect associated with a capture buffer.
Public enumerationCooperativeLevel
No documentation.
Public enumerationI3DL2MaterialPreset
No documentation.
Public enumerationI3DL2ReverbPreset
No documentation.
Public enumerationLockFlags
No documentation.
Public enumerationMode3D
The GetMode method retrieves the operation mode for 3D sound processing.
Public enumerationPlayFlags
No documentation.
Public enumerationSoundEffectResult
No documentation.
Public enumerationSpeakerConfiguration
No documentation.
Public enumerationSpeakerGeometry
No documentation.