' ########################################################################################
' Microsoft Windows
' File: AudEvCod.inc
' Contents: List of Audio device error event codes and the expected params.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_audevcod_PBI)
#DEFINE PBX_audevcod_PBI
%EQUATE `AUDEVCOD_INC = 1
%EQUATE `EC_SND_DEVICE_ERROR_BASE = &H0200
' enum SNDDEV_ERR
MACRO SNDDEV_ERR_ENUM = LONG
%EQUATE `SNDDEV_ERROR_Open = 1
%EQUATE `SNDDEV_ERROR_Close = 2
%EQUATE `SNDDEV_ERROR_GetCaps = 3
%EQUATE `SNDDEV_ERROR_PrepareHeader = 4
%EQUATE `SNDDEV_ERROR_UnprepareHeader = 5
%EQUATE `SNDDEV_ERROR_Reset = 6
%EQUATE `SNDDEV_ERROR_Restart = 7
%EQUATE `SNDDEV_ERROR_GetPosition = 8
%EQUATE `SNDDEV_ERROR_Write = 9
%EQUATE `SNDDEV_ERROR_Pause = 10
%EQUATE `SNDDEV_ERROR_Stop = 11
%EQUATE `SNDDEV_ERROR_Start = 12
%EQUATE `SNDDEV_ERROR_AddBuffer = 13
%EQUATE `SNDDEV_ERROR_Query = 14
'// Sound device error event codes
'// ==============================
'//
'// All audio device error events are always passed on to the application, and are
'// never processed by the filter graph
%EQUATE `EC_SNDDEV_IN_ERROR = (%EC_SND_DEVICE_ERROR_BASE + &H00)
%EQUATE `EC_SNDDEV_OUT_ERROR = (%EC_SND_DEVICE_ERROR_BASE + &H01)
'// Parameters: ( DWORD, DWORD)
'// lParam1 is an enum SND_DEVICE_ERROR which notifies the app how the device was
'// being accessed when the failure occurred.
'//
'// lParam2 is the error returned from the sound device call.
'//
#ENDIF
