- Timestamp:
- Apr 20, 2012, 12:14:51 PM (13 years ago)
- Location:
- CoolAudio
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Systems/UAudioSystem.pas
r284 r347 1 1 unit UAudioSystem; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface … … 20 20 procedure SetOutputMode(AValue: TOutputDriver); virtual; 21 21 public 22 constructor Create ; virtual;22 constructor Create(AOwner: TComponent); override; 23 23 destructor Destroy; override; 24 24 property OutputMode: TOutputDriver read FOutputDriver write SetOutputMode; … … 60 60 property Playing: Boolean read FPlaying write SetPlaying; 61 61 property Active: Boolean read FActive write SetActive; 62 constructor Create ; virtual;62 constructor Create(AOwner: TComponent); override; 63 63 destructor Destroy; override; 64 64 end; … … 76 76 { TAudioSystemManager } 77 77 78 TAudioSystemManager = class 78 TAudioSystemManager = class(TComponent) 79 79 Systems: TObjectList; // TListObject<TAudioSystem> 80 80 procedure Register(Name: string; SystemClass: TAudioSystemClass; 81 81 PlayerClass: TPlayerClass); 82 82 procedure FillStringList(StringList: TStrings); 83 constructor Create; 83 function SearchByName(Name: string): TAudioSystemManagerItem; 84 constructor Create(AOwner: TComponent); override; 84 85 destructor Destroy; override; 85 86 end; … … 104 105 with TAudioSystemManagerItem(Systems[I]) do 105 106 StringList.AddObject(Name, Systems[I]); 107 end; 108 109 function TAudioSystemManager.SearchByName(Name: string): TAudioSystemManagerItem; 110 var 111 I: Integer; 112 begin 113 I := 0; 114 while (I < Systems.Count) and (TAudioSystemManagerItem(Systems[I]).Name <> Name) do Inc(I); 115 if I < Systems.Count then Result := TAudioSystemManagerItem(Systems[I]) 116 else Result := nil; 106 117 end; 107 118 … … 118 129 end; 119 130 120 constructor TAudioSystemManager.Create; 121 begin 131 constructor TAudioSystemManager.Create(AOwner: TComponent); 132 begin 133 inherited; 122 134 Systems := TObjectList.Create; 123 135 end; … … 205 217 end; 206 218 207 constructor TPlayer.Create; 208 begin 219 constructor TPlayer.Create(AOwner: TComponent); 220 begin 221 inherited; 209 222 end; 210 223 … … 223 236 end; 224 237 225 constructor TAudioSystem.Create; 226 begin 238 constructor TAudioSystem.Create(AOwner: TComponent); 239 begin 240 inherited; 227 241 {$IFDEF Windows} 228 242 FOutputDriver := omWin32; -
CoolAudio/Systems/UAudioSystemFMOD.pas
r276 r347 16 16 procedure SetOutputMode(AValue: TOutputDriver); override; 17 17 public 18 constructor Create ; override;18 constructor Create(AOwner: TComponent); override; 19 19 destructor Destroy; override; 20 20 end; … … 56 56 end; 57 57 58 constructor TAudioSystemFMOD.Create ;58 constructor TAudioSystemFMOD.Create(AOwner: TComponent); 59 59 begin 60 inherited Create;60 inherited; 61 61 fmod_load(''); 62 62 OutputMode := omALSA; -
CoolAudio/Systems/UAudioSystemMPlayer.pas
r284 r347 27 27 public 28 28 function FindPath: string; 29 constructor Create ; override;29 constructor Create(AOwner: TComponent); override; 30 30 destructor Destroy; override; 31 31 property Path: string read FPath write FPath; … … 52 52 procedure Pause; override; 53 53 procedure Stop; override; 54 constructor Create ; override;54 constructor Create(AOwner: TComponent); override; 55 55 destructor Destroy; override; 56 56 end; … … 115 115 end; 116 116 117 constructor TAudioSystemMPlayer.Create ;118 begin 119 inherited Create;117 constructor TAudioSystemMPlayer.Create(AOwner: TComponent); 118 begin 119 inherited; 120 120 FPath := FindPath; 121 121 end; … … 290 290 end; 291 291 292 constructor TPlayerMPlayer.Create ;293 begin 294 inherited Create;292 constructor TPlayerMPlayer.Create(AOwner: TComponent); 293 begin 294 inherited; 295 295 FProcess := TProcess.Create(nil); 296 296 end; -
CoolAudio/Systems/UAudioSystemWindows.pas
r285 r347 46 46 procedure Pause; override; 47 47 procedure Stop; override; 48 constructor Create ; override;48 constructor Create(AOwner: TComponent); override; 49 49 destructor Destroy; override; 50 50 property DeviceType: TMPDeviceTypes read FDeviceType write SetDeviceType; … … 202 202 end; 203 203 204 constructor TPlayerWindows.Create ;205 begin 206 inherited Create;204 constructor TPlayerWindows.Create(AOwner: TComponent); 205 begin 206 inherited; 207 207 end; 208 208 -
CoolAudio/UCoolAudio.pas
r279 r347 31 31 initialization 32 32 33 AudioSystemManager := TAudioSystemManager.Create ;33 AudioSystemManager := TAudioSystemManager.Create(nil); 34 34 {$IFDEF AudioSystemWindows} 35 35 AudioSystemManager.Register('Windows', TAudioSystemWindows, TPlayerWindows); -
CoolAudio/UPlaylist.pas
r275 r347 1 1 unit UPlaylist; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface … … 15 15 { TPlaylist } 16 16 17 TPlaylist = class 17 TPlaylist = class(TComponent) 18 18 Items: TObjectList; // TObjectList<TPlaylistItem> 19 constructor Create ;19 constructor Create(AOwner: TComponent); 20 20 destructor Destroy; override; 21 21 end; … … 26 26 { TPlaylist } 27 27 28 constructor TPlaylist.Create ;28 constructor TPlaylist.Create(AOwner: TComponent); 29 29 begin 30 inherited; 30 31 Items := TObjectList.Create; 31 32 end;
Note:
See TracChangeset
for help on using the changeset viewer.