You've already forked lazarus-ccr
Adds a release mode for the CactusJukebox without so much debug info
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2079 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -21,8 +21,59 @@
|
||||
<BuildNr Value="746"/>
|
||||
<StringTable ProductVersion="0.3.5.737"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="10"/>
|
||||
<Target>
|
||||
<Filename Value="../cactus_jukebox"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="fmodintf;tagreader;plugin/sdk;plugin/impl"/>
|
||||
<UnitOutputDirectory Value="../source/obj"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
<AllowLabel Value="False"/>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsAuto"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<Verbosity>
|
||||
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
|
||||
</Verbosity>
|
||||
<WriteFPCLogo Value="False"/>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
@ -41,9 +41,13 @@ begin
|
||||
Application.Title:='cactus';
|
||||
{$ifdef CactusDebug}
|
||||
CVerbosityLevel:=9;
|
||||
{$else}
|
||||
{$ifdef Windows}
|
||||
CVerbosityLevel:=0;
|
||||
{$else}
|
||||
CVerbosityLevel:=1;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
DebugOutLn('', 1);
|
||||
|
||||
|
@ -977,7 +977,7 @@ var
|
||||
tmppos: integer;
|
||||
fileobj: TMediaFileClass;
|
||||
begin
|
||||
DebugOutLn('[TMain.playtimerTimer] START', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] START', 3);
|
||||
try
|
||||
// if PlayerObj.playing=false then stopClick(nil);
|
||||
if PlayerObj.PlaybackMode = STREAMING_MODE then
|
||||
@ -1001,18 +1001,18 @@ begin
|
||||
playwin.TimeImg.Canvas.Font.Color := ClNavy;
|
||||
playwin.TimeImg.Canvas.TextOut(5, 3, pnlPlaytime.Caption);
|
||||
|
||||
DebugOutLn('[TMain.playtimerTimer] B', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] B', 3);
|
||||
|
||||
DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 1);
|
||||
DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 3);
|
||||
tmppos := PlayerObj.Get_FilePosition;
|
||||
trackbar.position := tmppos;
|
||||
x2 := (trackbar.position * 2) - 3;
|
||||
if x2 < 3 then
|
||||
x2 := 3;
|
||||
DebugOutLn('[TMain.playtimerTimer] D', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] D', 3);
|
||||
if (tmppos = 100) then
|
||||
begin
|
||||
DebugOutLn('[TMain.playtimerTimer] E', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] E', 3);
|
||||
// writeln('nexttrack');
|
||||
// WriteLn(PlayerObj.CurrentTrack);
|
||||
if (PlayerObj.CurrentTrack < PlayerObj.Playlist.ItemCount) then
|
||||
@ -1022,7 +1022,7 @@ begin
|
||||
end;
|
||||
if CactusConfig.CoverDownload and (CoverFound = False) and (LoopCount < 20) then
|
||||
begin
|
||||
DebugOutLn('[TMain.playtimerTimer] F', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] F', 3);
|
||||
Inc(LoopCount);
|
||||
if (assigned(LastFMAPI)) and (LastFMAPI.data_ready) then
|
||||
begin
|
||||
@ -1042,17 +1042,17 @@ begin
|
||||
end
|
||||
else if (LoopCount >= 20) and (CoverFound = False) then
|
||||
CoverImage.Picture.Clear;
|
||||
DebugOutLn('[TMain.playtimerTimer] G', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] G', 3);
|
||||
end
|
||||
else
|
||||
begin
|
||||
DebugOutLn('[TMain.playtimerTimer] H', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] H', 3);
|
||||
{playtimer.Enabled:=false};
|
||||
end;
|
||||
except
|
||||
DebugOutLn('CAUGHT EXCEPTION IN PLAYTIMER!!!!', 1);
|
||||
end;
|
||||
DebugOutLn('[TMain.playtimerTimer] END', 1);
|
||||
DebugOutLn('[TMain.playtimerTimer] END', 3);
|
||||
end;
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@ -95,14 +95,17 @@ const MPLAYER_BINARY='mplayer.exe';
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
procedure TMPlayerClass.SendCommand(cmd: string);
|
||||
begin
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 1);
|
||||
cmd:=cmd+#13#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 3);
|
||||
cmd:=cmd+#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux
|
||||
try
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] 2', 1);
|
||||
if GetMPlayerPlaying then MPlayerProcess.Input.write(cmd[1], length(cmd));
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] 3', 1);
|
||||
if GetMPlayerPlaying then
|
||||
begin
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] 2', 3);
|
||||
MPlayerProcess.Input.write(cmd[1], length(cmd));
|
||||
end;
|
||||
DebugOutLn('[TMPlayerClass.sendcommand] 3', 3);
|
||||
except
|
||||
DebugOutLn('EXCEPTION sending command to mplayer', 1);
|
||||
DebugOutLn('EXCEPTION sending command to mplayer', 3);
|
||||
end;
|
||||
end;
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
@ -180,7 +183,7 @@ function TMPlayerClass.play(index: integer): byte;
|
||||
var
|
||||
MPOptions: String;
|
||||
begin
|
||||
DebugOutLn('[TMPlayerClass.play]', 1);
|
||||
DebugOutLn('[TMPlayerClass.play]', 3);
|
||||
if (index<Playlist.ItemCount) and (index>=0) then
|
||||
begin
|
||||
if (FileExists(playlist.items[index].path)) then
|
||||
@ -214,7 +217,7 @@ begin
|
||||
|
||||
if MPlayerProcess.Running then
|
||||
begin
|
||||
DebugOutLn('MPlayerProcess is Running', 1);
|
||||
DebugOutLn('MPlayerProcess is Running', 3);
|
||||
FCurrentTrack:=index;
|
||||
FPlaying:=true;
|
||||
Playlist.Items[index].Played:=true;
|
||||
@ -385,17 +388,17 @@ var
|
||||
tmps: string;
|
||||
i:integer;
|
||||
begin
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 1);
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 3);
|
||||
if GetMPlayerPlaying then
|
||||
begin
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 1);
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 3);
|
||||
i:=0;
|
||||
repeat
|
||||
SendCommand('get_property percent_pos');
|
||||
sleep(8);
|
||||
tmps:=GetProcessOutput;
|
||||
inc(i);
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] ' + tmps, 1);
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] ' + tmps, 3);
|
||||
until (pos('percent_pos', tmps)>0) or (i>=5);
|
||||
|
||||
// writeln('getpos');
|
||||
@ -412,7 +415,7 @@ begin
|
||||
result:=-1;
|
||||
|
||||
if (result=-1) and (FLastGet_Pos>0) then Result:=100;
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 1);
|
||||
DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 3);
|
||||
end;
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
function TMPlayerClass.get_FileLength: longint;
|
||||
|
Reference in New Issue
Block a user