home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5376 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.2 KB  |  35 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!wupost!csus.edu!news
  3. From: eps@futon.SFSU.EDU (Eric P. Scott)
  4. Subject: Re: Using a sound in an application...
  5. Message-ID: <1992Jul31.060157.7029@csus.edu>
  6. Sender: news@csus.edu
  7. Reply-To: eps@cs.sfsu.edu
  8. Organization: San Francisco State University
  9. References: <30JUL92.17051704@enh.nist.gov> <1992Jul31.025720.901@jupiter.sun.csd.unb.ca>
  10. Date: Fri, 31 Jul 1992 06:01:57 GMT
  11. Lines: 22
  12.  
  13. In article <30JUL92.17051704@enh.nist.gov> aoml@enh.nist.gov writes:
  14. >I have a sound that exists in my nib section.  How can I execute that sound
  15. >easily?
  16.  
  17. In article <1992Jul31.025720.901@jupiter.sun.csd.unb.ca>
  18.     mtj@unbsj.ca (Mike Jory) writes:
  19. >and whenever you want to play the sound:
  20. >SNDPlaySoundfile(filename,0);
  21.  
  22. That doesn't help, because the sound doesn't have a file name.
  23.  
  24.  
  25. You *could* use getsectdata(3) to "directly" obtain a
  26. SNDSoundStruct * and feed that to SNDStartPlaying(), but it's
  27. probably easier to use the SoundKit's Sound class
  28. (+addName:fromMachO: or +findSoundFor:), and -play that.
  29.  
  30. Remember that sound playback occurs in a separate thread, and
  31. you may want to use -waitUntilStopped or a -didPlay: delegate
  32. method to keep things synchronized.
  33.  
  34.                     -=EPS=-
  35.