Changeset 569 for CoolAudio/Systems/AudioSystem.pas
- Timestamp:
- Mar 26, 2024, 11:37:40 PM (7 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Systems/AudioSystem.pas
r568 r569 1 unit UAudioSystem; 2 3 {$mode delphi}{$H+} 1 unit AudioSystem; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Contnrs;6 Classes, SysUtils, Generics.Collections; 9 7 10 8 type … … 118 116 TAudioSystemManager = class(TComponent) 119 117 public 120 Systems: TObjectList ; // TListObject<TAudioSystem>118 Systems: TObjectList<TAudioSystemManagerItem>; 121 119 procedure Register(Name: string; SystemClass: TAudioSystemClass); 122 120 procedure FillStringList(StringList: TStrings); … … 298 296 StringList.Clear; 299 297 for I := 0 to Systems.Count - 1 do 300 with TAudioSystemManagerItem(Systems[I])do298 with Systems[I] do 301 299 StringList.AddObject(Name, Systems[I]); 302 300 end; … … 309 307 I := 0; 310 308 while (I < Systems.Count) and 311 (( TAudioSystemManagerItem(Systems[I]).Name <> Name) or312 (not TAudioSystemManagerItem(Systems[I]).Supported and SupportedOnly)) do Inc(I);313 if I < Systems.Count then Result := TAudioSystemManagerItem(Systems[I])309 ((Systems[I].Name <> Name) or 310 (not Systems[I].Supported and SupportedOnly)) do Inc(I); 311 if I < Systems.Count then Result := Systems[I] 314 312 else Result := nil; 315 313 end; … … 330 328 begin 331 329 inherited; 332 Systems := TObjectList .Create;330 Systems := TObjectList<TAudioSystemManagerItem>.Create; 333 331 end; 334 332 335 333 destructor TAudioSystemManager.Destroy; 336 334 begin 337 Systems.Free;338 inherited Destroy;335 FreeAndNil(Systems); 336 inherited; 339 337 end; 340 338 … … 424 422 Stop; 425 423 Active := False; 426 inherited Destroy;424 inherited; 427 425 end; 428 426 … … 448 446 destructor TAudioSystem.Destroy; 449 447 begin 450 inherited Destroy;448 inherited; 451 449 end; 452 450
Note:
See TracChangeset
for help on using the changeset viewer.