home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!gatech!utkcs2!utkux1.utk.edu!danny@utkux1.utk.edu
- From: danny@utkux1.utk.edu (Danny W. McCampbell)
- Newsgroups: comp.sys.mac.programmer
- Subject: Sound Loop in a with a Modal Dialog?
- Message-ID: <1992Sep3.145524.8874@utkux1.utk.edu>
- Date: 3 Sep 92 14:55:24 GMT
- Sender: usenet@utkux1.utk.edu (USENET News System)
- Organization: University of Tennessee
- Lines: 24
-
- Hi. I want to play a sound continuously while a modal dialog is
- present on the screen. I have successfully go the loop to work
- without the modal dialog statement but the loop is only executed
- twice when I call modal dialog. Here is some sample code:
-
- dialogtrue := true;
- while dialogtrue do
- begin
- FlushSndChannel(mySndChan);
- if SoundisStopped(mySndChan) then
- begin
- PlaytheSound(mySndChan);
- end;
- ModalDialog(nil, itemHit); {Call Modal Dialog until the user clicks in the dialog}
- if itemHit = 1 then
- dialogtrue := false;
- end;
- StoptheSound(mySndChan);
- DisposDialog(AboutDialog); {Dispose of the Dialog}
-
- The sound plays only twice then stops playing. Any ideas how I can
- do this successfully? Thanks in advance.
-
- Danny McCampbell
-