MMWMIXER.INT 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 MMWMixer;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. SysUtils,
  36. Messages,
  37. Classes,
  38. Controls,
  39. MMSystem,
  40. MMObj,
  41. MMDSPObj,
  42. MMUtils,
  43. MMString,
  44. MMRegs,
  45. MMPCMSup,
  46. MMACMSup,
  47. MMWaveIO;
  48. const
  49. MAXTRACKS = 4;
  50. type
  51. EMMWaveMixerError = class(Exception);
  52. TMMWaveMixerTracks = array[0..MAXTRACKS-1] of TMMMixerTrack;
  53. TMMMixerNotifyEvent= procedure(Sender: TObject; index: integer) of object;
  54. {-- TMMWaveMixer ------------------------------------------------------}
  55. TMMWaveMixer = class(TMMDSPComponent)
  56. public
  57. constructor Create(AOwner:TComponent); override;
  58. destructor Destroy; override;
  59. procedure Open;
  60. procedure Close;
  61. property InputDone[index: integer]: Boolean read GetInputDone write SetInputDone;
  62. property InputLoading[index: integer]: Boolean read GetInputLoading;
  63. property InputPosition[index: integer]: Longint read GetInputPosition;
  64. property Overflow: Boolean read FOverflow write FOverflow;
  65. property MixPosition: Longint read GetMixPosition;
  66. published
  67. property OnOpenPort : TMMMixerNotifyEvent read FOnOpenPort write FOnOpenPort;
  68. property OnClosePort: TMMMixerNotifyEvent read FOnClosePort write FOnClosePort;
  69. property TimeFormat: TMMTimeFormats read FTimeFormat write SetTimeFormat default tfMillisecond;
  70. property Output;
  71. property Input1: TMMDSPComponent index 0 read GetInputs write SetInputs;
  72. property Input2: TMMDSPComponent index 1 read GetInputs write SetInputs;
  73. property Input3: TMMDSPComponent index 2 read GetInputs write SetInputs;
  74. property Input4: TMMDSPComponent index 3 read GetInputs write SetInputs;
  75. property StartPos1: Longint index 0 read GetStartPos write SetStartPos;
  76. property StartPos2: Longint index 1 read GetStartPos write SetStartPos;
  77. property StartPos3: Longint index 2 read GetStartPos write SetStartPos;
  78. property StartPos4: Longint index 3 read GetStartPos write SetStartPos;
  79. property Loop1: Boolean index 0 read GetLoops write SetLoops;
  80. property Loop2: Boolean index 1 read GetLoops write SetLoops;
  81. property Loop3: Boolean index 2 read GetLoops write SetLoops;
  82. property Loop4: Boolean index 3 read GetLoops write SetLoops;
  83. property LoopCount1: integer index 0 read GetLoopCounts write SetLoopCounts;
  84. property LoopCount2: integer index 1 read GetLoopCounts write SetLoopCounts;
  85. property LoopCount3: integer index 2 read GetLoopCounts write SetLoopCounts;
  86. property LoopCount4: integer index 3 read GetLoopCounts write SetLoopCounts;
  87. property Enabled: Boolean read FEnabled write FEnabled default True;
  88. property SampleRate: Longint read FSampleRate write SetSampleRate default 11025;
  89. property MaxPlayTime: Longint read GetMaxPlayTime write SetMaxPlayTime;
  90. property Volume: Longint index 0 read FVolume write SetVolumeValues default VOLUMEBASE;
  91. property Panning: Longint index 1 read FPanning write SetVolumeValues default 0;
  92. end;
  93. implementation