Path: utzoo!utgpu!news-server.csri.toronto.edu!csri.toronto.edu!halpern Newsgroups: comp.sys.mac.programmer From: halpern@csri.toronto.edu (Charles Halpern) Subject: Sound manager problem Message-ID: <1990Mar18.195207.26065@jarvis.csri.toronto.edu> Distribution: net Date: 19 Mar 90 00:52:07 GMT Lines: 41 *** REPLACE THIS LINE WITH YOUR MESSAGE *** The following Think C 3.02 bombs on a Mac SE with no inits. I commucicated the code over the phone to someone using a Mac II, and again it bombed. Usually, though not always, the bomb occurs with the second SndNewChannel call. Variously, the problem is a bus error, odd address, illegal instruction, or the computer hangs. It even happens without the Multifinder or the Debugger. osErr is never set to anything but noErr. I presume that I am not understanding something. I am using IM 5, I haven't got the relevant tech notes. The code: #include void main () { OSErr osErr; SndChannelPtr channelP; channelP = 0L; osErr = SndNewChannel (&channelP, sampledSynth, 0L, 0L); osErr = SndDisposeChannel (channelP, TRUE); channelP = 0L; osErr = SndNewChannel (&channelP, sampledSynth, 0L, 0L); } That's the whole thing. (My problems started in a complete program, but I've shrunk it down to this with the same error.) Variations have included skipping the SndDisposeChannel, checking with availableCmd, varying the synthesizer asked for, etc. Thanks, Charlie Halpern halpern@toronto.edu