Ignore:
Timestamp:
Mar 26, 2024, 11:37:40 PM (7 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from CoolAudio unit names.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • CoolAudio/Systems/AudioSystem.pas

    r568 r569  
    1 unit UAudioSystem;
    2 
    3 {$mode delphi}{$H+}
     1unit AudioSystem;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Contnrs;
     6  Classes, SysUtils, Generics.Collections;
    97
    108type
     
    118116  TAudioSystemManager = class(TComponent)
    119117  public
    120     Systems: TObjectList; // TListObject<TAudioSystem>
     118    Systems: TObjectList<TAudioSystemManagerItem>;
    121119    procedure Register(Name: string; SystemClass: TAudioSystemClass);
    122120    procedure FillStringList(StringList: TStrings);
     
    298296  StringList.Clear;
    299297  for I := 0 to Systems.Count - 1 do
    300   with TAudioSystemManagerItem(Systems[I]) do
     298  with Systems[I] do
    301299    StringList.AddObject(Name, Systems[I]);
    302300end;
     
    309307  I := 0;
    310308  while (I < Systems.Count) and
    311     ((TAudioSystemManagerItem(Systems[I]).Name <> Name) or
    312     (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]
    314312    else Result := nil;
    315313end;
     
    330328begin
    331329  inherited;
    332   Systems := TObjectList.Create;
     330  Systems := TObjectList<TAudioSystemManagerItem>.Create;
    333331end;
    334332
    335333destructor TAudioSystemManager.Destroy;
    336334begin
    337   Systems.Free;
    338   inherited Destroy;
     335  FreeAndNil(Systems);
     336  inherited;
    339337end;
    340338
     
    424422  Stop;
    425423  Active := False;
    426   inherited Destroy;
     424  inherited;
    427425end;
    428426
     
    448446destructor TAudioSystem.Destroy;
    449447begin
    450   inherited Destroy;
     448  inherited;
    451449end;
    452450
Note: See TracChangeset for help on using the changeset viewer.