unit reThreads;
interface
uses
Classes, Dialogs, MMSystem, Utilities ;
type
TMySoundThread = class(TThread)
private
{ Déclarations privées }
protected
procedure Execute; override;
public
id : Cardinal;
sf:array [0..11] of array [0..120] of char;
ptr:integer;
this:integer;
hmod: cardinal;
so : TSound;
vr:cardinal;
end;
implementation
{ Important : les méthodes et propriétés des objets de la VCL peuvent uniquement
être utilisés dans une méthode appelée en utilisant Synchronize, comme :
Synchronize(UpdateCaption);
où UpdateCaption serait de la forme
procedure TMyThread.UpdateCaption;
begin
Form1.Caption := 'Mis à jour dans un thread';
end; }
{ TMyThread }
procedure TMySoundThread.Execute;
begin
hmod:=0;
while true do begin
while sf[this] <> '' do begin
if Utilities.SoundCheck then begin
PlaySound(sf[this], hmod, SND_FILENAME);
end else
PCSounder(so);
sf[this] := '';
this := (this + 1) mod 12;
end;
Suspend;
end
end;
end.
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.
|