Path: utzoo!attcan!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!sr0o+ From: sr0o+@andrew.cmu.edu (Steven Ritter) Newsgroups: comp.sys.mac.programmer Subject: Re: Playing sound files from Think C Message-ID: Date: 11 Jul 90 15:07:48 GMT References: <3140@PEDEV.Columbia.NCR.COM> Organization: Psychology, Carnegie Mellon, Pittsburgh, PA Lines: 23 In-Reply-To: <3140@PEDEV.Columbia.NCR.COM> SoundEdit (the software that goes with MacRecorder) will let you save the sound as an 'snd ' resource in your resource file. (In the save dialog, select your resource file and choose "resource" as the format). To play the sound from your program, just read in the resource and call SndPlay: MakeSound(sndName) int sndName; { Handle soundHandle; if ((soundHandle = GetResource('snd ',sndName)) != 0L) SndPlay(NIL_SOUND_CHANNEL, soundHandle, FALSE); } sndName is the resource ID; NIL_SOUND_CHANNEL is 0L (to play through the standard Mac sound channel) and the third argument is the value for "synchronous," which indicates whether other actions can happen during the playing of the sound. Hope this helps. Steve