Changeset 276 for CoolAudio/Systems/UAudioSystem.pas
- Timestamp:
- Oct 4, 2011, 1:18:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Systems/UAudioSystem.pas
r275 r276 15 15 { TAudioSystem } 16 16 17 TAudioSystem = class 17 TAudioSystem = class(TComponent) 18 18 protected 19 19 FOutputDriver: TOutputDriver; … … 27 27 { TPlayer } 28 28 29 TPlayer = class 29 TPlayer = class(TComponent) 30 30 private 31 31 protected 32 FFileName: string; 33 FAudioSystem: TAudioSystem; 32 34 FPlaying: Boolean; 33 35 function GetMuted: Boolean; virtual; abstract; … … 38 40 procedure SetPosition(AValue: TDateTime); virtual; abstract; 39 41 procedure SetVolume(AValue: Real); virtual; abstract; 42 procedure SetFileName(AValue: string); virtual; 40 43 public 41 44 procedure Play; virtual; abstract; … … 46 49 property Volume: Real read GetVolume write SetVolume; // 0..1 47 50 property Muted: Boolean read GetMuted write SetMuted; 51 property AudioSystem: TAudioSystem read FAudioSystem write FAudioSystem; 52 property FileName: string read FFileName write SetFileName; 48 53 constructor Create; virtual; 49 54 end; … … 56 61 57 62 { TPlayer } 63 64 procedure TPlayer.SetFileName(AValue: string); 65 begin 66 if AValue = FFileName then Exit; 67 FFileName := AValue; 68 end; 58 69 59 70 constructor TPlayer.Create; … … 72 83 constructor TAudioSystem.Create; 73 84 begin 74 85 {$IFDEF Windows} 86 FOutputDriver := omWin32; 87 {$ENDIF} 88 {$IFDEF Linux} 89 FOutputDriver := omAlsa; 90 {$ENDIF} 75 91 end; 76 92
Note:
See TracChangeset
for help on using the changeset viewer.