Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.hypercard Subject: Re: play/beep problems Message-ID: <10080@hoptoad.uucp> Date: 6 Feb 90 14:56:07 GMT References: <9895@hoptoad.uucp> <1935@cbnewsk.ATT.COM> <16286@boulder.Colorado.EDU> <9916@hoptoad.uucp> <16372@boulder.Colorado.EDU> <9960@hoptoad.uucp> <10033@hoptoad.uucp> <19138@dartvax.Dartmouth.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 33 In article <10033@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >> [ explanation of undocumented sound channel commands that hypercard issues ] > >>The XCMD can't give >>the undocumented commands itself because it has no way of getting at >>Hypercard's sound channel. In article <19138@dartvax.Dartmouth.EDU> mjm@eleazar.dartmouth.edu (Michael McClennen) writes: >Ah, but it can. The sound channels are organized as a linked list, with the >most recently added first. The first field of a SndChannel record is a pointer >to the next channel. If your XCMD allocates a channel, that field will contain >a pointer to HyperCard's channel. You can then deallocate your channel, and >use HyperCard's. Sure, if you don't mind depending on yet more undocumented behavior, and on certain assumptions (there is only one other channel, HyperCard's channel doesn't add any modifiers that make it unusable by you, etc.) which could easily cease to be true in the future. In short, this requires adding so much undocumented behavior that your own code is practically guaranteed to crash within a few years. Not that I don't appreciate the note -- it could be useful for some quick and dirty stuff. But the fact remains that HyperCard's sound channel behavior is a bug. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Gangsters would kidnap my math teacher, Miss Albertine, and I'd track them down and kill them one by one until she was free, and then she'd break off her engagement with my sarcastic English teacher, Mr. Richardson, because she'd fallen hopelessly in love with her grim-faced and silent fourteen-year-old savior." -- Nite Owl, in WATCHMEN by Alan Moore