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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
  3. From: REEKES@applelink.apple.com (Jim Reekes)
  4. Subject: Re: Sound usage help
  5. Sender: news@gallant.apple.com
  6. Message-ID: <REEKES-121292203006@90.10.20.67>
  7. Date: Sun, 13 Dec 1992 04:32:20 GMT
  8. References: <1992Dec11.195917.7434@rtsg.mot.com>
  9. Organization: Apple Computer, Inc.
  10. Followup-To: comp.sys.mac.programmer
  11. Lines: 52
  12.  
  13. In article <1992Dec11.195917.7434@rtsg.mot.com>, wolfmc@rtsg.mot.com
  14. (Michael Wolf) wrote:
  15. > I had thought at one time I had the Sound Manager and compatibility issues
  16. > conquered, but some odd crashes have made me wonder.
  17. > First, what are the correct gestalts or methods of ensuring the environment
  18. > you are currently running on can run synchronous or asynchronously, how to
  19. > tell how stereo capabilities.
  20.  
  21. Gestalt will tell you if stereo is available and if it's mixed to the
  22. internal speaker. All of the Sound Managers that have been released will
  23. perform asynchronously.
  24.  
  25. > The correct method of allocating a sound
  26. > channel (should I create my own SndChannel variable or let SndNewChannel do
  27. > it for me).
  28.  
  29. Just call SndNewChannel, unless you want to manage the memory yourself or
  30. wish to create a smaller SndChannel.
  31.  
  32. chan = nil;
  33. SndNewChannel(chan, sampledSynth, 0, CallBackProc);
  34.  
  35.   - or -
  36.  
  37. chan = GetSomeMemory(sizeof(YourChannel));
  38. chan->qLength = HowManyCommandsYourChannelHolds;
  39. SndNewChannel(chan, sampledSynth, 0, CallBackProc);
  40.  
  41.  
  42. > I looked through the tech notes (1-310 or so) on anything to do with sound,
  43. > but I did not see anything like I wanted to know.  I also looked through the
  44. > sample codes (1-30 or so) and nothing there for sound sample code.
  45. > So, is there some nice sample code available for doing the many wonderous
  46. > things with sound?
  47.  
  48. Then you didn't look hard enough.  Look for SoundApp.  It is official
  49. MacDTS sample code, written by yours truely.
  50.  
  51. > Also, I assume any machine which doesn't have an apple sound chip will not
  52. > be able to run asynchronous sounds?
  53.  
  54. See answer #1.
  55.  
  56. -----------------------------------------------------------------------
  57. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  58.                              |          Sound Manager Expert
  59. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  60. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  61. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  62.