//////////////////////////////////////////////////
// The call failed because resources (such as a priority level)
// were already being used by another caller.
//////////////////////////////////////////////////
DSERR_ALLOCATED = DSErrorMask or 10;
//////////////////////////////////////////////////
// The control (vol,pan,etc.) requested by the caller is not available.
//////////////////////////////////////////////////
DSERR_CONTROLUNAVAIL = DSErrorMask or 30;
//////////////////////////////////////////////////
// An invalid parameter was passed to the returning function
//////////////////////////////////////////////////
DSERR_INVALIDPARAM = E_INVALIDARG;
//////////////////////////////////////////////////
// This call is not valid for the current state of this object
//////////////////////////////////////////////////
DSERR_INVALIDCALL = DSErrorMask or 50;
//////////////////////////////////////////////////
// An undetermined error occured inside the DSound subsystem
//////////////////////////////////////////////////
DSERR_GENERIC = E_FAIL;
//////////////////////////////////////////////////
// The caller does not have the priority level required for the function to
// succeed.
//////////////////////////////////////////////////
DSERR_PRIOLEVELNEEDED = DSErrorMask or 70;
//////////////////////////////////////////////////
// The DSound subsystem couldn't allocate sufficient memory to complete the
// caller's request.
//////////////////////////////////////////////////
DSERR_OUTOFMEMORY = E_OUTOFMEMORY;
//////////////////////////////////////////////////
// The specified WAVE format is not supported
//////////////////////////////////////////////////
DSERR_BADFORMAT = DSErrorMask or 100;
//////////////////////////////////////////////////
// The function called is not supported at this time
//////////////////////////////////////////////////
DSERR_UNSUPPORTED = E_NOTIMPL;
//////////////////////////////////////////////////
// No sound driver is available for use
//////////////////////////////////////////////////
DSERR_NODRIVER = DSErrorMask or 120;
//////////////////////////////////////////////////
// This object is already initialized
//////////////////////////////////////////////////
DSERR_ALREADYINITIALIZED = DSErrorMask or 130;
//////////////////////////////////////////////////
// This object does not support aggregation
//////////////////////////////////////////////////
DSERR_NOAGGREGATION = CLASS_E_NOAGGREGATION;
//////////////////////////////////////////////////
// The buffer memory has been lost, and must be Restored.
//////////////////////////////////////////////////
DSERR_BUFFERLOST = DSErrorMask or 150;
//////////////////////////////////////////////////
// Another app has a higher priority level, preventing this call from
// succeeding.
//////////////////////////////////////////////////
DSERR_OTHERAPPHASPRIO = DSErrorMask or 160;
function DirectSoundCreate; external 'DSOUND' name 'DirectSoundCreate';
function DirectSoundEnumerateW; external 'DSound' name 'DirectSoundEnumerateW';
function DirectSoundEnumerateA; external 'DSound' name 'DirectSoundEnumerateA';
function DirectSoundEnumerate; external 'DSound' name 'DirectSoundEnumerateA';
#ifdef __cplusplus
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
struct IDirectSound;
struct IDirectSoundBuffer;
struct IDirectSound3DListener;
struct IDirectSound3DBuffer;
struct IDirectSoundCapture;
struct IDirectSoundCaptureBuffer;
struct IDirectSoundNotify;
#endif // __cplusplus
// The call failed because resources (such as a priority level)
// were already being used by another caller.
#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
// The control (vol,pan,etc.) requested by the caller is not available.
#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
// An invalid parameter was passed to the returning function
#define DSERR_INVALIDPARAM E_INVALIDARG
// This call is not valid for the current state of this object
#define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
// An undetermined error occured inside the DirectSound subsystem
#define DSERR_GENERIC E_FAIL
// The caller does not have the priority level required for the function to
// succeed.
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
// Not enough free memory is available to complete the operation
#define DSERR_OUTOFMEMORY E_OUTOFMEMORY
// The specified WAVE format is not supported
#define DSERR_BADFORMAT MAKE_DSHRESULT(100)
// The function called is not supported at this time
#define DSERR_UNSUPPORTED E_NOTIMPL
// No sound driver is available for use
#define DSERR_NODRIVER MAKE_DSHRESULT(120)
// This object is already initialized
#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
// This object does not support aggregation
#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
// The buffer memory has been lost, and must be restored.
#define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
// Another app has a higher priority level, preventing this call from
// succeeding.
#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
// This object has not been initialized
#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
// The requested COM interface is not available
#define DSERR_NOINTERFACE E_NOINTERFACE