home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!decwrl!bu.edu!transfer!ceylon!choffman.gte.com!user
- From: chuck@gte.com (Chuck Hoffman)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Still trying to get this stupid sound stuff to work...
- Message-ID: <chuck-270892101804@choffman.gte.com>
- Date: 27 Aug 92 14:19:00 GMT
- References: <1992Aug26.192610.14018@utkux1.utk.edu>
- Sender: news@ceylon.gte.com
- Followup-To: comp.sys.mac.programmer
- Organization: GTE Laboratories
- Lines: 37
-
- In article <1992Aug26.192610.14018@utkux1.utk.edu>, you wrote:
- >
- > What is happening now is the sound sound starts playing,
- > the dialog comes up, but you cannot do anything until the sound
- > finishes. Check it out:
- >
-
- > [... left out some code...]
- >
- > begin
- > mySndChan := nil;
- > mySndHandle := GetResource('snd ', soundID);
- > if mySndHandle <> nil then
- > begin
- > err := SndPlay(mySndChan, mySndHandle, kAsync);
- > if err <> noErr then
- > ExitToShell;
- > end;
- > end;
-
-
- I'm no Sound Mangager ace, but there's a paragraph in IM-V about SndPlay
- which says that if you specify a channel in "mySndChan" you can play the
- sound asynchronously, but if you specify nil, then you cannot (you have to
- wait for the sound to finish). Maybe that's the problem. Looks like you
- can get a non-nil channel pointer by using SndNewChannel. Caution: this is
- from the book, not from experience.
-
-
- Chuck Hoffman
- chuck@gte.com
- GTE Laboratories, Waltham, Massachusetts, USA
- (617) 466-2131
- =====================================
- I'm not sure why we're here, but I am sure that while we're here we're
- supposed to help each other.
- =====================================
-