1 /*---------------------------------------------------------------------------* 2 * audioinerr.h * 3 * * 4 * Copyright 2007, 2008 Nuance Communciations, Inc. * 5 * * 6 * Licensed under the Apache License, Version 2.0 (the 'License'); * 7 * you may not use this file except in compliance with the License. * 8 * * 9 * You may obtain a copy of the License at * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, software * 13 * distributed under the License is distributed on an 'AS IS' BASIS, * 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 15 * See the License for the specific language governing permissions and * 16 * limitations under the License. * 17 * * 18 *---------------------------------------------------------------------------*/ 19 20 #ifndef _AUDIOINERRAPI_H 21 #define _AUDIOINERRAPI_H 22 23 /* -------------------------------------------------------------------------+ 24 | ScanSoft Inc. | 25 + -------------------------------------------------------------------------*/ 26 27 28 29 /* -------------------------------------------------------------------------+ 30 | Project : ScanSoft AudioIn component 31 | Module : AUDIOINERROR 32 | File name : audioinerr.h 33 | Description : Definition file for the error handling of the AUDIOIN 34 | Reference(s) : wavein, audioin.chm, audioin.doc, audioin.hlp 35 | SltGl00001_audioin_gl1.doc 36 | Status : Version 1.0 37 + -------------------------------------------------------------------------*/ 38 39 /* @doc AUDIOININTERFACE */ 40 41 42 43 44 #if defined( __cplusplus ) 45 extern "C" 46 { 47 #endif 48 49 /* -------------------------------------------------------------------------+ 50 | MACROS | 51 + -------------------------------------------------------------------------*/ 52 53 /* none */ 54 55 /* -------------------------------------------------------------------------+ 56 | TYPE DEFINITIONS | 57 + -------------------------------------------------------------------------*/ 58 59 #define TCHAR char 60 61 /* @type LHS_AUDIOIN_ERROR | LONG value for Error Code. (i386 win32 wince specific) 62 * @comm Type is declared as a LONG. 63 * @xref LHS_U32, LHS_U16, LHS_BOOL */ 64 typedef long LHS_AUDIOIN_ERROR; 65 66 /* ERROR CODES */ 67 68 /* general errors */ 69 #define LHS_AUDIOIN_OK 0 70 #define LHS_E_AUDIOIN_BASE 1000 71 /* AUDIOIN general errors */ 72 #define LHS_E_AUDIOIN_NOTIMPLEMENTED (LHS_E_AUDIOIN_BASE+0) 73 #define LHS_E_AUDIOIN_NULLPOINTER (LHS_E_AUDIOIN_BASE+1) 74 #define LHS_E_AUDIOIN_OUTOFMEMORY (LHS_E_AUDIOIN_BASE+2) 75 #define LHS_E_AUDIOIN_INVALIDARG (LHS_E_AUDIOIN_BASE+3) 76 /* AUDIOIN specific errors */ 77 #define LHS_E_AUDIOIN_INVALIDDEVICEID (LHS_E_AUDIOIN_BASE+4) 78 #define LHS_E_AUDIOIN_NOAUDIODRIVER (LHS_E_AUDIOIN_BASE+5) 79 #define LHS_E_AUDIOIN_COULDNOTOPENDEVICE (LHS_E_AUDIOIN_BASE+6) 80 #define LHS_E_AUDIOIN_BADFORMAT (LHS_E_AUDIOIN_BASE+7) 81 #define LHS_E_AUDIOIN_WRONGSTATE (LHS_E_AUDIOIN_BASE+8) 82 #define LHS_E_AUDIOIN_OVERRUN (LHS_E_AUDIOIN_BASE+9) 83 #define LHS_E_AUDIOIN_NOSAMPLES (LHS_E_AUDIOIN_BASE+10) 84 #define LHS_E_AUDIOIN_GETSETVOLUME (LHS_E_AUDIOIN_BASE+11) 85 #define LHS_E_AUDIOIN_AUDIOINOPENTIMEDOUT (LHS_E_AUDIOIN_BASE+12) 86 #define LHS_E_AUDIOIN_AUDIOINBUSY (LHS_E_AUDIOIN_BASE+13) 87 #define LHS_E_AUDIOIN_CREATEEVENTERROR (LHS_E_AUDIOIN_BASE+14) 88 #define LHS_E_AUDIOIN_CANNOTRESETAUDIODEV (LHS_E_AUDIOIN_BASE+15) 89 #define LHS_E_AUDIOIN_CANNOTCLOSEAUDIODEV (LHS_E_AUDIOIN_BASE+16) 90 #define LHS_E_AUDIOIN_CANNOTSTARTAUDIODEV (LHS_E_AUDIOIN_BASE+17) 91 #define LHS_E_AUDIOIN_CANNOTSTOPAUDIODEV (LHS_E_AUDIOIN_BASE+18) 92 93 // ******************* Error Type Definitions ********************* 94 typedef struct _AUDIOIN_ERRORINFO 95 { 96 long u32ErrorCode; 97 98 const TCHAR *szExplanation; 99 100 101 }AUDIOIN_ERRORINFO; 102 103 104 /* -------------------------------------------------------------------------+ 105 | EXTERNAL DATA (+ meaning) | 106 + -------------------------------------------------------------------------*/ 107 108 /* none */ 109 110 /* -------------------------------------------------------------------------+ 111 | GLOBAL FUNCTION PROTOTYPES | 112 + -------------------------------------------------------------------------*/ 113 114 #if ( !defined(_MSC_VER) && !defined(WINAPI) ) 115 #define WINAPI 116 #endif 117 118 /* -------------------------------------------------------------------------+ 119 | END | 120 + -------------------------------------------------------------------------*/ 121 122 123 #if defined( __cplusplus ) 124 } 125 #endif 126 127 #endif /* _AUDIOINERRAPI_H*/ 128 129