///////////////////////////////////////////////////////////////////////////
//
// $Header: /Repository/drv/win95/drv/asiwavx.h,v 1.32 2006/01/13 13:49:34 as-age Exp $
//
// AudioScience Multi-Media Extensions header file.
// This file contains additional defines and structures that extend those
// provided by Microsoft in MMSYSTEM.H.
//
// The AudioScience mixer app has additional information about how to use
// these controls. The mixer app. is downloadable from www.audioscience.com.
// Select Help/Lines and Controls to view documentation on ASI controls.
// Also see spcwavex.doc available from the AudioScience website.
//
// Copyright (C) 2002 AudioScience Inc.
//
//////////////////////////////////////////////////////////////////////////
#ifndef _ASIMMEXT_H_
#define _ASIMMEXT_H_

#ifdef __TURBOC__
#define TCHAR char
#else
#include <tchar.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#define ASI_MIXER_SHORT_NAME_CHARS   16		///< Same as MIXER_SHORT_NAME_CHARS in mmsystem.h.

///////////////////////////////////////////////////////
// Custom messages (have to start greater than 0x4000)
///////////////////////////////////////////////////////
#define WODM_GETLEVEL_LEGACY (21)         // Win 3.1 only
#define WIDM_GETLEVEL_LEGACY (63)			// Win 3.1 only
#define WODM_GETLEVEL		(0x4000+1)		// greater than WIDM_USER = DRVM_USER (for Win 95)
#define WIDM_GETLEVEL		(0x4000+1)
#define WODM_ASI_TEST		(0x4000+2)		// 0x4000 - WODM_USER in Windows 95/98
#define WODM_ASI_PUNCHINOUT	(0x4000+3)		// 0x4000 - WODM_USER in Windows 95/98
#define WODM_ASI_PLAYING	(0x4000+4)		// 0x4000 - WODM_USER in Windows 95/98
#define WODM_ASI_SETTIMESCALE	(0x4000+5)		// 0x4000 - WODM_USER in Windows 95/98
#define MXDM_ASI_SAVE_MIXER_STATE (0x4000+1)	// 0x4000 - MXDM_USER in Windows 95/98

#ifdef UNICODE
#define ASI_MIXER_NOTIFICATION_MESSAGE_ID L"ASI_MIXER_NOTIFICATION_MESSAGE"		// UNICODE wchar
#else
#define ASI_MIXER_NOTIFICATION_MESSAGE_ID "ASI_MIXER_NOTIFICATION_MESSAGE"		// char
#endif

///////////////////////////////////////////////////////
// Custom calls and defines
///////////////////////////////////////////////////////

#define ASI_WHDR_NOHOLD (0x10000)		// buffers are loaded immediately and returned to the application
#define ASI_WHDR_FASTLOAD (0x20000)     // large buffers are loaded in a single operation (normally the driver loads approx. 16 kbytes at a time).

// Win 3.1 16-bit GetLevel calls - these are compatible with Antex Win 3.1 drivers
//MMRESULT asiwaveOutGetLevelLegacy( HWAVEOUT hwo,  LPDWORD &dwLevel );
#define asiwaveOutGetLevelLegacy( hwo,  lpdwLevel ) waveOutMessage( hWaveOut, WODM_GETLEVEL_LEGACY, lpdwLevel, (DWORD)NULL )
//MMRESULT asiwaveInGetLevelLegacy( HWAVEOUT hwo,  LPDWORD &dwLevel );
#define asiwaveInGetLevelLegacy( hwo,  lpdwLevel ) waveOutMessage( hWaveOut, WIDM_GETLEVEL_LEGACY, lpdwLevel, (DWORD)NULL )

// Win 95/98 GetLevel calls (can't thunk lpdwLevel, so have to return level as error code ).
//dwLevel = asiwaveOutGetLevel( HWAVEOUT hwo );
#define asiwaveOutGetLevel( hwo,  lpdwLevel ) waveOutMessage( hWaveOut, WODM_GETLEVEL, 0, (DWORD)NULL )
//dwLevel = asiwaveInGetLevel( HWAVEOUT hwo );
#define asiwaveInGetLevel( hwo,  lpdwLevel ) waveOutMessage( hWaveOut, WIDM_GETLEVEL, 0, (DWORD)NULL )

//MMRESULT asiwaveOutPunchInOut( HWAVEOUT hwo, DWORD dwPunchInSample, DWORD dwPunchOutSample )
#define asiwaveOutPunchInOut(hwo,punchin,punchout) waveOutMessage( hwo, WODM_ASI_PUNCHINOUT,punchin,punchout)
//MMRESULT asiwaveOutPlaying( HWAVEOUT hwo), returns WAVERR_STILLPLAYING or 0 if playback is completed.
#define asiwaveOutPlaying(hwo) waveOutMessage( hwo, WODM_ASI_PLAYING,0,0)

//MMRESULT asiwaveOutSetTimeScale( HWAVEOUT hwo, DWORD dwTimeScale), returns WAVERR_STILLPLAYING or 0 if playback is completed.
// dwTimeScale is percent of time multipled by 100 (ie in 100ths of a percent).
// dwTimeScale = 10000 (100%) no time duration change.
// dwTimeScale = 9000 (90%) the file plays in 90% of the original time, ie 10 sec file will play in 9 sec
// dwTimeScale = 11000 (110%) the file plays in 110% of the original time, ie 10 sec file will play in 11 sec
#define asiwaveOutSetTimeScale(hwo, dwTimeScale) waveOutMessage( hwo, WODM_ASI_SETTIMESCALE,dwTimeScale,0)

//MMRESULT asimixerSaveState( HMIXER hmx), returns 0.
//This will save the volume settings to asiwav.ini
#define asimixerSaveState(hmx) mixerMessage( hmx, MXDM_ASI_SAVE_MIXER_STATE,0,0)


#define ASI_WAVE_FORMAT_RAW_BITSTREAM 0x4000

//////////////////////////////////////////
// Custom Line Types
//////////////////////////////////////////
#define ASI_MIXERLINE_COMPONENTTYPE_SRC_BASE		(MIXERLINE_COMPONENTTYPE_SRC_FIRST + 20)	// _SRC_LAST is 10, so include some margin
#define ASI_MIXERLINE_COMPONENTTYPE_SRC_TUNER		(ASI_MIXERLINE_COMPONENTTYPE_SRC_BASE+1)

//////////////////////////////////////////
// Custom Control Types
//////////////////////////////////////////

#define ASI_MIXERCONTROL_CONTROLTYPE_NVMEM    (MIXERCONTROL_CONTROLTYPE_CUSTOM+100)
#define ASI_MIXERCONTROL_CONTROLTYPE_AUTOFADE (MIXERCONTROL_CONTROLTYPE_CUSTOM+101)
#define ASI_MIXERCONTROL_CONTROLTYPE_AES18BG  (MIXERCONTROL_CONTROLTYPE_CUSTOM+102)
#define ASI_MIXERCONTROL_CONTROLTYPE_AES18RX  (MIXERCONTROL_CONTROLTYPE_CUSTOM+103)
#define ASI_MIXERCONTROL_CONTROLTYPE_AES18TX  (MIXERCONTROL_CONTROLTYPE_CUSTOM+104)
#define ASI_MIXERCONTROL_CONTROLTYPE_DIGITAL_IN  (MIXERCONTROL_CONTROLTYPE_CUSTOM+105)
#define ASI_MIXERCONTROL_CONTROLTYPE_DIGITAL_OUT  (MIXERCONTROL_CONTROLTYPE_CUSTOM+106)
#define ASI_MIXERCONTROL_CONTROLTYPE_DSPASSERT  (MIXERCONTROL_CONTROLTYPE_CUSTOM+107)
#define ASI_MIXERCONTROL_CONTROLTYPE_ADAPTER_CAPABILITY  (MIXERCONTROL_CONTROLTYPE_CUSTOM+108)
#define ASI_MIXERCONTROL_CONTROLTYPE_MASTER_VOLUME  (MIXERCONTROL_CONTROLTYPE_CUSTOM+109)
#define ASI_MIXERCONTROL_CONTROLTYPE_PARAMETRIC_EQ  (MIXERCONTROL_CONTROLTYPE_CUSTOM+110)
#define ASI_MIXERCONTROL_CONTROLTYPE_COMPANDER  (MIXERCONTROL_CONTROLTYPE_CUSTOM+111)
#define ASI_MIXERCONTROL_CONTROLTYPE_TONEDETECTOR  (MIXERCONTROL_CONTROLTYPE_CUSTOM+112)
#define ASI_MIXERCONTROL_CONTROLTYPE_SILENCEDETECTOR  (MIXERCONTROL_CONTROLTYPE_CUSTOM+113)

//////////////////////////////////////////
// Custom Error messages
//////////////////////////////////////////
#define ASI_MIXERR_CAPABILITY_DISABLED (MIXERR_LASTERROR+1)	// this is returned when too many attempts have been made to update the adapter's capabilities.

//////////////////////////////////////////
// NvMem (Non-Volatile Memory) Control
//////////////////////////////////////////

typedef struct {
	DWORD	dwIndex;
	DWORD	dwData;
	DWORD	dwLocations;
	 }  ASI_MIXERCONTROLDETAILS_NVMEM,
	  *PASI_MIXERCONTROLDETAILS_NVMEM,
FAR *LPASI_MIXERCONTROLDETAILS_NVMEM;

//////////////////////////////////////////////////////////////////////////
// Adapter Capability Control (used for turning on restricted functions)
/////////////////////////////////////////////////////////////////////////

typedef struct {
	DWORD	dwCapability;
	DWORD	dwKey;
	 }  ASI_MIXERCONTROLDETAILS_ADAPTER_CAPABILITY,
	  *PASI_MIXERCONTROLDETAILS_ADAPTER_CAPABILITY,
FAR *LPASI_MIXERCONTROLDETAILS_ADAPTER_CAPABILITY;

//////////////////////////////////////////
// Autofade volume Control
//////////////////////////////////////////
typedef struct {
	DWORD	dwTargetVolume[2];
	DWORD dwFadeMs;
	}    ASI_MIXERCONTROLDETAILS_AUTOFADE,
		*PASI_MIXERCONTROLDETAILS_AUTOFADE,
 FAR *LPASI_MIXERCONTROLDETAILS_AUTOFADE;


/////////////////////////////////////////////////////////////
// Digital In/Out Controls for the AESEBU/SPDIF bitstreams
////////////////////////////////////////////////////////////

typedef struct {
	unsigned int	DigitalFormat	:1;		/* set to AESEBU or SPDIF */
	unsigned int	ErrorFlag		:1;		/* set when receiver is not working correctly */
	// expansion allowed here
	} ASI_DIGITAL_IN_BITFIELDS;

typedef struct {
	DWORD	dwSampleRate;				/* Not currently implemented - will return 0 */
	union	{
		DWORD dw;
		ASI_DIGITAL_IN_BITFIELDS bf;
	} u;
}      ASI_MIXERCONTROLDETAILS_DIGITAL_IN,
	 *PASI_MIXERCONTROLDETAILS_DIGITAL_IN,
FAR *LPASI_MIXERCONTROLDETAILS_DIGITAL_IN;

typedef struct {
	unsigned int	DigitalFormat	:1;		/* set to AESEBU or SPDIF */
	// expansion allowed here
	} ASI_DIGITAL_OUT_BITFIELDS;

typedef struct {
	DWORD	dwSampleRate;               /* Not currently implemented - will return 0 */
	union	{
		DWORD dw;
		ASI_DIGITAL_OUT_BITFIELDS bf;
	} u;
}      ASI_MIXERCONTROLDETAILS_DIGITAL_OUT,
	 *PASI_MIXERCONTROLDETAILS_DIGITAL_OUT,
FAR *LPASI_MIXERCONTROLDETAILS_DIGITAL_OUT;

#define ASI_DIGITAL_FORMAT_AESEBU (1)
#define ASI_DIGITAL_FORMAT_SPDIF (0)

///////////////////////////////////////////////////////
// AES18 interface definition
///////////////////////////////////////////////////////

#define ASI_AES18_MAX_CHANNELS (2)
#define ASI_AES18_MAX_PRIORITIES (4)
#define ASI_AES18BG_MASTER (1)
#define ASI_AES18BG_SLAVE (2)
#define ASI_AES18BG_CHANNEL_MODE_JOINT (0)
#define ASI_AES18BG_CHANNEL_MODE_INDEPENDENT (1)
#define ASI_AES18_MESSAGE_BUFFER_SIZE (1024)


//////////////////////////
// AES18 Block generator
//////////////////////////
typedef struct {
		DWORD dwMasterSlave[ASI_AES18_MAX_CHANNELS];
		DWORD dwMasterBlocksPerSec[ASI_AES18_MAX_CHANNELS];
		DWORD dwMasterPriorityEnable[ASI_AES18_MAX_CHANNELS][ASI_AES18_MAX_PRIORITIES];
		DWORD dwChannelMode;
	}  ASI_MIXERCONTROLDETAILS_AES18BG,
	 *PASI_MIXERCONTROLDETAILS_AES18BG,
FAR *LPASI_MIXERCONTROLDETAILS_AES18BG;
/* Parameters:
dwMasterSlave Specifies master or slave mode.
	Valid values are ASI_AES18BG_MASTER and ASI_AES18BG_SLAVE.
dwMasterBlocksPerSec This specifies the number of blocks per second.
	Valid rates are 2,5,24,25,33,100.
dwMasterPriorityEnable This array dictates whether a specific priority is
	enabled on a specific channel. A value of 1 indicates that the channel
	and priority is enabled, while 0 indicates that it is disabled.
dwChannelMode should be set to one of ASI_AES18_CHANNEL_MODE_JOINT, or
	ASI_AES18_CHANNEL_MODE_INDEPENDENT. The "JOINT" mode corresponds to the
	A+B mode of the Quantec Zombie, while the "INDEPENDENT" mode allows both
	the left and right channels to be used independently. If the "JOINT" mode
	is selected, messages should be sent on the left channel only. The data from
	these messages will be send on both left and right channels.*/


//////////////////////////
// AES18 Receiver
//////////////////////////
#define ASI_AES18RX_SET_ADDRESS (1)
#define ASI_AES18RX_GET_STATE (2)
#define ASI_AES18RX_GET_MSG_SIZE (3)
#define ASI_AES18RX_GET_MSG (4)
#define ASI_AES18RX_GET_ADDRESS (5)

typedef struct {
	DWORD dwAddress[ASI_AES18_MAX_CHANNELS];
} ASI_MIXERCONTROLDETAILS_AES18RX_ADDRESS;
/* Parameters:
dwAddress Specifies the address of the receiver. */

typedef struct {
	DWORD dwFrameError[ASI_AES18_MAX_CHANNELS];
	DWORD dwMessageWaiting[ASI_AES18_MAX_CHANNELS][ASI_AES18_MAX_PRIORITIES];
	DWORD dwBufferOverflow[ASI_AES18_MAX_CHANNELS][ASI_AES18_MAX_PRIORITIES];
	DWORD dwMissedMessage[ASI_AES18_MAX_CHANNELS][ASI_AES18_MAX_PRIORITIES];
} ASI_MIXERCONTROLDETAILS_AES18RX_STATE;
/* Parameters:
dwFrameError Set to one if a frame check sequence indicates an error.
dwMessageWaiting Set to one if a message is waiting.
dwBufferOverflow Set to one if a buffer has overflowed. This occurs if an
	incoming message exceeds the available buffering on the DSP. This is an
	internal error and should be reported to AudioScience.
dwMissedMessage Set to one if an incoming message was missed due to a
	message already being queued in a buffer required by an incoming message.*/

typedef struct {
	DWORD dwMaxBytesPerMessage[ASI_AES18_MAX_PRIORITIES];
} ASI_MIXERCONTROLDETAILS_AES18RX_MSG_SIZE;
/* Parameters:
dwMaxBytesPerMessage Specifies the maximum message size (in bytes) that the
	receiver supports. This can then be used by the application to allocate
	buffers for receiving AES-18 messages. */

typedef struct {
	DWORD dwChannel;
	DWORD dwPriority;
	DWORD dwHostMessage[ASI_AES18_MESSAGE_BUFFER_SIZE];
	DWORD dwReturnedMessageSize;
} ASI_MIXERCONTROLDETAILS_AES18RX_MSG;
/* Parameters:
dwChannel Specifies the channel to retreive the message from.
dwPriority Specifies the priority of the message to retrieve.
pbHostMessage The host destination buffer for the retrieved message.
	The  size of this buffer should be identical to that returned by
	a call to ASI_AES18RX_GET_MSG_SIZE.
dwHostMessageSize The size (in bytes) of the host destination buffer.
pdwReturnedMessageSize The size (in bytes) of the retreived message.*/

typedef struct {
		DWORD dwAES18MsgType;
		union {
			ASI_MIXERCONTROLDETAILS_AES18RX_MSG Msg;
			ASI_MIXERCONTROLDETAILS_AES18RX_MSG_SIZE Size;
			ASI_MIXERCONTROLDETAILS_AES18RX_STATE State;
			ASI_MIXERCONTROLDETAILS_AES18RX_ADDRESS Adr;
		} u;
	}  ASI_MIXERCONTROLDETAILS_AES18RX,
	 *PASI_MIXERCONTROLDETAILS_AES18RX,
FAR *LPASI_MIXERCONTROLDETAILS_AES18RX;
/* Parameters:
dwAES18RxMsgType Should be set to one of ASI_AES18RX_SET_ADDRESS,
	ASI_AES18RX_GET_STATE, ASI_AES18RX_GET_MSG_SIZE, ASI_AES18RX_GET_MSG.
	The union statement should be self explanatory. */

//////////////////////////
// AES18 Transmitter
//////////////////////////
#define ASI_AES18TX_SET_MSG (1)
#define ASI_AES18TX_GET_STATE (2)
#define ASI_AES18TX_GET_MSG_SIZE (3)

typedef struct {
	DWORD dwChannel;
	DWORD dwPriority;
	DWORD dwRepetitionIndex;
	DWORD dwDestinationAddress;
	DWORD dwHostMessage[ASI_AES18_MESSAGE_BUFFER_SIZE];
	DWORD dwHostMessageLength;
} ASI_MIXERCONTROLDETAILS_AES18TX_MSG;

/* Parameters:
dwChannel Specifies the channel to send the message on.
dwPriority Specifies the priority of the message.
dwRepetitionIndex The number of times this message should be repeated.
dwDestinationAddress The AES-18 address of the device to receive this message.
pbHostMessage A pointer to the message buffer.
dwHostMessageSize The size (in bytes) of the host message. */

typedef struct {
	DWORD dwFrameError[ASI_AES18_MAX_CHANNELS];
	DWORD dwPriorityChannelBusy[ASI_AES18_MAX_CHANNELS][ASI_AES18_MAX_PRIORITIES];
} ASI_MIXERCONTROLDETAILS_AES18TX_STATE;
/* Parameters:
dwPriorityChannelBusy Set to one if a particular priority channel is busy.
	The state of the transmitter should be checked before sending an AES-18
	message to verify that the desired channel and priority combination is
	available. */

typedef struct {
	DWORD dwMaxBytesPerMessage[ASI_AES18_MAX_PRIORITIES];
} ASI_MIXERCONTROLDETAILS_AES18TX_MSG_SIZE;
/* Parameters:
dwMaxBytesPerMessage Specifies the maximum message size (in bytes) that the
	transmitter supports.*/

typedef struct {
		DWORD dwAES18MsgType;
		union {
			ASI_MIXERCONTROLDETAILS_AES18TX_MSG Msg;
			ASI_MIXERCONTROLDETAILS_AES18TX_MSG_SIZE Size;
			ASI_MIXERCONTROLDETAILS_AES18TX_STATE State;
		} u;
	}  ASI_MIXERCONTROLDETAILS_AES18TX,
	 *PASI_MIXERCONTROLDETAILS_AES18TX,
FAR *LPASI_MIXERCONTROLDETAILS_AES18TX;

/* Parameters:
dwAES18MsgType Should be set to one of ASI_AES18TX_GET_STATE,
	ASI_AES18TX_GET_MSG_SIZE, ASI_AES18TX_SET_MSG. The union statement should
	be self explanatory. */

////////////////////////////////////////////////////////
// DSP Assert Control (retrieves asserts from the DSP)
///////////////////////////////////////////////////////

typedef struct {
			DWORD	  bAssertPresent;
			char    szAssert[48];
			DWORD   dwLineNumber;
	 }  ASI_MIXERCONTROLDETAILS_DSPASSERT,
	  *PASI_MIXERCONTROLDETAILS_DSPASSERT,
FAR *LPASI_MIXERCONTROLDETAILS_DSPASSERT;

//////////////////////////////////////////
// ParametricEQ
//////////////////////////////////////////
#define ASI_PARAMETRIC_EQ_SET_STATE (1)
#define ASI_PARAMETRIC_EQ_SET_BAND (2)
#define ASI_PARAMETRIC_EQ_GET_STATE (1)
#define ASI_PARAMETRIC_EQ_GET_BAND (2)
#define ASI_PARAMETRIC_EQ_GET_INFO (3)

/*! Equalizer filter types, matches definition in HPI.H ! */
enum ASI_PARAMETRIC_EQ_FILTER_TYPE {
	ASI_FILTER_TYPE_BYPASS    = 0, ///< Filter is turned off

	ASI_FILTER_TYPE_LOWSHELF  = 1, ///< EQ low shelf
	ASI_FILTER_TYPE_HIGHSHELF = 2, ///< EQ high shelf
	ASI_FILTER_TYPE_EQ_BAND   = 3, ///< EQ gain

	ASI_FILTER_TYPE_LOWPASS   = 4, ///< Standard low pass
	ASI_FILTER_TYPE_HIGHPASS  = 5, ///< Standard high pass
	ASI_FILTER_TYPE_BANDPASS  = 6, ///< Standard band pass
	ASI_FILTER_TYPE_BANDSTOP  = 7  ///< Standard band stop/notch
};

typedef struct {
		DWORD dwMsgType;
		union {
			DWORD dwState;
			DWORD dwNumberOfBands;
			struct {
				DWORD dwIndex;
				DWORD dwType;
				DWORD dwFrequencyHz;
				DWORD dwQ100;
				short nGain0_01dB;
			} Band;
		} u;
	}    ASI_MIXERCONTROLDETAILS_PARAMETRIC_EQ,
		*PASI_MIXERCONTROLDETAILS_PARAMETRIC_EQ,
 FAR *LPASI_MIXERCONTROLDETAILS_PARAMETRIC_EQ;

//////////////////////////////////////////
// Compander
//////////////////////////////////////////
/* Parameters:
dwAttack_ms 	Attack time of compander in milliseconds.
dwDecay_ms 		Decay or release time of compander in milliseconds.
dwCompressionRatio100 	Compression/expansion level x 100.
dwThreshold0_01dB 		Threshold level in 100ths of dB.
dwMakeupGain_01dB 		Makeup gain 100ths of dB.
*/
typedef struct {
		DWORD dwAttack_ms;
		DWORD dwDecay_ms;
		LONG nCompressionRatio100;
		LONG nThreshold0_01dB;
		LONG nMakeupGain_01dB;
	}    ASI_MIXERCONTROLDETAILS_COMPANDER,
		*PASI_MIXERCONTROLDETAILS_COMPANDER,
 FAR *LPASI_MIXERCONTROLDETAILS_COMPANDER;

//////////////////////////////////////////
// ToneDetector
//////////////////////////////////////////
#define ASI_TONEDETETECTOR_GET_COUNT (1) 	///< Returns the number of tones available to detect.
#define ASI_TONEDETETECTOR_GET_ENABLE (2)    ///< Returns 1 if the tone detector is enabled.
#define ASI_TONEDETETECTOR_GET_ENABLE_EVENTS (3) ///< Returns 1 if the tone detector is adding events to the event queue.
#define ASI_TONEDETETECTOR_GET_THRESHOLD (4) ///< Returns the tone detector threshold.
#define ASI_TONEDETETECTOR_GET_STATE (5) ///< Returns the tone state (bit mapped).
#define ASI_TONEDETETECTOR_GET_FREQUENCY (6) ///< Returns the tone state (bit mapped).
#define ASI_TONEDETETECTOR_SET_ENABLE (16)    ///< A value of 1 enables the tone detector.
#define ASI_TONEDETETECTOR_SET_ENABLE_EVENTS (17) ///< A value of 1 enables the tone detector event reporting.
#define ASI_TONEDETETECTOR_SET_THRESHOLD (18) ///< Returns the tone detector threshold.

typedef struct {
		DWORD dwMsgType;	///< Message type is one of the ASI_TONEDETECTOR_xxx defines above.
		union {
			DWORD dwNumberOfBands;	///< Used by ASI_TONEDETETECTOR_GET_COUNT message.
			struct {
				DWORD dwIndex;	 ///< Used by ASI_TONEDETETECTOR_GET_FREQUENCY message to query supported frequencies.
				DWORD dwFrequency;  ///< Used by ASI_TONEDETETECTOR_GET_FREQUENCY to return a frequency.
			} Freq;
			DWORD dwEnable;	///< Used by ASI_TONEDETETECTOR_GET(SET)_ENABLE message.
			DWORD dwEnableEvents;	///< Used by ASI_TONEDETETECTOR_GET(SET)_ENABLE_EVENTS message.
			int   nThreshold;	///< Used by ASI_TONEDETETECTOR_GET(SET)_THRESHOLD message.
			DWORD dwState; ///< Used by  ASI_TONEDETETECTOR_GET_STATE to return the state
		} u;
	}    ASI_MIXERCONTROLDETAILS_TONEDETECTOR,
		*PASI_MIXERCONTROLDETAILS_TONEDETECTOR,
 FAR *LPASI_MIXERCONTROLDETAILS_TONEDETECTOR;

//////////////////////////////////////////
// SilenceDetector
//////////////////////////////////////////
#define ASI_SILENCEDETETECTOR_GET_DELAY (1) 	///< Returns the detection delay setting in milliseconds .
#define ASI_SILENCEDETETECTOR_GET_ENABLE (2)    ///< Returns 1 if the silence detector is enabled.
#define ASI_SILENCEDETETECTOR_GET_ENABLE_EVENTS (3) ///< Returns 1 if the silence detector is adding events to the event queue.
#define ASI_SILENCEDETETECTOR_GET_THRESHOLD (4) ///< Returns the silence detector threshold.
#define ASI_SILENCEDETETECTOR_GET_STATE (5) ///< Returns the silence state (bit mapped).

#define ASI_SILENCEDETETECTOR_SET_ENABLE (16)    ///< A value of 1 enables the silence detector.
#define ASI_SILENCEDETETECTOR_SET_ENABLE_EVENTS (17) ///< A value of 1 enables the silence detector event reporting.
#define ASI_SILENCEDETETECTOR_SET_THRESHOLD (18) ///< Sets the silence detector threshold.
#define ASI_SILENCEDETETECTOR_SET_DELAY (19) ///< Sets the detection delay in milliseconds.

typedef struct {
		DWORD dwMsgType;	///< Message type is one of the ASI_SILENCEDETECTOR_xxx defines above.
		union {
			DWORD dwDelay;	///< Used by ASI_SILENCEDETETECTOR_GET/SET_DELAY message.
			DWORD dwEnable;	///< Used by ASI_SILENCEDETETECTOR_GET(SET)_ENABLE message.
			DWORD dwEnableEvents;	///< Used by ASI_SILENCEDETETECTOR_GET(SET)_ENABLE_EVENTS message.
			int   nThreshold;	///< Used by ASI_SILENCEDETETECTOR_GET(SET)_THRESHOLD message.
			DWORD dwState; ///< Used by  ASI_SILENCEDETETECTOR_GET_STATE to return the state
		} u;
	}    ASI_MIXERCONTROLDETAILS_SILENCEDETECTOR,
		*PASI_MIXERCONTROLDETAILS_SILENCEDETECTOR,
 FAR *LPASI_MIXERCONTROLDETAILS_SILENCEDETECTOR;
///////////////////////////////////////////////////////
// Compiler specific helper defines
///////////////////////////////////////////////////////

//////////////////////////////////////////////////////
// If Borland C++ (Builder etc.) ?
// Address differences in MIXCONTROL structure definition.
// To support compilation under Builder versions 3.0 and 4.0
// use pMixerControl->CPB_BOUNDS.lMinimum to access the
// Bounds portion of the MIXERCONTROL structure.
#ifdef __BCPLUSPLUS__
// 0x0530 indicates version 3.0
#if __BORLANDC__ > 0x0530
#define CPB_BOUNDS Bounds
#define CPB_BOUNDS1 Bounds
#else
#define CPB_BOUNDS Bounds.s
#define CPB_BOUNDS1 Bounds.s1
#endif
#endif
//////////////////////////////////////////////////////

#ifdef __cplusplus
}
#endif
#endif
