home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19672 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1.7 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!liuida!isy!isy!ingemar
  3. From: ingemar@isy.liu.se (Ingemar Ragnemalm)
  4. Subject: Re: Background your Sound!
  5. Message-ID: <ingemar.724077533@isy>
  6. Sender: news@isy.liu.se (Lord of the News)
  7. Organization: Dept of EE, University of Linkoping
  8. References: <1992Dec09.173722.69189@uu0570.foggybottom.com> <1g7vhfINN146@agate.berkeley.edu>
  9. Date: 11 Dec 92 12:38:53 GMT
  10. Lines: 27
  11.  
  12. werner@dewey.soe.berkeley.edu (John Werner) writes:
  13.  
  14. >In article <1992Dec09.173722.69189@uu0570.foggybottom.com> Daniel_R._Sandler@uu0570.foggybottom.com writes:
  15. >>OK,ok, to the point:  How do I play sound while something else is ahppening,
  16. >>like so many games for the Mac, and even HyperCard?  If my games have to stop
  17. >>and pause to let a sound play, it really ruins the hole effect.
  18.  
  19. >It's not that hard.  Use SndPlay, with the last "async" parameter set
  20. >to TRUE.  The catch is that this only works if you're using your own
  21. >sound channel.  So the code looks something like this:
  22.  
  23. (code deleted)
  24.  
  25. Speaking of asynchronous sound, what are the "rules" about several channels
  26. open at once? I have tried to make two channels for sampled sounds (on an
  27. LC), to play a sequence of notes on one of them (with a snd installed as
  28. "instrument") and various sound effects on the other. I get "not enough
  29. hardware". What information have I missed? Can't I have two sampled sound
  30. channels, or can't I use one of them for melodies?
  31.  
  32. What can be done and what can't when using several channels?
  33.  
  34. -- 
  35. Ingemar Ragnemalm
  36. Dept. of Electrical Engineering         ...!uunet!mcvax!enea!rainier!ingemar
  37.                   ..
  38. University of Linkoping, Sweden         ingemar@isy.liu.se
  39.