mydew Posted May 27, 2006 Report Share Posted May 27, 2006 Mam pewien problem, a więc chcę, żeby w moim programie odtwarzał się dźwięk, więc użyłem PlaySound, ale odtwarzając ten dźwięk to znaczy ten plik wav zamula mi program - nic nie da sie zrobic aż przestanie grać. Co zrobić, żeby tak się nie działo :?: Link to comment Share on other sites More sharing options...
KKKas Posted May 27, 2006 Report Share Posted May 27, 2006 Wykonaj PlaySound w wątku (TThread). Deklarujesz typ: [code=Delphi] type TSfx = class (TThread) private Sound: String; XYBYH^X]NYNB[+jxw-^bpw&6VGW&RE6gWV7WFSŚ&Vvb6VćBfCfwCrrFVAąMĄA ĄĄM%ŃM9}IM=UI M9}94EFAULT); // tutaj sobie już dostosuj czy ma być grany z zashźHZ[HB[BŹ').ui'var Sfx: TSfx; begin Sfx := TSfx.Create(True); Sfx[H ^WYZIBYSZ[]HHYNB6g&W7VSŚVćC [/code] ҉ Link to comment Share on other sites More sharing options...
TSr Posted May 27, 2006 Report Share Posted May 27, 2006 Był na to prostszy sposób. Poszukaj w Helpie jakie stałe przyjmuje funkcja PlaySound. Jedna z nich powodowała ze odgrywanie dźwięku nie blokowało innych procesów, a nawet można uruchomić kilka dźwięków na raz. (chyba coś z ASYNC w nazwie, ale nie pamiętam) Ubuntu.pl user #10593 Link to comment Share on other sites More sharing options...
mydew Posted May 28, 2006 Author Report Share Posted May 28, 2006 dobra dzieki - wszystko dzialaEdit: A jak zrobic, by ta muzyka byla w zasobach ?? Nie wiem jak zrobic plik .res :?: Link to comment Share on other sites More sharing options...
TSr Posted May 28, 2006 Report Share Posted May 28, 2006 Takie coś też kiedyś robiłem, pomogło mi Google, więc pewnie Tobie też nie odmówi. Ubuntu.pl user #10593 Link to comment Share on other sites More sharing options...
KKKas Posted May 28, 2006 Report Share Posted May 28, 2006 Skorzystaj z jakiegoś edytora zasobów, np Restorator. ҉ Link to comment Share on other sites More sharing options...
Iskar Posted May 28, 2006 Report Share Posted May 28, 2006 [Delphi] przed nazwę tematu i zmień sam temat na bardziej opisowy. Link to comment Share on other sites More sharing options...
mydew Posted May 29, 2006 Author Report Share Posted May 29, 2006 Aha wszystko już jest ok 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.