AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi PlaySound-Wiedergabe unterbrechen
Thema durchsuchen
Ansicht
Themen-Optionen

PlaySound-Wiedergabe unterbrechen

Ein Thema von chkdsk · begonnen am 28. Nov 2004 · letzter Beitrag vom 29. Nov 2004
Antwort Antwort
chkdsk
(Gast)

n/a Beiträge
 
#1

PlaySound-Wiedergabe unterbrechen

  Alt 28. Nov 2004, 21:30
Hallo!

Habe in einem Spiel die Hintergrundmusik wie folgt realisiert:

PlaySound(PChar('music'), hInstance, snd_Loop or snd_ASync or snd_Resource);


Bloß wie kann ich das ganze jetzt wieder unterbrechen?
  Mit Zitat antworten Zitat
demonscave

Registriert seit: 29. Nov 2004
Ort: Troisdorf
3 Beiträge
 
#2

Re: PlaySound-Wiedergabe unterbrechen

  Alt 29. Nov 2004, 01:12
procedure TForm1.Button1Click(Sender: TObject);
begin
sndPlaySound(nil,0);
end;

Das sollte gehen...
  Mit Zitat antworten Zitat
Benutzerbild von Dani
Dani

Registriert seit: 19. Jan 2003
732 Beiträge
 
Turbo Delphi für Win32
 
#3

Re: PlaySound-Wiedergabe unterbrechen

  Alt 29. Nov 2004, 05:58
Hi,

ein kurzer Blick ins Platform SDK verrät:

Zitat:
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);

fdwSound
Flags for playing the sound. The following values are defined.

...

SND_PURGE

Sounds are to be stopped for the calling task. If pszSound is not NULL, all instances of the specified sound are stopped. If pszSound is NULL, all sounds that are playing on behalf of the calling task are stopped.
You must also specify the instance handle to stop SND_RESOURCE events.
Dani H.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:46 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz