home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14604 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.6 KB

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!decwrl!bu.edu!transfer!ceylon!choffman.gte.com!user
  2. From: chuck@gte.com (Chuck Hoffman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Still trying to get this stupid sound stuff to work...
  5. Message-ID: <chuck-270892101804@choffman.gte.com>
  6. Date: 27 Aug 92 14:19:00 GMT
  7. References: <1992Aug26.192610.14018@utkux1.utk.edu>
  8. Sender: news@ceylon.gte.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: GTE Laboratories
  11. Lines: 37
  12.  
  13. In article <1992Aug26.192610.14018@utkux1.utk.edu>, you wrote:
  14. > What is happening now is the sound sound starts playing,
  15. > the dialog comes up, but you cannot do anything until the sound 
  16. > finishes.  Check it out:
  17.  
  18. > [... left out some code...]
  19. >  begin
  20. >   mySndChan := nil;
  21. >   mySndHandle := GetResource('snd ', soundID);
  22. >   if mySndHandle <> nil then
  23. >    begin
  24. >     err := SndPlay(mySndChan, mySndHandle, kAsync);
  25. >     if err <> noErr then
  26. >      ExitToShell;
  27. >    end;
  28. >  end;
  29.  
  30.  
  31. I'm no Sound Mangager ace, but there's a paragraph in IM-V about SndPlay
  32. which says that if you specify a channel in "mySndChan" you can play the
  33. sound asynchronously, but if you specify nil, then you cannot (you have to
  34. wait for the sound to finish).  Maybe that's the problem.  Looks like you
  35. can get a non-nil channel pointer by using SndNewChannel.  Caution: this is
  36. from the book, not from experience.
  37.  
  38.  
  39. Chuck Hoffman
  40. chuck@gte.com
  41. GTE Laboratories, Waltham, Massachusetts, USA
  42. (617) 466-2131
  43. =====================================
  44. I'm not sure why we're here, but I am sure that while we're here we're
  45. supposed to help each other.
  46. =====================================
  47.