Can you help

Please discuss general Delphi programming topics here.

Can you help

Postby saracoza » May 18th, 2008, 9:08 am

I am *Ing you from turkey follow
My english some weak
When the music steal
On the form
Can I do the vibration
Ekolayzr looks like
A lot of simple something

This Project
---------------------
Code: Select all
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, MPlayer, ExtCtrls;

type
  TForm1 = class(TForm)
    MediaPlayer1: TMediaPlayer;
    Button1: TButton;
    Timer1: TTimer;
    procedure Button1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
MediaPlayer1.Close;
  MediaPlayer1.FileName := 'C:\Documents and Settings\BBS PC\Desktop\mp3\ÇAKKIDI.mp3';
  MediaPlayer1.Open;

end;


---------------
One simple example :)
I will broaden
Thank you
User avatar
saracoza
Active Member
Active Member
 
Posts: 6
Joined: May 12th, 2008, 12:12 pm
Location: Çanakkale/Turkiye

Postby saracoza » May 20th, 2008, 10:06 am

above project
I broadened :)
You can use
free

Video and Mp3 steals

Code: Select all
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, MPlayer, Buttons;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    player1: TMediaPlayer;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    SpeedButton4: TSpeedButton;
    SpeedButton5: TSpeedButton;
    opndlg: TOpenDialog;
    procedure SpeedButton5Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton3Click(Sender: TObject);
    procedure SpeedButton4Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.SpeedButton5Click(Sender: TObject);
begin
   close;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if messagebox(handle, 'You want to get out?','WinPlayer',mb_yesno+mb_iconquestion)=idyes then
   action:=cafree
   else
   action:=canone;
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
try
 if opndlg.Execute then
    begin
    player1.FileName:=opndlg.FileName;
    player1.Open;
    player1.Play;
    end;
except
 on E: Exception do showmessage(E.Message+' '+ inttostr(E.HelpContext));
end;

end;

procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
if (player1.mode =mpOpen) or (player1.Mode = mppaused) then
 player1.Play;
end;

procedure TForm1.SpeedButton3Click(Sender: TObject);
begin
if player1.Mode=mpPlaying then
   player1.pause;
end;

procedure TForm1.SpeedButton4Click(Sender: TObject);
begin
if player1.FileName<>'' then
   begin
   player1.Stop;
   player1.Close;
   end;
end;

procedure TForm1.FormActivate(Sender: TObject);
var
r:trect;
begin
r.Left :=panel1.left;
r.Top :=panel1.Top;
r.Bottom:=r.top+panel1.Height;
r.Right:=r.Left +panel1.Width;
player1.DisplayRect:=r;
end;

end.






User avatar
saracoza
Active Member
Active Member
 
Posts: 6
Joined: May 12th, 2008, 12:12 pm
Location: Çanakkale/Turkiye

Postby saracoza » May 21st, 2008, 1:19 pm

To our project
The addition


volume control

uses mmsystem,
procedure TForm1.TrackBar1Change(Sender: TObject);

Code: Select all
var
Count, i: integer;
begin
  Count := waveOutGetNumDevs;
  for i := 0 to Count do
  begin
   waveOutSetVolume(i,longint(TrackBar1.Position*4369)*65536+longint(TrackBar1.Position*4369));
end;
User avatar
saracoza
Active Member
Active Member
 
Posts: 6
Joined: May 12th, 2008, 12:12 pm
Location: Çanakkale/Turkiye

Postby cozturk » May 22nd, 2008, 7:37 am

What is the question? Do you want ask something?

Ne sormak istediğinizi anlamadık. türkiş forumlarına sorabilirsiniz.

Vumetre yapacaksanız iş kolay. ancak spektrum analizer işi zordur. Vumetre için, LiveAudio Player On Level olayı kullanılacakç bufferi kısa tutacaksınız.
cozturk
Moderator
Moderator
 
Posts: 63
Joined: June 30th, 2005, 5:39 am
Location: Istanbul - Turkiye

Postby saracoza » May 22nd, 2008, 8:09 am

Thank you

aslında basit bir ekolayzr sistemiydi müziğe göre paintte sesle hareket edecekti ama
anlatamadık galiba :) sürekli takip ederim bu formu tabi ingilizce zayıf olunca derdimizi
anlatamıyoruz.İlgin için teşekkür ederim.
User avatar
saracoza
Active Member
Active Member
 
Posts: 6
Joined: May 12th, 2008, 12:12 pm
Location: Çanakkale/Turkiye


Return to Delphi Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron