You've already forked lazarus-ccr
Hopefully this is the end of spurious writeln's
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2121 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -6,8 +6,8 @@ Unit addradio;
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
Buttons, EditBtn, streamcol, mainform;
|
Buttons, EditBtn, streamcol, mainform, debug;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ Begin
|
|||||||
If FAdvanced Then
|
If FAdvanced Then
|
||||||
Begin
|
Begin
|
||||||
i := StreamCollection.add(StreamUrlEdit.Text, StationNameEdit.Text);
|
i := StreamCollection.add(StreamUrlEdit.Text, StationNameEdit.Text);
|
||||||
writeln(StreamUrlEdit.Text);
|
DebugOutLn(StreamUrlEdit.Text, 0);
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<MinorVersionNr Value="3"/>
|
<MinorVersionNr Value="3"/>
|
||||||
<RevisionNr Value="5"/>
|
<RevisionNr Value="5"/>
|
||||||
<BuildNr Value="754"/>
|
<BuildNr Value="755"/>
|
||||||
<StringTable ProductVersion="0.3.5.737"/>
|
<StringTable ProductVersion="0.3.5.737"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="3">
|
<BuildModes Count="3">
|
||||||
|
@ -302,7 +302,7 @@ procedure TCddbObject.Parsedata;
|
|||||||
title[i]:=Latin1toUTF8(title[i]);
|
title[i]:=Latin1toUTF8(title[i]);
|
||||||
delete(s, 1, pos(#10, s));
|
delete(s, 1, pos(#10, s));
|
||||||
if i>8 then
|
if i>8 then
|
||||||
writeln('title ---> ',title[i]);
|
DebugOutLn('title ---> '+title[i], 0);
|
||||||
// deleted:=true;
|
// deleted:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -371,10 +371,10 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
DebugOutLn(Format('%d CD-ROM drives autodetected', [DriveCount]), 0);
|
DebugOutLn(Format('%d CD-ROM drives autodetected', [DriveCount]), 0);
|
||||||
For b:=1 to DriveCount do
|
For b:=1 to DriveCount do
|
||||||
Writeln('Drive ',b,' on device: ',CDRomDrives[b]);
|
DebugOutLn(Format('Drive %d on device: %s',[b, CDRomDrives[b]]), 0);
|
||||||
Except
|
Except
|
||||||
On E : exception do
|
On E : exception do
|
||||||
Writeln(E.ClassName,' exception caught with message: ',E.Message);
|
DebugOutLn('[TCddbObject.create] exception caught with message: '+E.Message, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if DriveCount=0 then
|
if DriveCount=0 then
|
||||||
|
@ -5,9 +5,10 @@ Unit cdrip;
|
|||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||||
StdCtrls, Buttons, ExtCtrls, cddb, dos, Grids, DBCtrls, process;
|
StdCtrls, Buttons, ExtCtrls, cddb, dos, Grids, DBCtrls, process,
|
||||||
|
debug;
|
||||||
|
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
@ -132,7 +133,7 @@ Begin
|
|||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
Exec('eject.exe',CDDBcon.CDromDrives[drivebox.ItemIndex+1]);
|
Exec('eject.exe',CDDBcon.CDromDrives[drivebox.ItemIndex+1]);
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
writeln('ATTENTION!! DIRTY! ejecting cdrom drive... ');
|
DebugOutLn('ATTENTION!! DIRTY! ejecting cdrom drive... ',0);
|
||||||
Trackgrid.Clean([gzNormal, gzFixedCols]);
|
Trackgrid.Clean([gzNormal, gzFixedCols]);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -312,12 +313,7 @@ Begin
|
|||||||
Trackgrid.Clean([gzNormal, gzFixedCols]);
|
Trackgrid.Clean([gzNormal, gzFixedCols]);
|
||||||
Trackgrid.RowCount := 1;
|
Trackgrid.RowCount := 1;
|
||||||
Trackgrid.ColWidths[0] := 20;
|
Trackgrid.ColWidths[0] := 20;
|
||||||
For i:= 1 To length(CDDBcon.album) Do
|
|
||||||
Begin
|
|
||||||
write(byte(CDDBcon.album[i]));
|
|
||||||
write('-');
|
|
||||||
End;
|
|
||||||
writeln;
|
|
||||||
For b:= 1 To CDDBcon.NrTracks Do
|
For b:= 1 To CDDBcon.NrTracks Do
|
||||||
Begin
|
Begin
|
||||||
str(b, tmps);
|
str(b, tmps);
|
||||||
@ -380,13 +376,13 @@ Begin
|
|||||||
OutFileNames[EncodeTrack] := IncludeTrailingPathDelimiter(outfolder)+OutFileNames[EncodeTrack];
|
OutFileNames[EncodeTrack] := IncludeTrailingPathDelimiter(outfolder)+OutFileNames[EncodeTrack];
|
||||||
OutFileNames[EncodeTrack] := StringReplace(OutFileNames[EncodeTrack], #39, '', [
|
OutFileNames[EncodeTrack] := StringReplace(OutFileNames[EncodeTrack], #39, '', [
|
||||||
rfReplaceAll]);
|
rfReplaceAll]);
|
||||||
writeln(OutFileNames[EncodeTrack]);
|
DebugOutLn(OutFileNames[EncodeTrack],0);
|
||||||
EncodeProcess.CommandLine := '/usr/bin/lame -h -b'+bitratebox.Items[bitratebox.ItemIndex]+
|
EncodeProcess.CommandLine := '/usr/bin/lame -h -b'+bitratebox.Items[bitratebox.ItemIndex]+
|
||||||
' --tt "'+UTF8toLatin1(Trackgrid.Cells[1, EncodeTrack])+
|
' --tt "'+UTF8toLatin1(Trackgrid.Cells[1, EncodeTrack])+
|
||||||
'" --ta "'+UTF8toLatin1(artistedit.Text)+'" --tl "'+
|
'" --ta "'+UTF8toLatin1(artistedit.Text)+'" --tl "'+
|
||||||
UTF8toLatin1(albumedit.Text)+'" --tn '+tmps+' "'+outfolder+
|
UTF8toLatin1(albumedit.Text)+'" --tn '+tmps+' "'+outfolder+
|
||||||
'/Track'+tmps+'.wav"'+' "'+OutFileNames[EncodeTrack]+'"';
|
'/Track'+tmps+'.wav"'+' "'+OutFileNames[EncodeTrack]+'"';
|
||||||
writeln(EncodeProcess.CommandLine);
|
DebugOutLn(EncodeProcess.CommandLine,0);
|
||||||
Caption := 'Encoding Track '+inttostr(EncodeTrack)+' ...';
|
Caption := 'Encoding Track '+inttostr(EncodeTrack)+' ...';
|
||||||
EncodeProcess.Options := [poUsePipes, poStderrToOutPut];
|
EncodeProcess.Options := [poUsePipes, poStderrToOutPut];
|
||||||
EncodeProcess.Execute;
|
EncodeProcess.Execute;
|
||||||
@ -404,7 +400,7 @@ Begin
|
|||||||
Begin
|
Begin
|
||||||
DeleteFile(outfolder+'/Track'+tmps+'.wav');
|
DeleteFile(outfolder+'/Track'+tmps+'.wav');
|
||||||
DeleteFile(outfolder+'/Track'+tmps+'.inf');
|
DeleteFile(outfolder+'/Track'+tmps+'.inf');
|
||||||
writeln('delete '+outfolder+'/Track'+tmps+'.wav');
|
DebugOutLn('delete '+outfolder+'/Track'+tmps+'.wav',0);
|
||||||
End;
|
End;
|
||||||
Repeat
|
Repeat
|
||||||
inc(i)
|
inc(i)
|
||||||
@ -428,13 +424,13 @@ Begin
|
|||||||
outfolder+'/Track'+tmps+'.wav''';
|
outfolder+'/Track'+tmps+'.wav''';
|
||||||
RipProcess.Options := [poUsePipes,poStderrToOutPut, poDefaultErrorMode];
|
RipProcess.Options := [poUsePipes,poStderrToOutPut, poDefaultErrorMode];
|
||||||
Caption := 'Ripping Track '+tmps+' ...';
|
Caption := 'Ripping Track '+tmps+' ...';
|
||||||
writeln('Ripping Track '+tmps);
|
DebugOutLn('Ripping Track '+tmps,0);
|
||||||
RipProcess.Execute;
|
RipProcess.Execute;
|
||||||
Timer1.Enabled := true;
|
Timer1.Enabled := true;
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
writeln('Finished all tracks');
|
DebugOutLn('Finished all tracks', 0);
|
||||||
Trackgrid.Cells[2,RipTrack] := '100%';
|
Trackgrid.Cells[2,RipTrack] := '100%';
|
||||||
Caption := 'CD Rip... < Finished >';
|
Caption := 'CD Rip... < Finished >';
|
||||||
Trackgrid.Options:= Trackgrid.Options + [goEditing];
|
Trackgrid.Options:= Trackgrid.Options + [goEditing];
|
||||||
@ -462,7 +458,7 @@ Begin
|
|||||||
tmps := copy(Outputstring.Strings[i], pos('%', Outputstring.Strings[i])-2, 2);
|
tmps := copy(Outputstring.Strings[i], pos('%', Outputstring.Strings[i])-2, 2);
|
||||||
if tmps<>'' then EncPercent:=tmps;
|
if tmps<>'' then EncPercent:=tmps;
|
||||||
end;
|
end;
|
||||||
writeln(EncPercent);
|
DebugOutLn(EncPercent,0);
|
||||||
Trackgrid.Cells[2,EncodeTrack] := EncPercent+'%';
|
Trackgrid.Cells[2,EncodeTrack] := EncPercent+'%';
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
End;
|
End;
|
||||||
@ -473,7 +469,7 @@ Begin
|
|||||||
ripping := true;
|
ripping := true;
|
||||||
encoding := false;
|
encoding := false;
|
||||||
ToEncode[RipTrack] := false;
|
ToEncode[RipTrack] := false;
|
||||||
writeln('adding file');
|
DebugOutLn('adding file',0);
|
||||||
MediaCollection.add(OutFileNames[EncodeTrack]);
|
MediaCollection.add(OutFileNames[EncodeTrack]);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
@ -568,7 +564,7 @@ Begin
|
|||||||
RipProcess.CommandLine := '/usr/bin/cdda2wav -D'+CDDBcon.Device+' -t '+tmps+' "'+
|
RipProcess.CommandLine := '/usr/bin/cdda2wav -D'+CDDBcon.Device+' -t '+tmps+' "'+
|
||||||
outfolder+'/Track'+tmps+'.wav"';
|
outfolder+'/Track'+tmps+'.wav"';
|
||||||
RipProcess.Options := [poUsePipes, poStderrToOutPut, poDefaultErrorMode];
|
RipProcess.Options := [poUsePipes, poStderrToOutPut, poDefaultErrorMode];
|
||||||
writeln('Ripping Track '+tmps);
|
DebugOutLn('Ripping Track '+tmps, 0);
|
||||||
Caption := 'Ripping Track '+tmps+' ...';
|
Caption := 'Ripping Track '+tmps+' ...';
|
||||||
RipProcess.Execute;
|
RipProcess.Execute;
|
||||||
Timer1.Enabled := true;
|
Timer1.Enabled := true;
|
||||||
|
@ -419,7 +419,7 @@ Begin
|
|||||||
|
|
||||||
If (picrequest_send) And LastFMAPI.data_ready Then
|
If (picrequest_send) And LastFMAPI.data_ready Then
|
||||||
Begin
|
Begin
|
||||||
writeln(MedFileObj.CoverPath);
|
DebugOutLn(MedFileObj.CoverPath,0);
|
||||||
AlbumCoverImg.Canvas.Clear;
|
AlbumCoverImg.Canvas.Clear;
|
||||||
Try
|
Try
|
||||||
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
||||||
@ -709,7 +709,7 @@ Begin
|
|||||||
Try
|
Try
|
||||||
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
||||||
Except
|
Except
|
||||||
writeln('EXCEPTION loading cover file from '+MedFileObj.CoverPath);
|
DebugOutLn('EXCEPTION loading cover file from '+MedFileObj.CoverPath,0);
|
||||||
End;
|
End;
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
@ -761,7 +761,7 @@ Begin
|
|||||||
idlabel.Caption := 'File-Id: ' + IntToStr(MedFileObj.id);
|
idlabel.Caption := 'File-Id: ' + IntToStr(MedFileObj.id);
|
||||||
indexlabel.Caption := 'File-Index: ' + IntToStr(MedFileObj.index);
|
indexlabel.Caption := 'File-Index: ' + IntToStr(MedFileObj.index);
|
||||||
|
|
||||||
writeln('########AlbumCover');
|
DebugOutLn('########AlbumCover',0);
|
||||||
// DEBUG-INFO
|
// DEBUG-INFO
|
||||||
If (MedFileObj.album<>'') and CactusConfig.CheckCoverPath
|
If (MedFileObj.album<>'') and CactusConfig.CheckCoverPath
|
||||||
Then
|
Then
|
||||||
@ -772,7 +772,7 @@ Begin
|
|||||||
Try
|
Try
|
||||||
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
||||||
Except
|
Except
|
||||||
writeln('EXCEPTION loading cover');
|
DebugOutLn('EXCEPTION loading cover',0);
|
||||||
End;
|
End;
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
|
@ -21,7 +21,7 @@ uses
|
|||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
{$ifdef win32} fmoddyn, {$endif}
|
{$ifdef win32} fmoddyn, {$endif}
|
||||||
{$ifdef unix} fmoddyn, {$endif}
|
{$ifdef unix} fmoddyn, {$endif}
|
||||||
fmodtypes, mediacol, playlist, playerclass;
|
fmodtypes, mediacol, playlist, playerclass, debug;
|
||||||
|
|
||||||
type
|
type
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -121,8 +121,9 @@ begin
|
|||||||
if FSOUND_Init(44100, 32, 0)=true then begin
|
if FSOUND_Init(44100, 32, 0)=true then begin
|
||||||
|
|
||||||
FPlaybackMode:=FILE_MODE;
|
FPlaybackMode:=FILE_MODE;
|
||||||
writeln('playing -> '+playlist.items[index].path);
|
DebugOutLn('playing -> '+playlist.items[index].path,0);
|
||||||
if (FileExists(playlist.items[index].path)) then begin
|
if (FileExists(playlist.items[index].path)) then
|
||||||
|
begin
|
||||||
tmpp:=StrAlloc(length(playlist.items[index].path)+1);
|
tmpp:=StrAlloc(length(playlist.items[index].path)+1);
|
||||||
StrPCopy(tmpp,playlist.items[index].path);
|
StrPCopy(tmpp,playlist.items[index].path);
|
||||||
|
|
||||||
@ -138,18 +139,20 @@ begin
|
|||||||
if z = 0 then begin //If loading was succesful
|
if z = 0 then begin //If loading was succesful
|
||||||
write(' start playing... ');
|
write(' start playing... ');
|
||||||
FSOUND_Stream_Play (FSOUND_FREE,Soundhandle); // Start playing
|
FSOUND_Stream_Play (FSOUND_FREE,Soundhandle); // Start playing
|
||||||
writeln(' ready... ');
|
DebugOutLn(' ready... ',0);
|
||||||
FSOUND_SetVolume(0, FVolume);
|
FSOUND_SetVolume(0, FVolume);
|
||||||
playlist.items[index].played:=true;
|
playlist.items[index].played:=true;
|
||||||
fplaying:=true;
|
fplaying:=true;
|
||||||
result:=0;
|
result:=0;
|
||||||
FCurrentTrack:=index;
|
FCurrentTrack:=index;
|
||||||
end else begin
|
end
|
||||||
write('error: can''t play file');writeln(z);
|
else
|
||||||
end;
|
DebugOutLn(Format('error: can''t play file %d',[z]), 0);
|
||||||
end else result:=1;
|
end
|
||||||
end else result:=2;
|
else result:=1;
|
||||||
end;
|
end
|
||||||
|
else result:=2;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
writeln('INTERNAL error: playlistindex out of bound');
|
writeln('INTERNAL error: playlistindex out of bound');
|
||||||
@ -175,15 +178,15 @@ begin
|
|||||||
//FSOUND_Close;
|
//FSOUND_Close;
|
||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
if OutputMode = OSSOUT then begin
|
if OutputMode = OSSOUT then begin
|
||||||
if FSOUND_SetOutput(FSOUND_OUTPUT_OSS) then writeln('Oss output openend') else writeln('failed opening oss output')
|
if FSOUND_SetOutput(FSOUND_OUTPUT_OSS) then DebugOutLn('Oss output openend',0) else writeln('failed opening oss output')
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
if FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) then writeln('alsa output openend') else writeln('failed opening alsa output')
|
if FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) then DebugOutLn('alsa output openend',0) else writeln('failed opening alsa output')
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
if FSOUND_Init(44100, 32, 0)=true then begin
|
if FSOUND_Init(44100, 32, 0)=true then begin
|
||||||
FPlaybackMode:=STREAMING_MODE;
|
FPlaybackMode:=STREAMING_MODE;
|
||||||
writeln('playing -> '+url);
|
DebugOutLn('playing -> '+url,0);
|
||||||
tmpp:=StrAlloc(length(url)+1);
|
tmpp:=StrAlloc(length(url)+1);
|
||||||
StrPCopy(tmpp,url);
|
StrPCopy(tmpp,url);
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ Unit functions;
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, math, config;
|
Classes, SysUtils, math,
|
||||||
|
debug, config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -181,7 +182,7 @@ Begin
|
|||||||
If utf16 Then
|
If utf16 Then
|
||||||
Begin
|
Begin
|
||||||
i := i+2;
|
i := i+2;
|
||||||
writeln('utf16');
|
DebugOutLn('utf16',0);
|
||||||
Repeat
|
Repeat
|
||||||
Begin
|
Begin
|
||||||
inc(i);
|
inc(i);
|
||||||
@ -321,8 +322,8 @@ Begin
|
|||||||
// get free memory on player, format string
|
// get free memory on player, format string
|
||||||
SetCurrentDir(CactusConfig.DAPPath);
|
SetCurrentDir(CactusConfig.DAPPath);
|
||||||
result := DiskFree(0);
|
result := DiskFree(0);
|
||||||
writeln('------>');
|
DebugOutLn('------>',0);
|
||||||
writeln(DiskFree(0));
|
DebugOutLn(Format('DiskFree=%d',[DiskFree(0)]),0);
|
||||||
SetCurrentDir(tmps);
|
SetCurrentDir(tmps);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ begin
|
|||||||
try
|
try
|
||||||
HTTPConnection.Document.SaveToFile(FAlbumInfo.CoverSavePath);
|
HTTPConnection.Document.SaveToFile(FAlbumInfo.CoverSavePath);
|
||||||
except
|
except
|
||||||
writeln('EXCEPTION writing cover art to disk');
|
DebugOutLn('EXCEPTION writing cover art to disk',0);
|
||||||
end;
|
end;
|
||||||
HTTPConnection.Free;
|
HTTPConnection.Free;
|
||||||
End else DebugOutLn('No cover found :(', 5);
|
End else DebugOutLn('No cover found :(', 5);
|
||||||
@ -195,7 +195,7 @@ begin
|
|||||||
FArtist:=artist;
|
FArtist:=artist;
|
||||||
furl := Furlprefix + Format('?method=album.getinfo&api_key=%s&artist=%s&album=%s', [FAPIKey, FArtist, FAlbum]);
|
furl := Furlprefix + Format('?method=album.getinfo&api_key=%s&artist=%s&album=%s', [FAPIKey, FArtist, FAlbum]);
|
||||||
furl := AnsiReplaceStr(furl, ' ', '%20');
|
furl := AnsiReplaceStr(furl, ' ', '%20');
|
||||||
writeln(furl);
|
DebugOutLn(furl,0);
|
||||||
SendRequest(@album_getInfosRCV);
|
SendRequest(@album_getInfosRCV);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -269,7 +269,6 @@ type
|
|||||||
procedure LibraryModeBtnClick(Sender: TObject);
|
procedure LibraryModeBtnClick(Sender: TObject);
|
||||||
procedure MenuItem15Click(Sender: TObject);
|
procedure MenuItem15Click(Sender: TObject);
|
||||||
procedure MenuItem25Click(Sender: TObject);
|
procedure MenuItem25Click(Sender: TObject);
|
||||||
procedure menuShowCactusClick(Sender: TObject);
|
|
||||||
procedure MIrandom_playlistClick(Sender: TObject);
|
procedure MIrandom_playlistClick(Sender: TObject);
|
||||||
procedure MIViewAlbumClick(Sender: TObject);
|
procedure MIViewAlbumClick(Sender: TObject);
|
||||||
procedure MIViewArtistClick(Sender: TObject);
|
procedure MIViewArtistClick(Sender: TObject);
|
||||||
@ -577,7 +576,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
writeln('finished');
|
DebugOutLn('finished', 0);
|
||||||
TargetCollection.SaveToFile;
|
TargetCollection.SaveToFile;
|
||||||
TargetCollection.Free;
|
TargetCollection.Free;
|
||||||
main.connectDAP;
|
main.connectDAP;
|
||||||
@ -680,16 +679,15 @@ begin
|
|||||||
if MessageDlg('Some files on your harddisk seem to have changed.' + LineEnding +
|
if MessageDlg('Some files on your harddisk seem to have changed.' + LineEnding +
|
||||||
'Adopt changes in Cactus library?', mtWarning, mbOKCancel, 0) = mrOk then
|
'Adopt changes in Cactus library?', mtWarning, mbOKCancel, 0) = mrOk then
|
||||||
begin
|
begin
|
||||||
writeln(1);
|
|
||||||
fstatus := 255;
|
fstatus := 255;
|
||||||
writeln('assigning');
|
DebugOutLn('[TScanThread.ShowStatus] assigning', 0);
|
||||||
|
|
||||||
// PTargetCollection^.Assign(tmpcollection);
|
// PTargetCollection^.Assign(tmpcollection);
|
||||||
writeln('saving');
|
DebugOutLn('saving', 0);
|
||||||
// PTargetCollection^.save_lib(PTargetCollection^.savepath);
|
// PTargetCollection^.save_lib(PTargetCollection^.savepath);
|
||||||
Main.clear_listClick(nil);
|
Main.clear_listClick(nil);
|
||||||
|
|
||||||
writeln('WARNING: if excption occurs, playlist has to be cleared here!');
|
DebugOutLn('WARNING: if excEption occurs, playlist has to be cleared here!', 0);
|
||||||
// Main.update_player_hdd_relations;
|
// Main.update_player_hdd_relations;
|
||||||
main.update_artist_view;
|
main.update_artist_view;
|
||||||
update_title_view;
|
update_title_view;
|
||||||
@ -702,11 +700,11 @@ begin
|
|||||||
if (fstatus = 0) or (fstatus = 128) then
|
if (fstatus = 0) or (fstatus = 128) then
|
||||||
begin
|
begin
|
||||||
Main.StatusBar1.Panels[0].Text := 'Ready';
|
Main.StatusBar1.Panels[0].Text := 'Ready';
|
||||||
writeln('fstatus 0, 126');
|
DebugOutLn('fstatus 0, 126', 0);
|
||||||
Main.StatusBar1.Panels[1].Alignment := taRightJustify;
|
Main.StatusBar1.Panels[1].Alignment := taRightJustify;
|
||||||
tmpcollection.Free;
|
tmpcollection.Free;
|
||||||
end;
|
end;
|
||||||
writeln('showStatus');
|
DebugOutLn('showStatus', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -790,7 +788,7 @@ begin
|
|||||||
y := Volumebar.Height;
|
y := Volumebar.Height;
|
||||||
if y < 0 then
|
if y < 0 then
|
||||||
y := 0;
|
y := 0;
|
||||||
writeln(y);
|
DebugOutLn(IntToStr(y), 0);
|
||||||
|
|
||||||
newVolume := 100 - ((y * 100) div (Volumebar.Height));
|
newVolume := 100 - ((y * 100) div (Volumebar.Height));
|
||||||
PlayerObj.set_volume(newVolume);
|
PlayerObj.set_volume(newVolume);
|
||||||
@ -861,7 +859,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if oldindex >= 0 then
|
if oldindex >= 0 then
|
||||||
playlist.Items[oldindex].ImageIndex := -1;
|
playlist.Items[oldindex].ImageIndex := -1;
|
||||||
writeln(oldindex);
|
DebugOutLn(IntToStr(oldindex), 0);
|
||||||
playlist.Items[i].ImageIndex := 0;
|
playlist.Items[i].ImageIndex := 0;
|
||||||
playlist.Items[i].MakeVisible(False);
|
playlist.Items[i].MakeVisible(False);
|
||||||
playtimer.Enabled := True;
|
playtimer.Enabled := True;
|
||||||
@ -1163,16 +1161,12 @@ begin
|
|||||||
if FileExists(CactusConfig.DAPPath) then
|
if FileExists(CactusConfig.DAPPath) then
|
||||||
begin
|
begin
|
||||||
checkmobile.Enabled := False;
|
checkmobile.Enabled := False;
|
||||||
writeln('ooo');
|
|
||||||
disconnectDAP;
|
disconnectDAP;
|
||||||
writeln('aa');
|
|
||||||
ScanCol := TMediaCollectionClass.Create;
|
ScanCol := TMediaCollectionClass.Create;
|
||||||
ScanCol.syncronize := @ScanSyncronize;
|
ScanCol.syncronize := @ScanSyncronize;
|
||||||
Enabled := False;
|
Enabled := False;
|
||||||
writeln('ll');
|
|
||||||
ScanCol.PathFmt := FRelative;
|
ScanCol.PathFmt := FRelative;
|
||||||
ScanCol.savepath := CactusConfig.DAPPath + 'cactuslib';
|
ScanCol.savepath := CactusConfig.DAPPath + 'cactuslib';
|
||||||
writeln('dd');
|
|
||||||
ScanCol.add_directory(CactusConfig.DAPPath);
|
ScanCol.add_directory(CactusConfig.DAPPath);
|
||||||
ScanCol.SaveToFile;
|
ScanCol.SaveToFile;
|
||||||
ScanCol.Free;
|
ScanCol.Free;
|
||||||
@ -1455,11 +1449,6 @@ begin
|
|||||||
addRadioForm.ShowModal;
|
addRadioForm.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMain.menuShowCactusClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
procedure TMain.MIViewAlbumClick(Sender: TObject);
|
procedure TMain.MIViewAlbumClick(Sender: TObject);
|
||||||
@ -2162,7 +2151,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if StreamCollection.LoadFromFile(CactusConfig.StreamColPath) = False then
|
if StreamCollection.LoadFromFile(CactusConfig.StreamColPath) = False then
|
||||||
begin
|
begin
|
||||||
writeln('Error loading stream collection');
|
DebugOutLn('Error loading stream collection', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2538,8 +2527,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
until ((lowercase(ArtistTree.items[i].Text) = curartist) and
|
until ((lowercase(ArtistTree.items[i].Text) = curartist) and
|
||||||
(ArtistTree.Items[i].Level = 1)) or (i >= ArtistTree.items.Count - 1);
|
(ArtistTree.Items[i].Level = 1)) or (i >= ArtistTree.items.Count - 1);
|
||||||
writeln(curartist);
|
DebugOutLn(curartist, 0);
|
||||||
writeln(ArtistTree.items[i].Text);
|
DebugOutLn(ArtistTree.items[i].Text, 0);
|
||||||
if lowercase(ArtistTree.items[i].Text) = curartist then
|
if lowercase(ArtistTree.items[i].Text) = curartist then
|
||||||
begin
|
begin
|
||||||
ArtistTree.selected := main.artisttree.items[i];
|
ArtistTree.selected := main.artisttree.items[i];
|
||||||
@ -3034,7 +3023,7 @@ begin
|
|||||||
else
|
else
|
||||||
DebugOutLn(' --> Invalid message/filename received via IPC', 2);
|
DebugOutLn(' --> Invalid message/filename received via IPC', 2);
|
||||||
end;
|
end;
|
||||||
Writeln('IPC end');
|
DebugOutLn('IPC end', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMain.skinmenuClick(Sender: TObject);
|
procedure TMain.skinmenuClick(Sender: TObject);
|
||||||
@ -3151,7 +3140,7 @@ begin
|
|||||||
sl := TStringList.Create;
|
sl := TStringList.Create;
|
||||||
try
|
try
|
||||||
IndexOfCurrentColumn := column.index;
|
IndexOfCurrentColumn := column.index;
|
||||||
writeln(IndexOfCurrentColumn);
|
DebugOutLn(Format('IndexOfCurrentColumn=%d', [IndexOfCurrentColumn]), 0);
|
||||||
|
|
||||||
if IndexOfCurrentColumn <> 0 then
|
if IndexOfCurrentColumn <> 0 then
|
||||||
begin
|
begin
|
||||||
@ -3344,7 +3333,7 @@ begin
|
|||||||
// get free memory on player, format string
|
// get free memory on player, format string
|
||||||
DebugOut('loaded', 2);
|
DebugOut('loaded', 2);
|
||||||
tmps := ByteToFmtString(FreeSpaceOnDAP, 3, 2);
|
tmps := ByteToFmtString(FreeSpaceOnDAP, 3, 2);
|
||||||
writeln(FreeSpaceOnDAP);
|
DebugOutLn(FreeSpaceOnDAP, 0);
|
||||||
StatusBar1.Panels[1].Text := 'Device connected ' + tmps + ' free';
|
StatusBar1.Panels[1].Text := 'Device connected ' + tmps + ' free';
|
||||||
if CactusConfig.background_scan then
|
if CactusConfig.background_scan then
|
||||||
begin
|
begin
|
||||||
@ -3425,9 +3414,8 @@ begin
|
|||||||
if CactusConfig.StopOnClear then
|
if CactusConfig.StopOnClear then
|
||||||
StopButtonImgClick(Sender);
|
StopButtonImgClick(Sender);
|
||||||
Playlist.BeginUpdate;
|
Playlist.BeginUpdate;
|
||||||
writeln(Playlist.Items.Count);
|
DebugOutLn('clear', 0);
|
||||||
Playlist.Items.Clear;
|
Playlist.Items.Clear;
|
||||||
writeln('clear');
|
|
||||||
playlist.Column[0].Caption := rsPlaylist;
|
playlist.Column[0].Caption := rsPlaylist;
|
||||||
PlayerObj.playlist.Clear;
|
PlayerObj.playlist.Clear;
|
||||||
Playlist.EndUpdate;
|
Playlist.EndUpdate;
|
||||||
@ -3738,7 +3726,6 @@ begin
|
|||||||
playlist.items[i - 1].Selected := True;
|
playlist.items[i - 1].Selected := True;
|
||||||
//tempitem.MakeVisible(true);
|
//tempitem.MakeVisible(true);
|
||||||
end;
|
end;
|
||||||
writeln(playlist.Selected.Index);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Key DOWN
|
// Key DOWN
|
||||||
@ -3901,7 +3888,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
StatusBar1.Panels[0].Text := 'Buffering stream...';
|
StatusBar1.Panels[0].Text := 'Buffering stream...';
|
||||||
StreamInfoObj := TStreamInfoItemClass(ArtistTree.Selected.Data);
|
StreamInfoObj := TStreamInfoItemClass(ArtistTree.Selected.Data);
|
||||||
writeln(PlayerObj.play(StreamInfoObj.URL));
|
DebugOutLn(PlayerObj.play(StreamInfoObj.URL), 0);
|
||||||
current_title_edit.Text := 'Playing radio stream...';
|
current_title_edit.Text := 'Playing radio stream...';
|
||||||
current_title_edit1.Text := StreamInfoObj.Name;
|
current_title_edit1.Text := StreamInfoObj.Name;
|
||||||
playtimer.Enabled := True;
|
playtimer.Enabled := True;
|
||||||
@ -3940,7 +3927,6 @@ var
|
|||||||
c: char;
|
c: char;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
writeln(key);
|
|
||||||
b := key;
|
b := key;
|
||||||
c := char(b);
|
c := char(b);
|
||||||
case key of
|
case key of
|
||||||
@ -4337,7 +4323,7 @@ procedure TMain.titlelistmenuPopup(Sender: TObject);
|
|||||||
var
|
var
|
||||||
MedFileObj: TMediaFileClass;
|
MedFileObj: TMediaFileClass;
|
||||||
begin
|
begin
|
||||||
writeln('titletree popupmenu');
|
DebugOutLn('[TMain.titlelistmenuPopup]', 0);
|
||||||
if TitleTree.Selected <> nil then
|
if TitleTree.Selected <> nil then
|
||||||
begin
|
begin
|
||||||
MedFileObj := TMediaFileClass(TitleTree.Selected.Data);
|
MedFileObj := TMediaFileClass(TitleTree.Selected.Data);
|
||||||
|
@ -180,7 +180,7 @@ Var mp3search,dirsearch: TSearchrec;
|
|||||||
fHandle: file Of byte;
|
fHandle: file Of byte;
|
||||||
Begin
|
Begin
|
||||||
dir := IncludeTrailingPathDelimiter(dir);
|
dir := IncludeTrailingPathDelimiter(dir);
|
||||||
writeln('scanning through: '+dir);
|
DebugOutLn('scanning through: '+dir, 0);
|
||||||
syncronize(dir);
|
syncronize(dir);
|
||||||
If FindFirst(dir+'*.*',faAnyFile,mp3search)=0 Then
|
If FindFirst(dir+'*.*',faAnyFile,mp3search)=0 Then
|
||||||
Begin
|
Begin
|
||||||
@ -283,7 +283,7 @@ Begin
|
|||||||
{$i+}
|
{$i+}
|
||||||
if IoResult<>0 then begin
|
if IoResult<>0 then begin
|
||||||
result := false;
|
result := false;
|
||||||
writeln('unable to open file ', path);
|
DebugOutLn('unable to open file '+path, 0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -357,10 +357,8 @@ Begin
|
|||||||
Except
|
Except
|
||||||
close(lfile);
|
close(lfile);
|
||||||
fsorted := sortState;
|
fsorted := sortState;
|
||||||
writeln('lib seems corupted');
|
DebugOutLn('lib seems corupted', 0);
|
||||||
write('exception at entry ');
|
DebugOutLn(Format('exception at entry %d line: %d', [i, linecount]), 0);
|
||||||
writeln(i);
|
|
||||||
write('line: ');writeln(linecount);
|
|
||||||
result := false;
|
result := false;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
@ -522,8 +520,8 @@ Begin
|
|||||||
Else FEnumerated := false;
|
Else FEnumerated := false;
|
||||||
|
|
||||||
except
|
except
|
||||||
writeln('exception sorting object in library');
|
DebugOutLn('exception sorting object in library',0);
|
||||||
writeln(MedFileObj.Path);
|
DebugOutLn(MedFileObj.Path,0);
|
||||||
end;
|
end;
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
@ -851,7 +849,6 @@ Begin
|
|||||||
try
|
try
|
||||||
if FileExists(Path) then
|
if FileExists(Path) then
|
||||||
begin
|
begin
|
||||||
writeln(path);
|
|
||||||
OGGFile.ReadFromFile(Path);
|
OGGFile.ReadFromFile(Path);
|
||||||
artist := UTF8Encode(OGGFile.Artist);
|
artist := UTF8Encode(OGGFile.Artist);
|
||||||
title := UTF8Encode(OGGFile.Title);
|
title := UTF8Encode(OGGFile.Title);
|
||||||
@ -955,7 +952,7 @@ Begin
|
|||||||
|
|
||||||
playtime := SecondsToFmtStr(Playlength);
|
playtime := SecondsToFmtStr(Playlength);
|
||||||
Except
|
Except
|
||||||
writeln('**EXCEPTION reading wave file '+path+'**');
|
DebugOutLn('**EXCEPTION reading wave file '+path+'**',0);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -968,7 +965,6 @@ Begin
|
|||||||
try
|
try
|
||||||
if FileExists(Path) then
|
if FileExists(Path) then
|
||||||
begin
|
begin
|
||||||
// writeln(path);
|
|
||||||
MP3File.ReadTag(Path);
|
MP3File.ReadTag(Path);
|
||||||
artist := StrToUTF8(MP3File.Artist);
|
artist := StrToUTF8(MP3File.Artist);
|
||||||
title := StrToUTF8(MP3File.Title);
|
title := StrToUTF8(MP3File.Title);
|
||||||
@ -1094,7 +1090,6 @@ Begin
|
|||||||
start := index;
|
start := index;
|
||||||
If (Collection<>nil) and Collection.sorted Then
|
If (Collection<>nil) and Collection.sorted Then
|
||||||
Begin
|
Begin
|
||||||
writeln(i);
|
|
||||||
If (i<Collection.Count-1) And (CompareText(FTitle, Collection.Items[i+1].Title)>0)
|
If (i<Collection.Count-1) And (CompareText(FTitle, Collection.Items[i+1].Title)>0)
|
||||||
And (CompareText(FArtist, Collection.Items[i+1].Artist)=0) Then
|
And (CompareText(FArtist, Collection.Items[i+1].Artist)=0) Then
|
||||||
Begin
|
Begin
|
||||||
|
@ -131,7 +131,8 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
// writeln(Result);
|
// writeln(Result);
|
||||||
except
|
except
|
||||||
writeln('EXCEPTION reading mplayer output');result:='';
|
DebugOutLn('EXCEPTION reading mplayer output', 0);
|
||||||
|
result:='';
|
||||||
end;
|
end;
|
||||||
//writeln('endget');
|
//writeln('endget');
|
||||||
AStringList.Free;
|
AStringList.Free;
|
||||||
@ -278,7 +279,7 @@ begin
|
|||||||
if FPlaying and Assigned(MPlayerProcess) then begin
|
if FPlaying and Assigned(MPlayerProcess) then begin
|
||||||
SendCommand('pause');
|
SendCommand('pause');
|
||||||
sleep(10);
|
sleep(10);
|
||||||
writeln('pauseee');
|
DebugOutLn('pauseee', 0);
|
||||||
FPaused:=not FPaused;
|
FPaused:=not FPaused;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -305,7 +306,7 @@ var r:byte;
|
|||||||
begin
|
begin
|
||||||
r:=127;
|
r:=127;
|
||||||
if fplaying then begin
|
if fplaying then begin
|
||||||
writeln('mnexttrack');
|
DebugOutLn('mnexttrack', 0);
|
||||||
if FCurrentTrack<Playlist.ItemCount-1 then begin
|
if FCurrentTrack<Playlist.ItemCount-1 then begin
|
||||||
r:=play(FCurrentTrack+1);
|
r:=play(FCurrentTrack+1);
|
||||||
end;
|
end;
|
||||||
|
@ -529,7 +529,6 @@ End;
|
|||||||
Procedure Tplaywin.playwinKeyDown(Sender: TObject; Var Key: Word;
|
Procedure Tplaywin.playwinKeyDown(Sender: TObject; Var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
Begin
|
Begin
|
||||||
writeln(key);
|
|
||||||
If key=113 Then Main.player_libClick(Nil);
|
If key=113 Then Main.player_libClick(Nil);
|
||||||
If key = 17 Then strg := true;
|
If key = 17 Then strg := true;
|
||||||
If (strg=true) And (key=78) Then Main.nextClick(Nil);
|
If (strg=true) And (key=78) Then Main.nextClick(Nil);
|
||||||
|
@ -161,15 +161,8 @@ begin
|
|||||||
current_track_tmp := target;
|
current_track_tmp := target;
|
||||||
// if dest<target then current_track_tmp:=target+1 else current_track_tmp:=target;
|
// if dest<target then current_track_tmp:=target+1 else current_track_tmp:=target;
|
||||||
end;
|
end;
|
||||||
Write('dest');
|
|
||||||
writeln(dest);
|
|
||||||
Write('target');
|
|
||||||
writeln(target);
|
|
||||||
Write('curtrack_before');
|
|
||||||
writeln(CurrentTrack);
|
|
||||||
CurrentTrack := current_track_tmp;
|
CurrentTrack := current_track_tmp;
|
||||||
|
DebugOutLn(Format('dest=%d target=%d curtrack_before=%d', [dest, target, CurrentTrack]), 0);
|
||||||
writeln(CurrentTrack);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -7,15 +7,7 @@ written by Sebastian Kraft, <c> 2006-2008
|
|||||||
Contact the author at: sebastian_kraft@gmx.de
|
Contact the author at: sebastian_kraft@gmx.de
|
||||||
|
|
||||||
This Software is published under the GPL
|
This Software is published under the GPL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Unit settings;
|
Unit settings;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
@ -23,8 +15,9 @@ Unit settings;
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||||
ExtCtrls, Buttons, ComCtrls, CheckLst, config, playerclass, mplayer;
|
ExtCtrls, Buttons, ComCtrls, CheckLst, config, playerclass, mplayer,
|
||||||
|
debug;
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
rsAutoloadLast = 'Load last library at startup';
|
rsAutoloadLast = 'Load last library at startup';
|
||||||
@ -309,8 +302,8 @@ Begin
|
|||||||
If DirectoryExists(CactusConfig.ConfigPrefix+DirectorySeparator+'covercache') Then
|
If DirectoryExists(CactusConfig.ConfigPrefix+DirectorySeparator+'covercache') Then
|
||||||
Begin
|
Begin
|
||||||
If EraseDirectory(CactusConfig.ConfigPrefix+DirectorySeparator+'covercache') Then
|
If EraseDirectory(CactusConfig.ConfigPrefix+DirectorySeparator+'covercache') Then
|
||||||
writeln('Covercache has been cleared...')
|
DebugOutLn('Covercache has been cleared...',0)
|
||||||
Else writeln('ERROR while clearing covercache...');
|
Else DebugOutLn('ERROR while clearing covercache...',0);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -352,8 +352,6 @@ Begin
|
|||||||
{Main.ImageList1.Insert(0, tmpbmp, nil);
|
{Main.ImageList1.Insert(0, tmpbmp, nil);
|
||||||
Main.ImageList1.Insert(1, tmpbmp, nil);}
|
Main.ImageList1.Insert(1, tmpbmp, nil);}
|
||||||
|
|
||||||
// writeln(skinxml.GetValue('Database/Play/Icon','ss'));
|
|
||||||
|
|
||||||
main.PlayButtonImg.Picture.LoadFromFile(Self.play.Img);
|
main.PlayButtonImg.Picture.LoadFromFile(Self.play.Img);
|
||||||
main.StopButtonImg.Picture.LoadFromFile(Self.stop.Img);
|
main.StopButtonImg.Picture.LoadFromFile(Self.stop.Img);
|
||||||
main.PauseButtonImg.Picture.LoadFromFile(Self.pause.Img);
|
main.PauseButtonImg.Picture.LoadFromFile(Self.pause.Img);
|
||||||
|
@ -5,10 +5,11 @@ Unit streamcol;
|
|||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
uses
|
||||||
Classes, SysUtils;
|
Classes, SysUtils,
|
||||||
|
debug;
|
||||||
|
|
||||||
Type
|
type
|
||||||
|
|
||||||
{ TStreamInfoItemClass }
|
{ TStreamInfoItemClass }
|
||||||
|
|
||||||
@ -120,7 +121,7 @@ Begin
|
|||||||
End;
|
End;
|
||||||
result:=true;
|
result:=true;
|
||||||
Except
|
Except
|
||||||
writeln('ERROR reading stream collection');
|
DebugOutLn('ERROR reading stream collection',0);
|
||||||
result:=false;
|
result:=false;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -136,7 +136,7 @@ begin
|
|||||||
// doesn't work with VBR files !
|
// doesn't work with VBR files !
|
||||||
End;
|
End;
|
||||||
End
|
End
|
||||||
Else writeln(FFileName+' -> no valid mpeg header found');
|
Else DebugOutLn('[TMP3File.ReadHeader] '+FFileName+' -> no valid mpeg header found', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMP3File.GetId3V1Track: Integer;
|
function TMP3File.GetId3V1Track: Integer;
|
||||||
@ -248,7 +248,9 @@ Begin
|
|||||||
yearv2 := '';
|
yearv2 := '';
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
except WriteLn(Filename+' -> exception while reading id3v2 tag... skipped!!'); end;
|
except
|
||||||
|
DebugOutLn('[TMP3File.ReadTag] '+Filename+' -> exception while reading id3v2 tag... skipped!!', 0);
|
||||||
|
end;
|
||||||
{id3v1}
|
{id3v1}
|
||||||
try
|
try
|
||||||
fileseek(mp3filehandle,-128, fsfromend);
|
fileseek(mp3filehandle,-128, fsfromend);
|
||||||
@ -284,7 +286,10 @@ Begin
|
|||||||
else
|
else
|
||||||
ftrack := '';
|
ftrack := '';
|
||||||
End; // else writeln('no id3v1 tag');
|
End; // else writeln('no id3v1 tag');
|
||||||
except WriteLn(Filename+' -> exception while reading id3v1 tag... skipped!!'); end;
|
except
|
||||||
|
DebugOutLn('TMP3File.ReadTag] '+Filename+
|
||||||
|
' -> exception while reading id3v1 tag... skipped!!', 0);
|
||||||
|
end;
|
||||||
(* {$IFNDEF WINDOWS}
|
(* {$IFNDEF WINDOWS}
|
||||||
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := artistv2;
|
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := artistv2;
|
||||||
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := titlev2;
|
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := titlev2;
|
||||||
@ -518,15 +523,15 @@ Begin
|
|||||||
|
|
||||||
mp3filehandle := fileopen(Filename,fmOpenWrite);
|
mp3filehandle := fileopen(Filename,fmOpenWrite);
|
||||||
If mp3filehandle<>-1 Then
|
If mp3filehandle<>-1 Then
|
||||||
Begin
|
Begin
|
||||||
If FileGetAttr(Filename)=faReadOnly Then DebugOutLn('file is read only', 0);
|
If FileGetAttr(Filename)=faReadOnly Then DebugOutLn('file is read only', 0);
|
||||||
fileseek(mp3filehandle,-128,fsfromend);
|
fileseek(mp3filehandle,-128,fsfromend);
|
||||||
writeln(ftitle);
|
DebugOutLn(ftitle,0);
|
||||||
writeln(fartist);
|
DebugOutLn(fartist,0);
|
||||||
filewrite(mp3filehandle,buf,128);
|
filewrite(mp3filehandle,buf,128);
|
||||||
fileclose(mp3filehandle);
|
fileclose(mp3filehandle);
|
||||||
End
|
End
|
||||||
Else writeln('ERROR: cant write tag. file not found');
|
Else DebugOutLn('ERROR: cant write tag. file not found',0);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user