Leaked source code of windows server 2003
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.

93 lines
3.9 KiB

  1. // Copyright (c) 1995 - 1998 Microsoft Corporation. All Rights Reserved.
  2. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3. // Mediamatics Audio Decoder Interface Specification
  4. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5. #ifndef _MM_AUDIODEC_H_
  6. #define _MM_AUDIODEC_H_
  7. #ifdef __cplusplus
  8. extern "C" { /* Assume C declarations for C++ */
  9. #endif /* __cplusplus */
  10. // Control parameter values
  11. #define DECODE_MONO 0x00000001L // redundant, unused.
  12. #define DECODE_STEREO 0x00000002L // 1=allow stereo, 0=force mono.
  13. #define DECODE_LEFT_ONLY 0x00000010L // decode left ch only, feed to both outputs
  14. #define DECODE_RIGHT_ONLY 0x00000020L // decode right ch only, feed to both outputs
  15. #define DECODE_QUARTER 0x00000800L // quarter bw: 8 sub-bands
  16. #define DECODE_HALF 0x00001000L // half bw: 16 sub-bands
  17. #define DECODE_FULL 0x00002000L // full bw: 32 sub-bands
  18. #define DECODE_HALF_HIQ 0x00004000L // half bw, hi quality
  19. #define DECODE_HALF_FULLQ 0x00008000L // half bw, full quality
  20. #define DECODE_16BIT 0x00010000L // 1=16bit output, 0=8-bit output.
  21. #define DECODE_8BIT 0x00020000L // redundant, unused.
  22. #define DECODE_QSOUND 0x00040000L // enable qsound (no longer used)
  23. #define DECODE_INT 0x00080000L // enable integer-only mode.
  24. #define DECODE_MMX 0x00100000L // enable mmx mode (has to in int mode as well).
  25. #define DECODE_AC3 0x10000000L // Open for AC-3 Decode.
  26. #define DECODE_PRO_LOGIC 0x20000000L // Output in ProLogic for AC-3
  27. #define DECODE_MIX_LFE 0x40000000L
  28. #define DECODE_QUART_INT DECODE_INT // ## MSMM MERGE CHANGE ##
  29. // Function return values
  30. #define DECODE_SUCCESS 0x0000L
  31. #define DECODE_ERR_MEMORY 0x0001L
  32. #define DECODE_ERR_DATA 0x0002L
  33. #define DECODE_ERR_PARM 0x0003L
  34. #define DECODE_ERR_VLDERROR 0x0004L
  35. #define DECODE_ERR_SEVEREVLD 0x0005L
  36. #define DECODE_ERR_MEMALLOC DECODE_ERR_MEMORY
  37. #define DECODE_ERR_TABLE 0x0081L
  38. #define DECODE_ERR_PICKTABLE 0x0082L
  39. #define DECODE_ERR_NOSYNC 0x0083L
  40. #define DECODE_ERR_LAYER 0x0084L
  41. #define DECODE_ERR_EMPH 0x0085L // non-fatal error.
  42. #define DECODE_ERR_CRC 0x0086L
  43. #define DECODE_ERR_BADSTATE 0x0087L
  44. #define DECODE_ERR_NBANDS 0x0088L
  45. #define DECODE_ERR_BADHDR 0x0089L
  46. #define DECODE_ERR_INBUFOV 0x008AL
  47. #define DECODE_ERR_NOTENOUGHDATA 0x008BL
  48. #define ERROR_BAD_DLL 0x1000L // A Dll had some problem loading/linking
  49. typedef struct tagAudioDecStruct {
  50. DWORD dwCtrl ; // Control parameter
  51. DWORD dwNumFrames ; // Number of Audio frames to decode
  52. DWORD dwOutBuffSize ; // Size of each buffer in bytes
  53. DWORD dwOutBuffUsed ; // Number of bytes used in each buffer
  54. // filled in by Decoder
  55. void * pOutBuffer; // Actual pointer to the buffer
  56. void * pCmprHead ; // Pointer to the Compressed Bit Buffer
  57. // Head
  58. void * pCmprRead ; // Pointer to the Compressed Bit Read
  59. // position
  60. void * pCmprWrite ; // Pointer to the Compressed Bit Write
  61. // position
  62. DWORD dwMpegError ;
  63. DWORD dwNumOutputChannels; // input to decoder
  64. DWORD dwFrameSize ; // output from decoder
  65. DWORD dwBitRate ; // output from decoder
  66. DWORD dwSampleRate ; // output from decoder
  67. DWORD dwNumInputChannels ; // output from decoder
  68. } stAudioDecode, * PAUDIODECODE, FAR * LPAUDIODECODE ;
  69. typedef DWORD_PTR HADEC;
  70. #ifdef STD_BACKAPI
  71. #define BACKAPI APIENTRY
  72. #else
  73. #define BACKAPI
  74. #endif
  75. BOOL BACKAPI CanDoAC3(void);
  76. HADEC BACKAPI OpenAudio(DWORD ctrl);
  77. DWORD BACKAPI CloseAudio(HADEC hDevice);
  78. DWORD BACKAPI ResetAudio(HADEC hDevice, DWORD ctrl);
  79. DWORD BACKAPI DecodeAudioFrame(HADEC hDevice, PAUDIODECODE lpAudioCtrlStruct);
  80. #ifdef __cplusplus
  81. } /* End of extern "C" { */
  82. #endif /* __cplusplus */
  83. #endif // _MM_AUDIODEC_H_