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