unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BassPlayerExU, basschannelu, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
OpenDialog1: TOpenDialog;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Player : TBassPlayerEx;
ChannelA : Tbasschannel;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Player:=TBassPlayerEx.Create(1, self);
ChannelA:=Player.addChannel(100);
end;
procedure TForm1.Button1Click(Sender: TObject);
// Play-Button
begin
if not opendialog1.Execute
then exit;
channela.LoadFromFile(opendialog1.filename);
channela.Play;
end;
procedure TForm1.Button2Click(Sender: TObject);
// Stop-Button
begin
channela.FadeTime := 2;
channela.FadeStop := true;
channela.doFadingOut;
end;
procedure TForm1.Button3Click(Sender: TObject);
// Volume-Button
begin
channela.Volume := 100;
end;
end.