Changeset 279 for CoolAudio/Systems
- Timestamp:
- Oct 4, 2011, 6:55:54 PM (13 years ago)
- Location:
- CoolAudio/Systems
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Systems/UAudioSystemMPlayer.pas
r277 r279 25 25 FPath: string; 26 26 procedure SetOutputMode(AValue: TOutputDriver); override; 27 public 27 28 function FindPath: string; 28 public29 29 constructor Create; override; 30 30 destructor Destroy; override; … … 64 64 implementation 65 65 66 function StrToFloatPoint(Value: string): Extended; 67 var 68 FPointSeparator: TFormatSettings; 69 begin 70 // Format seetings to convert a string to a float 71 FPointSeparator := DefaultFormatSettings; 72 FPointSeparator.DecimalSeparator := '.'; 73 FPointSeparator.ThousandSeparator := '#';// disable the thousand separator 74 Result := StrToFloat(Value, FPointSeparator); 75 end; 76 77 function FloatPointToStr(Value: Extended): string; 78 var 79 FPointSeparator: TFormatSettings; 80 begin 81 // Format seetings to convert a string to a float 82 FPointSeparator := DefaultFormatSettings; 83 FPointSeparator.DecimalSeparator := '.'; 84 FPointSeparator.ThousandSeparator := '#';// disable the thousand separator 85 Result := FloatToStr(Value, FPointSeparator); 86 end; 87 66 88 { TAudioSystemMPlayer } 67 89 … … 130 152 I := LastDelimiter('=', tmps); 131 153 if I > 0 then begin 132 Tmps := StringReplace(Tmps, '.', ',', [rfReplaceAll]); 133 Time := StrToFloat(Copy(tmps, I + 1, System.Length(tmps))); 154 Time := StrToFloatPoint(Copy(tmps, I + 1, System.Length(tmps))); 134 155 Result := Time * OneSecond; 135 156 end; … … 153 174 I := LastDelimiter('=', tmps); 154 175 if I > 0 then begin 155 Tmps := StringReplace(Tmps, '.', ',', [rfReplaceAll]); 156 Time := StrToFloat(Copy(tmps, I + 1, System.Length(tmps))); 176 Time := StrToFloatPoint(Copy(tmps, I + 1, System.Length(tmps))); 157 177 Result := Time * OneSecond; 158 178 end else Result := -1; … … 186 206 begin 187 207 if FPlaying and FProcess.Running then begin 188 SendCommand('set_property time_pos ' + StringReplace(FloatToStr(AValue / OneSecond), ',', '.', [rfReplaceAll]));208 SendCommand('set_property time_pos ' + FloatPointToStr(AValue / OneSecond)); 189 209 end; 190 210 end; -
CoolAudio/Systems/UAudioSystemWindows.pas
r278 r279 5 5 interface 6 6 7 {$IFDEF Windows} 7 8 uses 8 9 Classes, SysUtils, UAudioSystem, MMSystem; … … 18 19 procedure Stop; override; 19 20 end; 21 {$ENDIF} 20 22 21 23 implementation 24 25 {$IFDEF Windows} 22 26 23 27 { TPlayerWindows } … … 39 43 end; 40 44 45 {$ENDIF} 46 41 47 end. 42 48
Note:
See TracChangeset
for help on using the changeset viewer.