Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!mit-eddie!bbn.com!nic!news.cs.brandeis.edu!news!phils From: phils@chaos.cs.brandeis.edu (Phil Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: Has AppleSoundChip? Gestalt? How? Message-ID: Date: 16 Apr 91 18:21:33 GMT References: <1991Apr9.011011.29542@kuhub.cc.ukans.edu> Sender: usenet@news.cs.brandeis.edu Organization: Symantec Corp. Lines: 53 In-Reply-To: 2fmlcalls@kuhub.cc.ukans.edu's message of 9 Apr 91 06:10:11 GMT In article <1991Apr9.011011.29542@kuhub.cc.ukans.edu> 2fmlcalls@kuhub.cc.ukans.edu writes: How does one determine if the AppleSoundChip is present? I got my hands on the new Interface files for THINK Pascal (GestaltEqu most notably) and tried to blindly call Gestalt('hdwr',theResponse). From IM VI: gestaltSoundAttr - Returns information about the sound capabilities of the machine. (It's 'snd '.) CONST gestaltStereoCapability = 0; gestaltStereoMixing = 1; gestaltSoundIOMgrPresent = 3; gestaltBuiltInSoundInput = 4; gestaltHasSoundInputDevice = 5; If the bit gestaltStereoCapability is TRUE, the available hardware can play stereo sounds. The bit gestaltStereoMixing indicates that the sound hardware of the machine mixes both left and right channels of stereo sound into a single audio signal for the internal speaker. The gestaltSoundIOMgrPresent bit indicates that the new sound input routines are available, and the gestaltBuiltInSoundInput bit indicates that a built-in sound input device is available. The gestaltHasSoundInputDevice bit indicates that some sound input device is available. LINK_ERROR - Gestalt not implemented {or some such} If you're going to use the "new" Interfaces, then you must use the "new" libraries. If you use the new Interface.lib file, which is on the System 7 CD-ROM, then you shouldn't get this link error. If you don't have the System 7 disk, I can email (or post) a library that contains the glue for Gestalt. So, how does one use Gestalt with THINK Pascal 3.0? Or how can one determine if the ASC is present without a call to Gestalt? (And, related, like calling WNEvent, do you need to check for a TrapAvail before even considering a call to Gestalt?) Yes, you must check to see if Gestalt is avail before using the Gestalt Manager. Gestalt's trap is 0xA1AD. BTW, I have System 6.07 on an si. (I would think Gestalt would be in 6.07!?) Gestalt is in all systems after 6.0.4. -phil -- Phil Shapiro Technical Support Analyst Language Products Group Symantec Corporation Internet: phils@chaos.cs.brandeis.edu