Autor Beitrag
dac424
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Mi 16.02.05 21:53 
Hallo liebe Progger wie mach ich das am besten wenn ich ein Wave abspielen möchte.
es soll aber wärend des spielens mit dem rest in der Procedure gewartet werden bis das wave zu ende ist.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 16.02.05 21:58 
Schau dir mal SndPlaySound in der OH an (is in der mmsystem.pas)

AXMD
dac424 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Fr 18.02.05 20:34 
Titel: habe ich aber irgend wie blicke ich da nicht durch
Habe es echt versucht wenn jemand helfen kann wäre das echt klasse welchen befehl muss ich verwenden oder wer kann meinen Que3ltext derartig abändern das er wirklich wartet mit der Procedur bis das wave zu ende gespielt ist
ausblenden volle Höhe 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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
procedure TForm1.bakenzeitTimer(Sender: TObject);
 var
 ba:string;
 wa:string;
// wp   : TWaveProvider;


 //wave:string;
  {$J+} const CanPlay: Boolean = True; {$J-}
       begin
       if (form3.Bake.Checked = true) then begin
     //  wp := TWaveProvider.Create('bake1.wav');
       // ein paar Infos über's Wave ausgeben  
   //   Memo1.Lines.Add(+IntToStr(wp.DataHeader.length div wp.FormatData.AvgBytesPerSec));






  check.Enabled:=false;
 bakenzeit.Interval:=(StrToInt(form3.bakenzeit.text))*1000 ;
 onoff.Picture.Bitmap.LoadFromResourceName(HInstance,'ON_BIT');
 if pin = 'dtr' then DTR(true);
 if pin2 = 'rts' then RTS(true);
 sleep (2000);
 canPlay :=True;
 if CanPlay then
  begin
  //ba:='+wave+';
 //   FreeAndNil(wp);
    sndPlaySound(PChar('bake1.wav'),SND_ASYNC);
    CanPlay := False;


 // sleep (20000);

 //check.Enabled:=true;
 if CanPlay then

muss hier warten bis Wave zu ende ist.


 if pin = 'dtr' then DTR(false);
 if pin2 = 'rts' then RTS(false);
   onoff.Picture.Bitmap.LoadFromResourceName(HInstance,'OFF_BIT');
 check.Enabled:=true;
 bakenzeit.Enabled:=false;
   end;
   end;
 end;


Moderiert von user profile iconAXMD: Code- durch Delphi-Tags ersetzt.