MMACMSUP.INT 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMACMSup;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. SysUtils,
  36. Classes,
  37. Forms,
  38. MMSystem,
  39. MMUtils,
  40. MMRegs,
  41. MMACM;
  42. type
  43. PACMStream = ^TACMStream;
  44. TACMStream = record
  45. lpSrcBuffer : PChar;
  46. lpDstBuffer : PChar;
  47. dwSrcBufferSize: Longint;
  48. dwDstBufferSize: Longint;
  49. dwRemaining : Longint;
  50. acmStream : THACMSTREAM;
  51. acmStreamHeader: TACMStreamHeader;
  52. end;
  53. PACMConvert = ^TACMConvert;
  54. TACMConvert = record
  55. lpSrcBuffer : PChar;
  56. lpDstBuffer : PChar;
  57. dwSrcBufferSize : Longint;
  58. dwDstBufferSize : Longint;
  59. dwBytesConverted : Longint;
  60. dwBytesRead : Longint;
  61. bPending : Boolean;
  62. bFreeSrcBuffer : Boolean;
  63. Streams : TList;
  64. end;
  65. { a set of low level conversion routines to convert WaveFormat's }
  66. function acmMustConvert(pwfxSrc,pwfxDst: PWaveFormatEx): Boolean;
  67. function acmQueryConvert(pwfxSrc,pwfxDst: PWaveFormatEx; RealTime: Boolean): Boolean;
  68. function acmSuggestPCMFormat(pwfxSrc: PWaveFormatEx): TWaveFormatEx;
  69. function acmSizeOutputData(pwfxSrc,pwfxDst: PWaveFormatEx; SrcBufSize: Longint): Longint;
  70. function acmBeginConvert(pwfxSrc,pwfxDst: PWaveFormatEx;
  71. SrcBuffer: PChar; SrcBufSize: Longint; RealTime: Boolean): PACMConvert;
  72. function acmDoConvert(pConvert: PACMConvert; SrcBufSize: Longint): Longint;
  73. function acmEndConvert(pConvert: PACMConvert; SrcBufSize: Longint): Longint;
  74. procedure acmDoneConvert(var pConvert: PACMConvert);
  75. implementation