Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!henry!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: ErrorSound() in Think C 4.0 Message-ID: Date: 7 Nov 90 00:04:28 GMT References: Organization: Gaia II Lines: 34 In-reply-to: hairston@henry.ece.cmu.edu's message of 4 Nov 90 01:54:31 GMT [hairston@henry.ece.cmu.edu (David Hairston) writes:] [] how do _you_ get this to work? actual examples preferred over [] conjecture, thanx ... kudos to: "Phil Shapiro" who provided a (ahem) sound example which worked. the example also reinforced the notion, RTFM, which i did but apparently not closely enough (i overlooked the short argument to MySoundProc, which isn't used in the example). this works (assuming your 'snd ' resource is preloaded and locked and has id 128, etc.): pascal void MySoundProc(short sndNum) { Handle mySound; OSErr err; mySound = GetResource('snd ', 128); err = SndPlay(0L, mySound, FALSE); } setup as in: ---------------- main() { ... Init(); ErrorSound(MySoundProc); ... Alert(...); ... } -dave- hairston@henry.ece.cmu.edu