.


:




:

































 

 

 

 


,




7.1.

.

7.2.

- .

 

"__" __________ 20013 . "__" __________ 20013 .


"3PMPLAYER"

.

:

.

.

.

 

, , 5 : string, integer, byte, boolean, datetime.

(.5), (), , : , , , , , .


 

 

"3PMPLAYER"

- , , , .

, , Embarcadero Delphi XE2. "3PMPLAYER" MS Windows 7.

:

;

;

;

Embarcadero Delphi XE2;

Ø ;

Ø ;

Ø ;

Ø ;

Ø ;

Windows 8, Windows 7 Windows XP;

.

, .

"3PMPLAYER"

, , .

:

10 - /, , . , . , // , / , / , (), , ;

4 Panel: 2 , 2 ;

TrackBar - .

ListBox-

3 Label-" :", , .

. 2.2.1. - "3PM Player".

 

:

2 -, ;

;

11 TrackBar - 10 , 1 ;

29 Label.

.2.2.2.- .

Unit_1:

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Bass, StdCtrls, Buttons, ExtCtrls, ComCtrls, ShellApi, Winapi.MMSystem,

RzStatus, Vcl.Menus, RzSelDir, cm_LSVGauges, RzCommon; //RzSelDir - ...http://www.cyberforum.ru/delphi-beginners/thread816542.html#post4298051

type

TTrackBar = class(ComCtrls.TTrackBar)

protected

function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;

end;

TFFTData = array [0..512] of Single;

TForm1 = class(TForm)

OpenDialog1: TOpenDialog;

Timer2_Play: TTimer;

Panel3: TPanel;

Panel4: TPanel;

ListBox1: TListBox;

ListBox2: TListBox;

TrackBar1: TTrackBar;

SpeedButton1: TSpeedButton;

SpeedButton2: TSpeedButton;

SpeedButton3: TSpeedButton;

SpeedButton4: TSpeedButton;

SaveDialog1: TSaveDialog;

Label1: TLabel;

BitBtn3: TBitBtn;

BitBtn2: TBitBtn;

Panel6: TPanel;

Panel7: TPanel;

Timer3_Time: TTimer;

Label4: TLabel;

Timer4_Visual: TTimer;

BitBtn5: TBitBtn;

BitBtn6: TBitBtn;

BitBtn4: TBitBtn;

RzMarqueeStatus1: TRzMarqueeStatus;

PopupMenu4: TPopupMenu;

N31: TMenuItem;

N32: TMenuItem;

N1: TMenuItem;

RzSelDirDialog1: TRzSelDirDialog;

PopupMenu2: TPopupMenu;

N2: TMenuItem;

N3: TMenuItem;

LSVGauge7: TLSVGauge;

Label2: TLabel;

Button1: TButton;

PopupMenu1: TPopupMenu;

N4: TMenuItem;

Image1: TImage;

PopupTrack: TPopupMenu;

N5: TMenuItem;

N6: TMenuItem;

procedure FormCreate(Sender: TObject);

procedure FormDestroy(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

procedure BitBtn3Click(Sender: TObject);

procedure Timer2_PlayTimer(Sender: TObject);

procedure ListBox1DblClick(Sender: TObject);

procedure ListBox1KeyDown(Sender: TObject; var Key: Word;

Shift: TShiftState);

procedure SpeedButton4Click(Sender: TObject);

procedure SpeedButton3Click(Sender: TObject);

procedure Timer3_TimeTimer(Sender: TObject);

procedure BitBtn4Click(Sender: TObject);

procedure TrackBar1Change(Sender: TObject);

procedure Draw(FFTData: TFFTData; X, Y: Integer);

procedure Timer4_VisualTimer(Sender: TObject);

procedure BitBtn5Click(Sender: TObject);

procedure BitBtn6Click(Sender: TObject);

procedure Panel6Click(Sender: TObject);

procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;

Rect: TRect; State: TOwnerDrawState);

procedure ListBox1MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure LSVGauge7MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

procedure LSVGauge7MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

procedure LSVGauge7MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

procedure N31Click(Sender: TObject);

procedure N1Click(Sender: TObject);

procedure SpeedButton1MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure SpeedButton2MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure N2Click(Sender: TObject);

procedure N3Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure FormShow(Sender: TObject);

procedure FocusPlayList;

procedure N5Click(Sender: TObject);

procedure ListBox1MouseDown(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure N6Click(Sender: TObject);// , TrackBar1

private

_tray1: TNotifyIconData; //

tray_icon: HIcon;

hFileMapObj: THandle; // FaleMapping

lpBaseAddress: PChar; //""

procedure AddFiles(FileName: String);

procedure PlayItem;// (Item: String)

procedure DropFile(Var Msg:TWMDropFiles); message WM_DropFiles;

public

Stream:HStream; //

{ Public declarations }

// :

procedure TrayEvent(var Msg: TMessage); message WM_User + 2;

// :

procedure ControlWindow(var Msg: TMessage); message WM_SysCommand;

end;

//2. ogg

var

l:Tpanel; // lsvgauge7

Form1: TForm1;

PAP:String; // Play Pause

Stop,//

repeattrack, //

repeatPlayList:Boolean;//

Buttonbar: TMouseButton; // ProgressBar'

p: BASS_DX8_PARAMEQ; //

fx: array[1..10] of integer; //

FFTPeacks: array [0..128] of Integer; //

FFTFallOff: array [0..128] of Integer; //

implementation

 

{$R *.dfm}

 

uses Unit2;

 

 

procedure ShowPropertiesDialog(FName: string);

var

SExInfo: TSHELLEXECUTEINFO;

Error: LongInt;

begin

ZeroMemory(Addr(SExInfo),SizeOf(SExInfo));

SExInfo.cbSize:= SizeOf(SExInfo);

SExInfo.lpFile:= PChar(FName);

SExInfo.lpVerb:= 'properties';

SExInfo.fMask:= SEE_MASK_INVOKEIDLIST;

ShellExecuteEx(Addr(SExInfo));

end;

 

 

procedure TForm1.TrayEvent(var Msg: TMessage);

var

_cur: TPoint; //

begin

GetCursorPos(_cur); //

Case msg.LParam of

WM_LButtonUp, WM_LButtonDBLCLK: //

begin

// ,

//postMessage(Self.Handle, WM_SysCommand, SC_Restore, 123456);

BitBtn2.Click;

end;

WM_RButtonUp:

begin

popupmenu1.Popup(_cur.X, _cur.Y); //

end;

end;

end;

 

//procedure TForm1.FocusPlayList;

 

procedure TForm1.ControlWindow(var Msg: TMessage);

begin

// - " " -

If Msg.WParam = SC_MINIMIZE then

begin

Shell_NotifyIcon(nim_add, @_tray1); //

Self.Hide; //

end

else if Msg.WParam = SC_Restore then

begin

If msg.LParam = 123456 then // ,

begin

Self.Show; //

SetForegroundWindow(Self.Handle);

//Shell_NotifyIcon(nim_delete, @_tray1); // ()

end

else if msg.LParam = 123457 then //

begin

Self.Show; //

SetForegroundWindow(Self.Handle);

Shell_NotifyIcon(nim_delete, @_tray1); // ()

MessageBox(handle, ' !',

'3PMPlayer', mb_IconInformation);

end

else // , , :)

inherited;

end

else //

inherited; //

end;

 

 

function TTrackBar.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;

begin

Position:= Position + WheelDelta div 30;

Result:= True;

end;

 

procedure FindFile(Dir: String);

var sr: TSearchRec;

begin

dir:=Dir + '\';

if FindFirst(Dir + '*.*', faAnyFile, sr) = 0 then

begin

repeat

if (sr.Name <> '..') and (sr.Name <> '.') then

if (sr.Attr and faDirectory) <> 0 then

begin

FindFile(Dir + sr.Name);

end

else

if (ExtractFileExt(sr.Name)='.mp3') or (ExtractFileExt(sr.Name)='.mp4') or (ExtractFileExt(sr.Name)='.wma') or (ExtractFileExt(sr.Name)='.wav') then // ['.mp3','.mp4','.wma','.wav']

form1.addfiles(Dir + sr.Name);

until FindNext(sr) <> 0;

FindClose(sr);

end;

end;

 

 

function MyTrackBarProc(myWnd: HWND; Msg: UINT;

myWParam: WPARAM; myLParam:LPARAM): LRESULT; stdcall;

var

DC, hPen, hOldPen, hOldBrush: DWORD;

cxBorder: integer;

rc: TRect;

cr: integer;

begin

result:= CallWindowProc(Pointer(GetWindowLong(myWnd,GWL_USERDATA)),

myWnd, Msg, myWParam, myLParam);

if Msg = WM_PAINT then

begin

cxBorder:= GetSystemMetrics(SM_CXBORDER);

GetWindowRect(myWnd,rc);

DC:= GetWindowDC(myWnd);

cr:=GetSysColor(COLOR_BTNFACE);

hPen:= CreatePen(PS_INSIDEFRAME, cxBorder, cr);

hOldPen:= SelectObject(DC, hPen);

hOldBrush:= SelectObject(DC, GetStockObject(NULL_BRUSH));

Rectangle(DC, 0, 0,rc.Right - rc.Left, rc.Bottom - rc.Top);

SelectObject(DC, hOldBrush);

SelectObject(DC, hOldPen);

ReleaseDC(myWnd,DC);

DeleteObject(hPen)

end;

end;

 

 

function GetFileFormat(St: string): string; //

var

//z: integer;

n: byte;

begin

for n:= length(St) -1 downto 0 do

if (St[n] = '.') then

begin

//n:= z;

st:=Copy(St,n+1,length(St)-n);

break;

end;

//Delete(St, 1, n);

Result:= St;

end;

 

procedure TForm1.LSVGauge7MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

if LSVGauge7.Enabled=false then Exit;

buttonBar:=button;

LSVGauge7.Progress:= Round(x * (LSVGauge7.Maxvalue / L.Width));

Bass_ChannelSetPosition(Stream, LSVGauge7.progress, 0);

end;

 

procedure TForm1.LSVGauge7MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

if LSVGauge7.Enabled=false then Exit;

buttonBar:=mbright;

end;

 

procedure TForm1.LSVGauge7MouseMove(Sender: TObject; Shift: TShiftState;

X, Y: Integer);

begin

if LSVGauge7.Enabled=false then Exit;

if buttonbar=mbleft then

Begin

LSVGauge7.Progress:=Round((Bass_ChannelGetLength(Stream, 0)/lsvgauge7.width*x));

Bass_ChannelSetPosition(Stream, LSVGauge7.Progress, 0);

end;

end;

 

 

procedure TForm1.FocusPlayList;

begin

if form1.Visible then

form1.trackbar1.setfocus;

end;

 

procedure TForm1.FormCreate(Sender: TObject);

var ProgDir:String; // exe' ()

s: String;

HandlePrev: HWnd;

begin

{}

// === Page File (File Mapping) === === === === === ===

hFileMapObj:=CreateFileMapping(MAXDWORD, nil, PAGE_READWRITE, 0, 4,

'10D964863CFB45C9A2F76BA91FB4C7E3666');

{

10D964863CFB45C9A2F76BA91FB4C7E3666

. ,

- - . (

) ,

; :)

}

If (hFileMapObj = 0) Then

MessageBox(0, ' FileMapping!', '', mb_IconError)

else

lpBaseAddress:= MapViewOfFile(hFileMapObj,FILE_MAP_WRITE, 0, 0, 0);

If lpBaseAddress = nil Then

MessageBox(0, ' FileMapping!', '', mb_IconError);

// === === === === === === === === === === === ===

s:= PChar(lpBaseAddress);

If Length(s) > 2 then

begin

HandlePrev:= THandle(StrToInt(s));

postMessage(HandlePrev, WM_SysCommand, SC_Restore, 123457);

UnMapViewOfFile(lpBaseAddress);

CloseHandle(hFileMapObj);

halt;

end

else

begin

s:= IntToStr(Integer(Self.Handle));

StrPCopy(lpBaseAddress, s);

end;

// , , .. - ,

// :

//

tray_icon:= Application.Icon.Handle;

// :

_tray1.cbSize:= SizeOf(_tray1); //

_tray1.Wnd:= Self.Handle; // , ( )

_tray1.uID:= 1; //

_tray1.uFlags:= NIF_ICON or NIF_MESSAGE or NIF_TIP; //

_tray1.uCallbackMessage:= WM_User + 2; // ,

_tray1.hIcon:= tray_icon; //

_tray1.szTip:= ', !';

// :

Shell_NotifyIcon(nim_add, @_tray1);

{}

if (HIWORD(BASS_GetVersion) <> BASSVERSION) then

begin

MessageBox(0,' BASS.DLL',nil,MB_ICONERROR);

Halt;

end;

// - , 44100hz, stereo, 16 bits

if not BASS_Init(-1, 44100, 0, Handle, nil) then

begin

MessageBox(0,' ',nil,MB_ICONERROR);

Halt;

end;

// LSVGauge7

L:= Tpanel.Create(Self);

L.Parent:= LSVGauge7;

L.AutoSize:= False;

L.Align:= alClient;

L.Alignment:= taCenter;

L.OnMouseDown:= LSVGauge7MouseDown;

l.OnMouseMove:=LSVGauge7MouseMove;

l.OnMouseUp:= LSVGauge7MouseUP;

l.DoubleBuffered:= true;

//////

LSVGauge7.Enabled:=false;

LSVGauge7.Text:='00:00/00:00';

Panel6.Caption:='00:00';

Panel7.Caption:='00:00';

OpenDialog1.Options:=OpenDialog1.Options+[ofAllowMultiSelect];

SetWindowLong(TrackBar1.Handle, GWL_USERDATA,SetWindowLong(TrackBar1.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc))); //

DragAcceptFiles(Handle, True);

ProgDir:=ExtractFileDir(ParamStr(0))+'\';

SaveDialog1.InitialDir:=ProgDir;

OpenDialog1.InitialDir:='';

TrackBar1.Position:=Round(127.5);

WaveOUtSetVolume(0,MakeLong(TrackBar1.Position*255,TrackBar1.Position*255));//

//Bass_SetVolume(TrackBar1.Position/100); //

buttonBar:=mbright;

label2.Caption:=IntToStr(Round(TrackBar1.Position/2.55)) + '%';

RzMarqueeStatus1.Caption:='Made By PaXaN86';

PAP:='Play';

SpeedButton1.Glyph.LoadFromFile(ProgDir+'pic\add.BMP');

SpeedButton2.Glyph.LoadFromFile(ProgDir+'pic\del.BMP');

SpeedButton3.Glyph.LoadFromFile(ProgDir+'pic\openlist.BMP');

SpeedButton4.Glyph.LoadFromFile(ProgDir+'pic\save.BMP');

BitBtn2.Glyph.LoadFromFile(ProgDir+'pic\play.BMP');

BitBtn3.Glyph.LoadFromFile(ProgDir+'pic\stop.BMP');

BitBtn5.Glyph.LoadFromFile(ProgDir+'pic\prev.BMP');

BitBtn6.Glyph.LoadFromFile(ProgDir+'pic\next.BMP');

BitBtn4.Glyph.LoadFromFile(ProgDir+'pic\options.BMP');

repeatTrack:=false;

repeatPlayList:=false;

 

Form1.Position:=poDesktopCenter;

end;

 

procedure TForm1.FormDestroy(Sender: TObject);

begin

Bass_Stop(); //

BASS_StreamFree(Stream);

bass_free();

Shell_NotifyIcon(nim_delete, @_tray1); //

UnMapViewOfFile(lpBaseAddress); // Page File

CloseHandle(hFileMapObj);

end;

 

 

procedure TForm1.FormShow(Sender: TObject);

var FFTFata: TFFTData;

begin

if ParamCount > 0 then

AddFiles(ParamStr(1));

if ListBox1.Count > 0 then

playitem;

 

BASS_ChannelGetData(stream, @FFTFata, BASS_DATA_FFT1024); //

FillChar(FFTFata [0],SizeOf(TFFTData),0);

Draw(FFTFata, 2, -5);

end;

 

procedure TForm1.BitBtn2Click(Sender: TObject);

begin

FocusPlayList;

if PAP='Play' then

begin

If (Bass_ChannelIsActive(Stream) = Bass_Active_Stopped) then

Begin

If ListBox1.Items.Count = 0 then

begin

Showmessage(' !');

RzMarqueeStatus1.Caption:=' !';

exit;

end;

stop:=false;

PlayItem;

exit;

End;

 

If Bass_ChannelIsActive(Stream) = Bass_Active_Paused then

begin

stop:=false;

Bass_ChannelPlay(Stream, False);

PAP:='Pause';

bitbtn2.Glyph.LoadFromFile(ExtractFileDir(ParamStr(0))+'\'+'pic\pause.BMP');

exit;

end;

end;

if PAP='Pause' then

Begin

Bass_ChannelPause(Stream); //

PAP:='Play';

bitbtn2.Glyph.LoadFromFile(ExtractFileDir(ParamStr(0))+'\'+'pic\play.BMP');

end;

Stop:=False;

end;

 

 

procedure TForm1.BitBtn3Click(Sender: TObject);

var FFTFata: TFFTData;

begin

FocusPlayList;

PAP:='Play';

Stop:=true;

bitbtn2.Glyph.LoadFromFile(ExtractFileDir(ParamStr(0))+'\'+'pic\play.BMP');

if Stream <> 0 then

begin

RzMarqueeStatus1.Caption:='Stop';

Bass_StreamFree(Stream); //

end;

end;

 

 

procedure TForm1.BitBtn4Click(Sender: TObject);

begin

FocusPlayList;

form2.showmodal;

end;

 

 

procedure TForm1.BitBtn5Click(Sender: TObject);

begin

FocusPlayList;

if listbox2.ItemIndex > 0 then

begin

Listbox2.ItemIndex:=Listbox2.ItemIndex-1;

PlayItem;

Listbox1.ItemIndex:=Listbox2.ItemIndex;

end;

end;

 

 

procedure TForm1.BitBtn6Click(Sender: TObject);

begin

FocusPlayList;

if listbox2.ItemIndex < listbox2.Count-1 then

begin

Listbox2.ItemIndex:=Listbox2.ItemIndex+1;

PlayItem;

Listbox1.ItemIndex:=Listbox2.ItemIndex;

end;

end;

 

 

procedure TForm1.Button1Click(Sender: TObject);

begin

FocusPlayList;

if Button1.Caption=' ' then

begin

Button1.Caption:=' ';

repeatTrack:=true;

Exit;

end;

if Button1.Caption=' ' then

begin

Button1.Caption:=' ';

repeatTrack:=false;

repeatPlayList:=true;

Exit;

end;

if Button1.Caption=' ' then

begin

Button1.Caption:=' ';

repeatTrack:=false;

repeatPlayList:=false;

Exit;

end;

end;

 

 

procedure TForm1.Timer2_PlayTimer(Sender: TObject);

begin

if (Bass_ChannelIsActive(stream) = BASS_ACTIVE_STOPPED) then

Begin

PAP:='Play';

bitbtn2.Glyph.LoadFromFile(ExtractFileDir(ParamStr(0))+'\'+'pic\play.BMP');

LSVGauge7.Enabled:=false;

LSVGauge7.progress:=0;

//Bass_ChannelStop(Stream);

Bass_ChannelSetPosition(Stream, 0,0);

 

if Stop=true then //

begin

Timer3_Time.Enabled:=false;

Timer2_Play.Enabled:=false;

Timer4_Visual.Enabled:=false;

Panel6.Caption:='00:00';

Panel7.Caption:='00:00';

LSVGauge7.Text:='00:00/00:00';

exit;

end;

 

if RepeatTrack=true then

begin

PlayItem; //(listbox2.items[listbox2.ItemIndex])

LSVGauge7.Enabled:=True;

exit;

end;

 

if (ListBox2.itemindex < ListBox2.Items.Count-1) then

begin

Listbox2.ItemIndex:=Listbox2.ItemIndex+1;

PlayItem; //(IntToStr(ListBox2.itemindex))

end

else

if RepeatPlayList=true then

begin

Listbox2.ItemIndex:=0;

Listbox1.ItemIndex:=0;

PlayItem; // (IntToStr(ListBox2.itemindex))

end

else//

begin

RzMarqueeStatus1.Caption:=' !';

Listbox2.ItemIndex:=0;

Listbox1.ItemIndex:=0;

Bass_StreamFree(Stream);

stop:=True;

end;

end;

end;

 

 

procedure TForm1.AddFiles(FileName: String);

begin

ListBox2.Items.Add(FileName);

ListBox1.Items.Add(ExtractFileName(FileName));

 

If ListBox1.ItemIndex = -1 then

begin

listBox1.ItemIndex:=ListBox1.Count-1;

Listbox2.ItemIndex:=Listbox1.ItemIndex;

end;

end;

 

 

procedure TForm1.SpeedButton1MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

var

P: TPoint;

begin

P.X:=SpeedButton1.Left;

P.Y:=SpeedButton1.Top;

P:=ClientToScreen(P);

PopupMenu4.Popup(P.X, P.Y+185);

end;

 

 

procedure TForm1.Panel6Click(Sender: TObject);

begin

FocusPlayList;

if Panel6.BevelWidth=1 then

begin

Panel6.BevelWidth:=2;

Panel6.Hint:=' ';

exit

end;

if Panel6.BevelWidth=2 then

begin

Panel6.BevelWidth:=1;

Panel6.Hint:=' ';

exit

end;

end;

 

 

procedure TForm1.PlayItem; // (Item: String)

Var TrackLen:string;

begin

if Stream <> 0 then

Bass_channelStop(Stream);

Bass_StreamFree(Stream);

listbox1.Repaint;

if not FileExists(ListBox2.Items[ListBox2.ItemIndex]) then

begin

ShowMessage('! ');

RzMarqueeStatus1.Caption:='! ';

exit;

end;

Stream:=Bass_StreamCreateFile(false, Pchar(ListBox2.Items[Listbox2.ItemIndex]), 0, 0, 0{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}); //

if Stream=0 then // /

begin

Showmessage('! ');

RzMarqueeStatus1.Caption:='! ';

exit;

end;

 

 

//

fx[1]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);//

fx[2]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);//

fx[3]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[4]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[5]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[6]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[7]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[8]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[9]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

fx[10]:= BASS_ChannelSetFX(form1.Stream, BASS_FX_DX8_PARAMEQ, 1);

 

//

p.fGain:=15-form2.trackbar3.Position; //

p.fBandwidth:= 3; //

p.fCenter:= 80; //

BASS_FXSetParameters(fx[1], @p);//

//

 

p.fGain:= 15-form2.trackbar4.Position;

p.fBandwidth:= 3;

p.fCenter:= 170;

BASS_FXSetParameters(fx[2], @p);

// ..

p.fGain:= 15-form2.trackbar5.Position;

p.fBandwidth:= 3;

p.fCenter:= 310;

BASS_FXSetParameters(fx[3], @p);

 

p.fGain:= 15-form2.trackbar6.Position;

p.fBandwidth:= 3;

p.fCenter:= 600;

BASS_FXSetParameters(fx[4], @p);

 

p.fGain:= 15-form2.trackbar7.Position;

p.fBandwidth:= 3;

p.fCenter:= 1000;

BASS_FXSetParameters(fx[5], @p);

 

p.fGain:= 15-form2.trackbar8.Position;

p.fBandwidth:= 3;

p.fCenter:= 3000;

BASS_FXSetParameters(fx[6], @p);

 

p.fGain:= 15-form2.trackbar9.Position;

p.fBandwidth:= 3;

p.fCenter:= 6000;

BASS_FXSetParameters(fx[7], @p);

 

p.fGain:= 15-form2.trackbar10.Position;

p.fBandwidth:=3;

p.fCenter:= 10000;

BASS_FXSetParameters(fx[8], @p);

 

p.fGain:= 15-form2.trackbar11.Position;

p.fBandwidth:= 3;

p.fCenter:= 12000;

BASS_FXSetParameters(fx[9], @p);

 

p.fGain:= 15-form2.trackbar12.Position;

p.fBandwidth:= 3;

p.fCenter:= 14000;

BASS_FXSetParameters(fx[10], @p);

 

PAP:='Pause';

bitbtn2.Glyph.LoadFromFile(ExtractFileDir(ParamStr(0))+'\'+'pic\pause.BMP');

LSVGauge7.Enabled:=True;

LSVGauge7.Progress:=0;

LSVGauge7.MaxValue:=Bass_ChannelGetLength(Stream, 0)-1;

 

if not BASS_ChannelPlay(Stream, False) then

begin

ShowMessage('! ');

RzMarqueeStatus1.Caption:='! ';

exit;

end;

timer2_Play.Enabled:=true;

timer4_Visual.Enabled:=true;

Timer3_Time.Enabled:=true;

 

RzMarqueeStatus1.Caption:=' ** '+copy(ExtractFileName(StringReplace(ListBox2.Items.Strings[Listbox2.ItemIndex], '&', '&&', [rfReplaceAll, rfIgnoreCase])),0,Length(ExtractFileName(StringReplace(ListBox2.Items.Strings[Listbox2.ItemIndex], '&', '&&', [rfReplaceAll, rfIgnoreCase])))-4)+':: '+AnsiUpperCase(GetFileFormat(extractfilename(ListBox2.Items.Strings[ListBox2.itemindex])))+':: '+

IntToStr(trunc((BASS_StreamGetFilePosition(stream, BASS_FILEPOS_END)/(125*BASS_ChannelBytes2Seconds(stream, BASS_ChannelGetLength(stream,BASS_POS_BYTE))))+0.5)) + 'Kbps' +' ** ';

TrackLen:=FormatDateTime('hh:mm:ss',BASS_ChannelBytes2Seconds(stream,Bass_ChannelGetLength(Stream, 0))/ (24 * 3600));

if TrackLen[2]='0' then

Panel7.Caption:=Copy(TrackLen,4,5)

else

Panel7.Caption:=TrackLen;

PAP:='Pause'; //

end;

 

 

procedure TForm1.ListBox1DblClick(Sender: TObject);

begin

if Listbox1.ItemIndex < 0 then Exit;

stop:=False;

ListBox2.ItemIndex:=Listbox1.ItemIndex;

PlayItem;

end;

 

 

procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;

Rect: TRect; State: TOwnerDrawState);

begin

with TListBox(Control) do

begin

if index=ListBox2.ItemIndex then

if ListBox2.ItemIndex=ListBox1.ItemIndex then

Canvas.font.Color:=clBlue

else

Canvas.font.Color:=clred

else

Canvas.font.Color:=clblack;

Canvas.FillRect(rect);

Canvas.TextOut(rect.Left,rect.Top,items[index]);

end;

end;

 

 

procedure TForm1.SpeedButton2MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

Var P:TPoint;

begin

P.X:=SpeedButton2.Left;

P.Y:=SpeedButton2.Top;

P:=ClientToScreen(P);

PopupMenu2.Popup(P.X, P.Y+185);

end;

 

 

procedure TForm1.ListBox1KeyDown(Sender: TObject; var Key: Word;

Shift: TShiftState);

begin

if key=VK_Delete then

Form1.N2Click(self);

end;

 

 

procedure TForm1.ListBox1MouseDown(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

if Button=mbright then //

if ListBox1.ItemAtPos(Point(X, Y), True) = -1 then

ListBox1.ItemIndex:= -1

else

ListBox1.ItemIndex:=ListBox1.ItemAtPos(Point(X, Y), True);

 

if ListBox1.ItemIndex = -1 then

begin

PopupTrack.Items[0].Enabled:=False;

PopupTrack.Items[1].Enabled:=False;

end

else

begin

PopupTrack.Items[0].Enabled:=True;

PopupTrack.Items[1].Enabled:=True;

end;

 

end;

 

procedure TForm1.ListBox1MouseUp(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

begin

ListBox1.Repaint;

//

if ListBox1.ItemAtPos(Point(X, Y), True) = -1 then

ListBox1.ItemIndex:= -1;

end;

 

 

procedure TForm1.N1Click(Sender: TObject);

begin

if RzSelDirDialog1.Execute then

FindFile(RzSelDirDialog1.Directory);

end;

 

 

procedure TForm1.N2Click(Sender: TObject);

var b:integer;

begin

b:=ListBox1.ItemIndex;

if (ListBox1.ItemIndex=ListBox2.Items.count-1) then

ListBox1.ItemIndex:=ListBox1.ItemIndex-1

else

if ListBox1.ItemIndex<ListBox2.Items.count-1 then

ListBox1.ItemIndex:=ListBox1.ItemIndex+1;

 

ListBox1.Items.Delete(b);

ListBox2.Items.Delete(b);

end;

 

 

procedure TForm1.N31Click(Sender: TObject);

var i:integer;

begin

OpenDialog1.Filter:='music files|*.mp3;*.wma;*.wav;*.mp4'; //All Audio Files|*.mp3;*.mp4

OpenDialog1.InitialDir:='';

SpeedButton1.Down:=False;

if opendialog1.Execute then

for i:= 0 to OpenDialog1.Files.Count-1 do

AddFiles(OpenDialog1.Files[i])

else

exit;

end;

 

 

procedure TForm1.N3Click(Sender: TObject);

begin

ListBox1.Clear;

ListBox2.Clear;

end;

 

 

procedure TForm1.N4Click(Sender: TObject);

begin

{ "" PopupMenu }

postMessage(Self.Handle, WM_SysCommand, SC_Restore, 123456); //

end;

 

procedure TForm1.N5Click(Sender: TObject);

var path:string;

begin

path:= Form1.ListBox2.Items[ListBox1.ItemIndex]; // ExtractFilePath(

ShellExecute(0, 'open', 'explorer.exe', PChar('/select,' + path), nil, SW_SHOWNORMAL);

end;

 

procedure TForm1.N6Click(Sender: TObject);

begin

ShowPropertiesDialog(Form1.ListBox2.Items[ListBox1.ItemIndex]);

 

end;

 

procedure TForm1.SpeedButton4Click(Sender: TObject);

begin

if SaveDialog1.Execute then

ListBox2.Items.SaveToFile(SaveDialog1.FileName);

end;

 

 

procedure TForm1.SpeedButton3Click(Sender: TObject);

Var

I:Integer;

begin

OpenDialog1.Filter:='Text File|*.txt';

OpenDialog1.InitialDir:=ExtractFileDir(ParamStr(0))+'\';

if OpenDialog1.Execute = false then exit;

ListBox2.Items.LoadFromFile(OpenDialog1.FileName);

ListBox1.Items.LoadFromFile(OpenDialog1.FileName);

For i:=0 to ListBox1.items.Count-1 do

ListBox1.items[i]:=Extractfilename(ListBox1.items[i]);

listBox1.ItemIndex:=0;

end;

 

 

procedure TForm1.Draw(FFTData: TFFTData; X, Y: Integer);

var i, YPos: LongInt; YVal: Single;

begin

//

Image1.Canvas.Pen.Color:= clBlack;

Image1.Canvas.Brush.Color:= RGB(255,127,80);

Image1.Canvas.Rectangle(0, 0, Image1.Width, Image1.Height);

//

Image1.Canvas.Pen.Color:= clRed;

for i:= 0 to 86 do //127

begin //

YVal:= Abs(FFTData[i]);

YPos:= trunc((YVal) * 500);

if YPos > Image1.Height then YPos:= Image1.Height;

 

if YPos >= FFTPeacks[i] then FFTPeacks[i]:= YPos

else FFTPeacks[i]:= FFTPeacks[i] - 1;

 

if YPos >= FFTFallOff[i] then FFTFallOff[i]:= YPos

else FFTFallOff[i]:= FFTFallOff[i] - 3;

//

Image1.Canvas.Pen.Color:= clYellow;

Image1.Canvas.MoveTo(X + i*(3+1), Y + Image1.Height - FFTPeacks[i]);

Image1.Canvas.LineTo(X + i*(3+1) + 3, Y + Image1.Height - FFTPeacks[i]);

//

Image1.Canvas.Pen.Color:= clBlue;

Image1.Canvas.Brush.Color:= clBlue;

Image1.Canvas.Rectangle(X + i*(3+1), Y + Image1.Height - FFTFallOff[i], X + i*(3+1) + 3, Y + Image1.Height);

end;

end;

 

 

procedure TForm1.DropFile(var Msg: TWMDropFiles);

Var

CFileName: array [0..MAX_Path] of Char;

numFiles,i, attr:integer;

s: set of Char;

g: string;

begin

s:=['m','p','3','4','w','a','v'];

try

numFiles:= DragQueryFile(Msg.Drop, $FFFFFFFF, nil, 0);// -

if numFiles = 0 then Exit;// 0

for i:= 0 to numFiles - 1 do//-

if DragQueryFile(Msg.Drop, i, CFileName, Max_Path)>0 then//

begin

attr:=FileGetAttr(CFileName);//

if attr and faDirectory > 0 then//

FindFile(CFileName) //

else

begin

g:=ExtractFileExt(CFileName);

if (g[2] in s) and (g[3] in s) and (g[4] in s) then //1)case 2)array+for

begin

AddFiles(CFileName);

Msg.Result:=0;

end;

end;

end;

Finally;

DragFinish(Msg.Drop);

end;

end;

 

 

procedure TForm1.Timer3_TimeTimer(Sender: TObject);

var

TrackLen,TrackPos:string;

Begin

LSVGauge7.progress:=Bass_ChannelGetPosition(Stream, 0);

TrackLen:=FormatDateTime('hh:mm:ss',BASS_ChannelBytes2Seconds(stream,Bass_ChannelGetLength(Stream, 0))/ (24 * 3600));

if BASS_ChannelBytes2Seconds(stream,BASS_ChannelGetPosition(stream,0)) = -1 then // ()

Panel6.Caption:='00:00'

else

begin

if Panel6.BevelWidth=1 then //

TrackPos:=FormatDateTime('hh:mm:ss',BASS_ChannelBytes2Seconds(stream,BASS_ChannelGetPosition(stream,0)) / (24 * 3600))

else // BevelWidth=2 //

TrackPos:=FormatDateTime('hh:mm:ss',BASS_ChannelBytes2Seconds(stream,Bass_ChannelGetLength(Stream, 0))/ (24 * 3600) - BASS_ChannelBytes2Seconds(stream,BASS_ChannelGetPosition(stream,0)) / (24 * 3600));

if TrackLen[2]='0' then //

begin

Panel6.Caption:=Copy(TrackPos,4,5);

lsvgauge7.text:=Copy(TrackPos,4,5)+'/'+panel7.Caption;

end

else

begin

Panel6.Caption:=TrackPos;

lsvgauge7.text:=TrackPos+'/'+panel7.Caption;

end;

end;

End;

 

 

procedure TForm1.Timer4_VisualTimer(Sender: TObject);

var FFTFata: TFFTData;

begin

if BASS_ChannelIsActive(Stream) = BASS_ACTIVE_PLAYING then

begin

BASS_ChannelGetData(stream, @FFTFata, BASS_DATA_FFT1024);

Draw(FFTFata, 2, -5);

end;

end;

 

 

procedure TForm1.TrackBar1Change(Sender: TObject);

begin

//Bass_SetVolume(TrackBar1.Position/100);

WaveOUtSetVolume(0,MakeLong(TrackBar1.Position*255,TrackBar1.Position*255));

label2.Caption:=IntToStr(Round(TrackBar1.Position/2.55)) + '%'

end;

 

end.

Unit_2:

unit Unit2;

 

interface

 

uses

Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,

Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls, bass, Vcl.ExtCtrls, Registry;

 

type

TForm2 = class(TForm)

Label2: TLabel;

Label4: TLabel;

TrackBar111: TTrackBar;

TrackBar3: TTrackBar;

Label1: TLabel;

TrackBar4: TTrackBar;

Label3: TLabel;

TrackBar5: TTrackBar;

Label5: TLabel;

TrackBar6: TTrackBar;

Label6: TLabel;

TrackBar7: TTrackBar;

Label7: TLabel;

TrackBar8: TTrackBar;

Label8: TLabel;

TrackBar9: TTrackBar;

Label9: TLabel;

TrackBar10: TTrackBar;

Label10: TLabel;

TrackBar11: TTrackBar;

Label11: TLabel;

TrackBar12: TTrackBar;

Label12: TLabel;

Label13: TLabel;

Label14: TLabel;

Label15: TLabel;

Button1: TButton;

Shape1: TShape;

Shape2: TShape;

Label16: TLabel;

Label17: TLabel;

Label18: TLabel;

Label19: TLabel;

Label20: TLabel;

Label21: TLabel;

Label22: TLabel;

Label23: TLabel;

Label24: TLabel;

Label25: TLabel;

Label26: TLabel;

Label27: TLabel;

Label28: TLabel;

Label29: TLabel;

Label30: TLabel;

Button2: TButton;

CheckBox1: TCheckBox;

Button3: TButton;

procedure TrackBar111Change(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure TrackBar3Change(Sender: TObject);

procedure TrackBar12Change(Sender: TObject);

procedure TrackBar4Change(Sender: TObject);

procedure TrackBar5Change(Sender: TObject);

procedure TrackBar6Change(Sender: TObject);

procedure TrackBar7Change(Sender: TObject);

procedure TrackBar8Change(Sender: TObject);

procedure TrackBar9Change(Sender: TObject);

procedure TrackBar10Change(Sender: TObject);

procedure TrackBar11Change(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure FormShow(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure CheckBox1Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

 

 

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form2: TForm2;

//

 

implementation

 

uses Unit1;

 

 

{$R *.dfm}

 

function MyTrackBarProc(myWnd: HWND; Msg: UINT;

myWParam: WPARAM; myLParam:LPARAM): LRESULT; stdcall;

var

DC, hPen, hOldPen, hOldBrush: DWORD;

cxBorder: integer;

rc: TRect;

cr: integer;

begin

result:= CallWindowProc(Pointer(GetWindowLong(myWnd,GWL_USERDATA)),

myWnd, Msg, myWParam, myLParam);

if Msg = WM_PAINT then

begin

cxBorder:= GetSystemMetrics(SM_CXBORDER);

GetWindowRect(myWnd,rc);

DC:= GetWindowDC(myWnd);

cr:=GetSysColor(COLOR_BTNFACE); // rgb(226,234,241)

hPen:= CreatePen(PS_INSIDEFRAME, cxBorder, cr);

hOldPen:= SelectObject(DC, hPen);

hOldBrush:= SelectObject(DC, GetStockObject(NULL_BRUSH));

Rectangle(DC, 0, 0,rc.Right - rc.Left, rc.Bottom - rc.Top);

SelectObject(DC, hOldBrush);

SelectObject(DC, hOldPen);

ReleaseDC(myWnd,DC);

DeleteObject(hPen)

end;

end;

 

procedure TForm2.Button1Click(Sender: TObject);

begin

TrackBar3.Position:=15;

TrackBar4.Position:=15;

TrackBar5.Position:=15;

TrackBar6.Position:=15;

TrackBar7.Position:=15;

TrackBar8.Position:=15;

TrackBar9.Position:=15;

TrackBar10.Position:=15;

TrackBar11.Position:=15;

TrackBar12.Position:=15;

TrackBar111.Position:=0;

end;

 

procedure TForm2.Button2Click(Sender: TObject);

begin

close;

end;

 

 

procedure TForm2.Button3Click(Sender: TObject);

begin

//SaveOldReg('.mp3');

//SaveOldReg('.mp4');

//SaveOldReg('.wma');

//SaveOldReg('.wav');

end;

 

 

procedure TForm2.CheckBox1Click(Sender: TObject);

var reg: TRegistry;

begin

if CheckBox1.Checked then

begin

// RegFileExt('.mp3','3pmPlayer',':');

//Registration('mp3','3pmPlayer.exe','3pmPlayer',extractfilepath(Application.ExeName)+'3pmPlayer.exe','1');

// Registration('mp4','3pmPlayer.exe','3pmPlayer',extractfilepath(Application.ExeName)+'3pmPlayer.exe','1');

// Registration('wma','3pmPlayer.exe','3pmPlayer',extractfilepath(Application.ExeName)+'3pmPlayer.exe','1');

// Registration('wav','3pmPlayer.exe','3pmPlayer',extractfilepath(Application.ExeName)+'3pmPlayer.exe','1');

end;

end;

 

procedure TForm2.FormCreate(Sender: TObject);

var i:Byte;

handle1:HWND;

begin

//

SetWindowLong(TrackBar111.Handle, GWL_USERDATA,

SetWindowLong(TrackBar111.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar3.Handle, GWL_USERDATA,

SetWindowLong(TrackBar3.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar4.Handle, GWL_USERDATA,

SetWindowLong(TrackBar4.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar5.Handle, GWL_USERDATA,

SetWindowLong(TrackBar5.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar6.Handle, GWL_USERDATA,

SetWindowLong(TrackBar6.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar7.Handle, GWL_USERDATA,

SetWindowLong(TrackBar7.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar8.Handle, GWL_USERDATA,

SetWindowLong(TrackBar8.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar9.Handle, GWL_USERDATA,

SetWindowLong(TrackBar9.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar10.Handle, GWL_USERDATA,

SetWindowLong(TrackBar10.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar11.Handle, GWL_USERDATA,

SetWindowLong(TrackBar11.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

SetWindowLong(TrackBar12.Handle, GWL_USERDATA,

SetWindowLong(TrackBar12.Handle, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

 

label2.Caption:=FloatToStr(Trackbar111.Position);

 

//

label16.Caption:=FloatToStrF(TrackBar3.Position/3*10,ffGeneral,3,0) + '%';

label17.Caption:=FloatToStrF(TrackBar4.Position/3*10,ffGeneral,3,0) + '%';

label18.Caption:=FloatToStrF(TrackBar6.Position/3*10,ffGeneral,3,0) + '%';

label19.Caption:=FloatToStrF(TrackBar5.Position/3*10,ffGeneral,3,0) + '%';

label20.Caption:=FloatToStrF(TrackBar7.Position/3*10,ffGeneral,3,0) + '%';

label21.Caption:=FloatToStrF(TrackBar8.Position/3*10,ffGeneral,3,0) + '%';

label22.Caption:=FloatToStrF(TrackBar9.Position/3*10,ffGeneral,3,0) + '%';

label23.Caption:=FloatToStrF(TrackBar10.Position/3*10,ffGeneral,3,0) + '%';

label24.Caption:=FloatToStrF(TrackBar11.Position/3*10,ffGeneral,3,0) + '%';

label25.Caption:=FloatToStrF(TrackBar12.Position/3*10,ffGeneral,3,0) + '%';

 

Form2.Position:=poDesktopCenter;

end;

 

 

procedure TForm2.FormShow(Sender: TObject);

begin

 

 

{for i:= 3 to 12 do //

begin

with findcomponent('TrackBar'+IntToStr(i))as ttrackbar do

handle1:=handle;

SetWindowLong(handle1, GWL_USERDATA,SetWindowLong(handle1, GWL_WNDPROC, LPARAM(@MyTrackBarProc)));

end; }

end;

 

procedure TForm2.TrackBar111Change(Sender: TObject);

begin

BASS_ChannelSetAttribute(form1.Stream,BASS_ATTRIB_PAN, Trackbar111.Position/100);

form2.label2.Caption:=FloatToStr(Trackbar111.Position);

end;

 

procedure TForm2.TrackBar10Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[8], @p);//

p.fgain:= 15-TrackBar10.position;// TrackBar

BASS_FXSetParameters(fx[8], @p);//

 

label23.Caption:=FloatToStrF(TrackBar10.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar11Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[9], @p);//

p.fgain:= 15-TrackBar11.position;// TrackBar

BASS_FXSetParameters(fx[9], @p);//

 

label24.Caption:=FloatToStrF(TrackBar11.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar12Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[10], @p);//

p.fgain:= 15-TrackBar12.position;// TrackBar

BASS_FXSetParameters(fx[10], @p);//

 

label25.Caption:=FloatToStrF(TrackBar12.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar3Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[1], @p);//

p.fgain:= 15-TrackBar3.position;// TrackBar

BASS_FXSetParameters(fx[1], @p);//

 

label16.Caption:=FloatToStrF(TrackBar3.Position/3*10,ffGeneral,3,0) + '%'; //

 

end;

 

procedure TForm2.TrackBar4Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[2], @p);//

p.fgain:= 15-TrackBar4.position;// TrackBar

BASS_FXSetParameters(fx[2], @p);//

 

 

label17.Caption:=FloatToStrF(TrackBar4.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar5Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[3], @p);//

p.fgain:= 15-TrackBar5.position;// TrackBar

BASS_FXSetParameters(fx[3], @p);//

 

 

label19.Caption:=FloatToStrF(TrackBar5.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar6Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[4], @p);//

p.fgain:= 15-TrackBar6.position;// TrackBar

BASS_FXSetParameters(fx[4], @p);//

 

label18.Caption:=FloatToStrF(TrackBar6.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar7Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[5], @p);//

p.fgain:= 15-TrackBar7.position;// TrackBar

BASS_FXSetParameters(fx[5], @p);//

 

label20.Caption:=FloatToStrF(TrackBar7.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar8Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[6], @p);//

p.fgain:= 15-TrackBar8.position;// TrackBar

BASS_FXSetParameters(fx[6], @p);//

 

label21.Caption:=FloatToStrF(TrackBar8.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

procedure TForm2.TrackBar9Change(Sender: TObject);

begin

BASS_FXGetParameters(fx[7], @p);//

p.fgain:= 15-TrackBar9.position;// TrackBar

BASS_FXSetParameters(fx[7], @p);//

 

label22.Caption:=FloatToStrF(TrackBar9.Position/3*10,ffGeneral,3,0) + '%';//

 

end;

 

end.


.

ISO 9126, :

1.

2.

3.

4.

5.

6.

:

1. ;

2. (, , , , .), " ", ;

3. .

4. Windows XP, 7 8. ;

5. , , ;

6. ;

7. (HDD, CD/DVD, Blu-Ray, USB-).

"3PMPLAYER"

"3pmPlayer" - , , .

;

( "*.*") , , - ( USB- , ).

, , .

( "3pmPlayer" ) .

:

ü Bass.dll;

ü -;

ü DELPHI.

ü ;

ü ;

ü ;

ü , .

"3pmPlayer" .

, , .

,

, .

1. ://ru.wikipedia.org/wiki/

2. ://programmersclub.ru/help/

3. :://cyberforum.ru/delphi/

4. 30.11.1994 N-51 ;

5. 20 1993 . 260 ( / 9294-93);

6. .. , : , 1998;

 





:


: 2016-09-03; !; : 619 |


:

:

- - , .
==> ...

931 - | 974 -


© 2015-2024 lektsii.org - -

: 1.228 .