home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18252 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.0 KB  |  40 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!agate!dog.ee.lbl.gov!news!cod!frantzen
  3. From: frantzen@nosc.mil (Louise E. Frantzen)
  4. Subject: Problem with SndPlay after SetupSndHeader
  5. Message-ID: <1992Nov10.235941.977@nosc.mil>
  6. Keywords: sound SndPlay THINK C
  7. Organization: Naval Ocean Systems Center, San Diego, CA
  8. Date: Tue, 10 Nov 1992 23:59:41 GMT
  9. Lines: 29
  10.  
  11.  
  12. Hello everyone, 
  13.  
  14. I am having a problem with the SndPlay toolbox routine. First the background. 
  15. I am programming in THINK C 5.0 on a IIci running 7.1. I have done a little
  16. sound programming before with the wave table synthesizer, but this is my first
  17. attempt at the sampled sound synthesizer. I am computing the values I want to
  18. be in the sampled sound and then I use SetupSndHeader with all the proper
  19. parameters, passing a Handle as the first parameter. As I understood from 
  20. IM VI page 22-35, I should be able to call SndPlay( nil, Handle, TRUE) and 
  21. have the Sound Manager take care of allocating the proper amount of memory, 
  22. etc, and play the sound.  However, the program bombs severely right at the 
  23. SndPlay call ( I've checked it with the debugger) if I do this.  
  24.  
  25. I fooled around with it and came upon an option which does not cause the 
  26. program to bomb, but doesn't play the sound, either.  If I call SndNewChannel
  27. with a nil SndChannelPtr, and then call SndPlay(chan_ptr, Handle, TRUE) it 
  28. doesn't bomb, but all I hear is a slight clicking when the channel is 
  29. allocated.  Another peculiarity is if I call SndDisposeChannel after SndPlay,
  30. the program bombs in *that* call.  I am getting very frustrated with this 
  31. because IM VI seems to say that this should all be very simple.  Right :-\  
  32.  
  33. If anyone has any suggestions for me to try or know why this behaviour is 
  34. happening, please post to the net or email me at my address below. Thanks.
  35. -- 
  36.  
  37. -------------------------------------------------------------------------
  38. Louise Frantzen        "Well they say women shouldn't be the president
  39. NRaD, San Diego        'cause we go crazy from time to time.  Well push 
  40.