Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to add Music to a Project? [Delphi]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Oct 14, 2007 2:57 pm    Post subject: How to add Music to a Project? [Delphi] Reply with quote

Yes, I know I ask alot of questions. I want to make a project with all my favorite music but how do you have the song start when you click Button1?
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Oct 14, 2007 3:03 pm    Post subject: Reply with quote

Code:
uses
           MMSystem;


and
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
PlaySound(PChar('logged.wav'),0,SND_ASYNC);
end;


To play it once.
And SND_LOOP to loop it.
Stop loop with:

Code:
procedure TForm1.Button2Click(Sender: TObject);
begin
PlaySound(nil,0,0);
end;
Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Oct 14, 2007 3:06 pm    Post subject: Reply with quote

You don't have to specify a path where the .wav is at?
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Oct 14, 2007 3:13 pm    Post subject: Reply with quote

Quote:
procedure TForm1.Button1Click(Sender: TObject);
begin
PlaySound(PChar('logged.wav'),0,SND_ASYNC);
end;
...


but it has to be in the same folder with the program, but you can also use "C:\lolol\porn.wav", but this is just for .WAV files.
Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Oct 14, 2007 3:16 pm    Post subject: Reply with quote

What if I put a folder called wav's and put them all in there, would it be :
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
PlaySound(PChar('wav's/logged.wav'),0,SND_ASYNC);
end;
...

??
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Oct 14, 2007 3:22 pm    Post subject: Reply with quote

Never Again wrote:
What if I put a folder called wav's and put them all in there, would it be :
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
PlaySound(PChar('wav's/logged.wav'),0,SND_ASYNC);
end;
...

??


Don't use '
Use ยด because this sign will end the 'lala' part if you understand what I mean.
But it would work to use a folder.
Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Oct 14, 2007 3:26 pm    Post subject: Reply with quote

Oh yeah, so just 'wavs/jessicasimpsonnaked.wav'??
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Oct 14, 2007 3:30 pm    Post subject: Reply with quote

Never Again wrote:
Oh yeah, so just 'wavs/jessicasimpsonnaked.wav'??


Should work, if it doesn't work, use "\" instead if "/".
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Oct 14, 2007 3:30 pm    Post subject: Reply with quote

search for my music program. Read the source and you will learn

its in delphi btw

_________________
Back to top
View user's profile Send private message
Never Again
I post too much
Reputation: 0

Joined: 13 Jan 2007
Posts: 2000
Location: New Mexico

PostPosted: Sun Oct 14, 2007 3:41 pm    Post subject: Reply with quote

Damn, it doesn't work. It might just be becuase most of the songs I have on my CP are .mp3's
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Oct 15, 2007 3:42 am    Post subject: Reply with quote

try to use tmediaplayer like me.
here is a tut:
http://delphi.about.com/od/multimedia/l/aa112800b.htm
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Oct 15, 2007 4:29 am    Post subject: Reply with quote

lolx people need TuT on using tmediaplayer.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites