Autor Beitrag
Dr. Zoidberg
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 29

Win 95, Win XP Home
D3 Prof, D7 Pers
BeitragVerfasst: So 23.05.04 11:06 
Der Titel sagt ja alles.

Bitte sagt mir dann noch, was ich ändern muss, wenn sich die Musik automatisch wiederholen soll bzw. was ich ändern muss, wenn sie nur 1x gespielt werden soll.

Moderiert von user profile iconPeter Lustig (12:25, 23.05.2004): Topic verschoben
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 23.05.04 12:53 
ja das ist sehr einfach, da gibst zwei möglichkeiten:

1. du schaust dir fmod an(www.fmod.de)
2. das machst das mit dem mediaplayer(unter system)
ich meine da gibst ne eigenschaft nams loop oder so, mit der du die musik entlos wieder hohlen kannst und wenn nicht dann mache es so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if mediaplayer1.mode = mpStopped then  begin
  mediaplayer1.open; // evtl.
  Mediaplayer1.play;
end;


das fügst du in einer timer komponenten ein und fertig......

3. über WinApi:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Uses
   MMSystem


 
 
function PlayWav(const FileName: string): Boolean;
begin
  Result := PlaySound(PChar(FileName), 0, SND_ASYNC);
end;

procedure StopWav;
var
  buffer: array[0..2] of char;
begin
  buffer[0] := #0;
  PlaySound(Buffer, 0, SND_PURGE);
end;




//Wave abspielen

procedure TForm1.Button1Click(Sender: TObject);
begin
  PlayWav('c:\windows\media\ChatInvt.wav');
end;

_________________
MFG
Michael Springwald, "kann kein englisch...."
150gozilla
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 37

Windows XP Pro
Delphi5 Pro
BeitragVerfasst: Fr 26.08.05 14:09 
wie kann man es einstellen, das er das lied automatisch startet ?

eine .mp3 datei
Amateur
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 777

(Win98, WinMe) WinXP Prof
D3 Prof, D6 Pers, D2k5 Pers., Turbo C++ Explorer
BeitragVerfasst: Fr 26.08.05 17:16 
user profile icon150gozilla hat folgendes geschrieben:
wie kann man es einstellen, das er das lied automatisch startet ?

eine .mp3 datei


steht alles in deinem thread!!!

_________________
"Kein dummes Gerede. Kein Rumrätseln. Denkt an nichts anderes mehr, nur noch an das, was vor euch liegt. Das ist die wahre Herausforderung. Ihr müßt euch vor euch selbst schützen, Leute." (Rennes in "Cube")
Beiträge: >700
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Sa 27.08.05 17:04 
ich schreibe gerade eine neue FMOD unit mit Playlist Klasse, da musst nur nur deine lieder angeben und die richtung ob nun vor oder rückwärtzt oder zufall....

aber mit dem Mediaplayer dürfte das auch kein problem sein schau mal in der hilfe unter:
TMediaPlayer.Mode nach

_________________
MFG
Michael Springwald, "kann kein englisch...."