Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
6.3 KiB

  1. /****************************************************************************
  2. *
  3. * $Archive: S:/STURGEON/SRC/INCLUDE/VCS/audinfo.h_v $
  4. *
  5. * INTEL Corporation Prorietary Information
  6. *
  7. * This listing is supplied under the terms of a license agreement
  8. * with INTEL Corporation and may not be copied nor disclosed except
  9. * in accordance with the terms of that agreement.
  10. *
  11. * Copyright (c) 1993-1994 Intel Corporation.
  12. *
  13. * $Author: EDAVISON $
  14. *
  15. * Deliverable:
  16. *
  17. * Abstract: Header file for the Audio MSP to share information with the App.
  18. *
  19. * Notes:
  20. *
  21. ***************************************************************************/
  22. #ifndef AUDINFO_H
  23. #define AUDINFO_H
  24. #include "apierror.h"
  25. #include "h245api.h"
  26. #ifdef __cplusplus
  27. extern "C" { // Assume C declarations for C++.
  28. #endif // __cplusplus
  29. //Unique IDs for this version of MSP.
  30. // IMPORTANT : Currently the last 3 characters are case-sensitive for
  31. // string parsing purposes. It can be either Src or Snk.
  32. #define AUDIO_SRC_MSP "IntelAudioRtp1.0Src"
  33. #define AUDIO_SNK_MSP "IntelAudioRtp1.0Snk"
  34. // Externalized Registry key defaults and ranges.
  35. //
  36. #define AUDSNK_VOL_MIN 0 // Min audio volume setting.
  37. #define AUDSNK_VOL_MAX 15 // Max audio volume setting.
  38. #define AUDSNK_DEF_VOL 3 // Default audio volume setting.
  39. #define AUDSNK_VOL_FACTOR 0x10001000L // WAVE-specific volume factor.
  40. // Service Command codes
  41. #define AUDCMD_MUTE 0x00000001 // Mute this audio snk instance.
  42. #define AUDCMD_PLAY 0x00000002 // Unmute this audio snk instance.
  43. #define AUDCMD_SETVOLUME 0x00000003 // Set audio volume.
  44. #define AUDCMD_GET_CONFIG 0x00000004 // Get current configuration.
  45. #define AUDCMD_GET_FOCUS_INFO 0x00000005 // for focus notify stuff
  46. #define AUDCMD_PUSH_TO_TALK 0x00000006 // Toggle Push to Talk functionality
  47. #define AUDCMD_SETTHRESHOLD 0x00000007 // Set threshold for voice activation
  48. #define AUD_FULL_DUPLEX_MODE 1
  49. #define AUD_HALF_DUPLEX_MODE 2
  50. #define RECORDING_STATE_PLAY 1
  51. #define RECORDING_STATE_MUTED 2
  52. #define HALF_DUPLEX_NA 0
  53. #define HALF_DUPLEX_TALK 1
  54. #define HALF_DUPLEX_LISTEN 2
  55. // Voice Activation states
  56. // The valid states only apply to Half Duplex operation
  57. #define VOICEACT_DISABLED 0 // In Full Duplex mode
  58. #define VOICEACT_IDLE_TALK 1
  59. #define VOICEACT_TALK 2
  60. #define VOICEACT_LISTEN 4
  61. // State Transition notifications
  62. #define IDLE_TO_TALK 1
  63. #define IDLE_TO_LISTEN 2
  64. #define LISTEN_TO_IDLE 3
  65. #define TALK_TO_IDLE 4
  66. #define LISTEN_TO_TALK 5
  67. #define LISTEN_SILENCE 6
  68. #define LISTEN_DATA 7
  69. #define TALK_SILENCE 8
  70. #define TALK_DATA 9
  71. // Energy notifications
  72. #define RECORD_ENERGY 10
  73. #define PLAYBACK_ENERGY 11
  74. #define MILLISEC_IN_ONE_SECOND 1000
  75. #define SILENCE_DELTA_SECONDS 1
  76. #define SILENCE_PACKETS_TO_SEND 2
  77. #define G723_THRESHOLD 0
  78. // Registry Keys
  79. #define kMaxPortsPerMspInst "MaxPortsPerMspInst"
  80. #define kCodecType "CodecType"
  81. #define kNumWaveHeaders "NumWaveHeaders"
  82. #define kNumSrcWaveBufs "NumSrcWaveBufs"
  83. #define kFramesPerPkt "FramesPerPkt"
  84. #define kDefaultVolume "DefaultVolume"
  85. #define kMinVolume "MinVolume"
  86. #define kMaxVolume "MaxVolume"
  87. #define kPlaybackPacketSize "PlaybackPacketSize"
  88. #define kInitPlaybackBufferPool "InitPlaybackBufferPool"
  89. #define kLatencyFrameCount "LatencyFrameCount"
  90. #define kMaxFramesPerPlayback "MaxFramesPerPlayback"
  91. #define kCapturePacketSize "CapturePacketSize"
  92. #define kG723Use63DataRate "G723Use63DataRate"
  93. #define kG723UsePostfilter "G723UsePostfilter"
  94. #define kG723UseSilenceDetect "G723UseSilenceDetect"
  95. #define kSilenceDeltaSeconds "SilenceDeltaSeconds"
  96. #define kSilencePacketsToSend "SilencePacketsToSend"
  97. #define kLHDataRate "LHDataRate"
  98. #define kG723Threshold "G723Threshold"
  99. //------------------------------------------------------------------------------
  100. // Audio MSP Error codes
  101. // Other common error codes are defined in <winerror.h> and "apierror.h"
  102. //------------------------------------------------------------------------------
  103. #define FIRST_EAUD_ID ERROR_LOCAL_BASE_ID
  104. #define EAUD_MSP_TYPE FIRST_EAUD_ID + 0
  105. #define EAUD_WAVE_INSTANCE FIRST_EAUD_ID + 1
  106. #define EAUD_MSP_CTRL_HND FIRST_EAUD_ID + 2
  107. #define EAUD_FREE_MEM FIRST_EAUD_ID + 3
  108. #define EAUD_MSP_CALL_ORDER FIRST_EAUD_ID + 4
  109. #define EAUD_VOL_NOT_SUPPORTED FIRST_EAUD_ID + 5
  110. #define EAUD_GET_VOL FIRST_EAUD_ID + 6
  111. #define EAUD_SET_VOL FIRST_EAUD_ID + 7
  112. #define EAUD_WAV_OPEN FIRST_EAUD_ID + 8
  113. #define EAUD_WAV_CLOSE FIRST_EAUD_ID + 9
  114. #define EAUD_WAV_START FIRST_EAUD_ID + 12
  115. #define EAUD_WAV_STOP FIRST_EAUD_ID + 13
  116. #define EAUD_WAV_RESET FIRST_EAUD_ID + 14
  117. #define EAUD_WAV_OPEN_NODRIVER FIRST_EAUD_ID + 15
  118. #define EAUD_WAV_OPEN_INUSE FIRST_EAUD_ID + 16
  119. #define EAUD_WAV_CLOSE_INUSE FIRST_EAUD_ID + 17
  120. #define EAUD_NO_DEVICES FIRST_EAUD_ID + 18
  121. #define EAUD_BUFSSTUCKINWINDRV FIRST_EAUD_ID + 19
  122. #define EAUD_BUFSSTUCKINMSM FIRST_EAUD_ID + 20
  123. #define EAUD_WAVEINADDBUFFER FIRST_EAUD_ID + 21
  124. #define EAUD_COM_INIT FIRST_EAUD_ID + 22
  125. #define EAUD_PPM_INIT FIRST_EAUD_ID + 23
  126. #define EAUD_PPM_COOKIE FIRST_EAUD_ID + 24
  127. #define EAUD_AUDIO_SRC_INIT FIRST_EAUD_ID + 25
  128. #define EAUD_AUDIO_SNK_INIT FIRST_EAUD_ID + 26
  129. #define EAUD_INTERNAL FIRST_EAUD_ID + 27
  130. // Audio MSP Open Service structure
  131. // To be passed in lParamIn by MSM in the MSP_OpenService call
  132. typedef struct _AUDMSPOPENSERVICE
  133. {
  134. BOOL bForceHalfDuplex; // should we override full duplex operation?
  135. }
  136. AUDMSPOPENSERVICE, *LPAUDMSPOPENSERVICE;
  137. // Audio MSP Open Port structure
  138. // To be passed in lParamIn by MSM in the MSP_OpenPort call
  139. typedef struct _AUDMSPOPENPORT
  140. {
  141. H245_TOTCAP_T *pH245TotCapT;
  142. BYTE RTPPayloadType;
  143. }
  144. AUDMSPOPENPORT, *LPAUDMSPOPENPORT;
  145. // Audio MSP Service Command structure
  146. // The command will be specified in wParam in MSP_ServiceCmdProc
  147. // Structure that will be passed in lParamIn
  148. typedef struct _AUDMSPSERVICECMD
  149. {
  150. UINT DuplexMode; // Full or Half Duplex
  151. UINT Volume; // Volume setting
  152. UINT PlayMode; // Play or Mute
  153. UINT Direction; // Talk or Listen
  154. UINT CodecType; // G.723 etc.
  155. UINT Threshold; // Voice Activation threshold
  156. }
  157. AUDMSPSERVICECMD, *LPAUDMSPSERVICECMD;
  158. typedef struct _AUDMSPFOCUSINFO
  159. {
  160. UINT PortCount;
  161. VOID * pPortCtrl;
  162. }
  163. AUDMSPFOCUSINFO, *LPAUDMSPFOCUSINFO;
  164. #ifdef __cplusplus
  165. } // End of extern "C" {
  166. #endif // __cplusplus
  167. #endif // AUDINFO_H