home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-152.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  47.1 KB  |  1,156 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Sun, 02 Aug 92       Volume 1 : Issue 152
  2.  
  3. Today's Topics:
  4.  
  5.     Proposal for Mac Source code representation
  6.     SendFinderOpen
  7.     garbage sound from SndPlay
  8.  
  9.  
  10.  
  11. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  12.  
  13. The digest is a collection of article threads from the internet newsgroup
  14. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  15. regularly and want an archive of the discussions.  If you don't know what a
  16. newsgroup is, you probably don't have access to it.  Ask your systems
  17. administrator(s) for details.  (This means you can't post questions to the
  18. digest.)
  19.  
  20. Each issue of the digest contains one or more sets of articles (called
  21. threads), with each set corresponding to a 'discussion' of a particular
  22. subject.  The articles are not edited; all articles included in this digest
  23. are in their original posted form (as received by our news server at
  24. cs.uoregon.edu).  Article threads are not added to the digest until the last
  25. article added to the thread is at least one month old (this is to ensure that
  26. the thread is dead before adding it to the digest).  Article threads that
  27. consist of only one message are generally not included in the digest.
  28.  
  29. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  30. [128.223.8.8] in the directory /pub/mac/csmp-digest.  The most recent issues
  31. are available from sumex-aim.stanford.edu [36.44.0.6] in the directory
  32. /info-mac/digest/csmp.  If you don't have ftp capability, the sumex archive
  33. has a mail server; send a message with the text '$MACarch help' (no quotes)
  34. to LISTSERV@ricevm1.rice.edu for more information.
  35.  
  36. The digest is also available via email.  Just send a note saying that you
  37. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  38. automatically receive each new issue as it is created.  Sorry, back issues
  39. are not available through the mailing list.
  40.  
  41. Send administrative mail to mkelly@cs.uoregon.edu.
  42.  
  43.  
  44. -------------------------------------------------------
  45.  
  46. From: ggw@wolves.uucp (Gregory G. Woodbury)
  47. Subject: Proposal for Mac Source code representation
  48. Date: 17 Jun 92 07:00:22 GMT
  49. Organization: Wolves Den UNIX
  50.  
  51. In the heat of the discussion about comp.sources.mac it becomes obvious
  52. that there is a problem with the way that sources for Macintosh programs
  53. are packaged.
  54.  
  55. On reflection this is obviously the result of the situation that current
  56. Mac development environments provide a multi-mode form of handling the
  57. fact that a Mac program consists of more than the ASCII codes of the
  58. statements in the programming language in use -- there are resources
  59. that are usually NOT composed in an ASCII plaintext form (via ResEdit),
  60. and there is no plaintext way to describe such factors as code
  61. segmenting and loader grouping.
  62.  
  63. I suggest that the Mac net.community needs to get together and define a
  64. way to address this issue so that we can start sharing source code in a
  65. uniform and portable manner.
  66.  
  67. As a beginning, here are some of my thoughts on the issue.
  68.  
  69. 1.  Functions written in a source language can be published in ASCII
  70. form.  There should be an agreement on the settings of tab positions, or
  71. a header that describes the tab positions.  Certain characters can be
  72. represented via something akin to the C backslash escape mechanism.
  73.  
  74. 2.  The sources in ASCII can have a checksum or CRC-type value attached
  75. to insure proper transmission of the source code.
  76.  
  77. 3.  Binary data (like resources) should appear in standard .hqx form.
  78. Something similar is a standard occurrence in sources appearing on the
  79. comp.sources.x groups for binary based data.
  80.  
  81. 4.  A tabular description syntax should be developed that describes code
  82. segmentation/loader grouping information.
  83.  
  84. 5.  Other things that I've missed should be nailed down.
  85.  
  86.  
  87. It would not be to hard to develop a small application that can be
  88. pointed at a set of files on the Mac that will examine the files and
  89. generate the appropriate ASCII  form files and .hqx files for resources.
  90. About the only thing to  be done by hand might be the segmentation
  91. descriptions, and more knowledgeable folks than I might be able to
  92. provide a means to automagically generate such information from an MPW
  93. or THINK project file.
  94.  
  95. There is enough desire for Mac sources to be made available, that it is
  96. well worth *our* effort to get this worked out so that they can be made
  97. available.
  98.  
  99. The ball is in our court.
  100.  
  101.                     Greg Woodbury
  102. - -- 
  103. Gregory G. Woodbury @ The Wolves Den UNIX, Durham NC
  104. UUCP: ...dukcds!wolves!ggw   ...duke!wolves!ggw           [use the maps!]
  105. Domain: ggw@cds.duke.edu     ggw%wolves@duke.cs.duke.edu
  106. [The line eater is a boojum snark! ]           <standard disclaimers apply>
  107.  
  108. +++++++++++++++++++++++++++
  109.  
  110. From: zben@ni.umd.edu (Charles B. Cranston)
  111. Organization: UM Home for the Terminally Analytical
  112. Date: Wed, 17 Jun 1992 17:06:12 GMT
  113.  
  114. In article <1992Jun17.070022.4916@wolves.uucp>,
  115. ggw@wolves.uucp (Gregory G. Woodbury) writes:
  116.  
  117. > In the heat of the discussion about comp.sources.mac it becomes obvious
  118. > that there is a problem with the way that sources for Macintosh programs
  119. > are packaged.
  120. > ...
  121. > 1.  Functions written in a source language can be published in ASCII
  122. > form.  There should be an agreement on the settings of tab positions, or
  123. > a header that describes the tab positions.  Certain characters can be
  124. > represented via something akin to the C backslash escape mechanism.
  125. > ...
  126.  
  127. This might be a good time to take a look at the character representation
  128. standards being developed by the Internet community in support of the MIME
  129. (Multipurpose Internet Mail Extension) standard:
  130.  
  131. RFC1341 MIME (Multipurpose Internet Mail Extension)
  132.         Mechanisms for Specifying and Describing the Format of
  133.         Internet Message Bodies
  134.  
  135. RFC1342 Representation of Non-ASCII Text in Internet Message Headers
  136.  
  137. RFC1345 Character Mnemonics & Character Sets
  138.  
  139. With the Macintosh's rich (i.e. more than ASCII) character set this could
  140. be a big win.  Here's an abstract of 1345:
  141.  
  142.    "This memo lists a selection of characters and their presence in some
  143.    coded character sets.  To facilitate the coded character set
  144.    tabulations an unambiguous mnemonic for each character is used, and a
  145.    format for tabulating the coded character sets is defined. The coded
  146.    character sets are given names for easy reference.  A family of coded
  147.    character sets called the mnemonic character sets and conversion
  148.    between these coded character set without information loss is defined."
  149.  
  150. Also consider this quote from a letter-to-the-editor in Communications
  151. Week (#407 June 15, 1992):
  152.    
  153.    "As co-author of the MIME specification I read your article on MIME
  154.     with considerable interest. ...  MIME initially provides for use of
  155.    the ISO 8859 family of charactersets in addition to ASCII ... it also
  156.    sets up a registry so that additional character sets can be defined
  157.    and registered in the future as they are needed. ...  Support for
  158.    ISO 10646 will undoubtedly be added once it becomes a full standard.
  159.    ...Ned Freed ... Innosoft International Inc."
  160.  
  161.  
  162. Actually, one could probably build a Macintosh file "body type" for MIME
  163. and get an ASCII text representation essentially free...
  164.  
  165.  
  166. +++++++++++++++++++++++++++
  167.  
  168. From: lim@iris.ucdavis.edu (Lloyd Lim)
  169. Date: 17 Jun 92 17:56:34 GMT
  170. Organization: U.C. Davis - Department of Computer Science
  171.  
  172. In article <1992Jun17.070022.4916@wolves.uucp> duke.cs.duke.edu!wolves!ggw writes:
  173. >
  174. >3.  Binary data (like resources) should appear in standard .hqx form.
  175. >Something similar is a standard occurrence in sources appearing on the
  176. >comp.sources.x groups for binary based data.
  177.  
  178. Well, if we could post .hqx files into comp.sources.mac in the first place,
  179. we wouldn't have this problem.  Unless things change, .hqx won't work
  180. because it won't be accepted for posting.
  181.  
  182. We _could_ Derez the resources.  The result is plain text, except for any
  183. 8 bit characters that would have to be handled, just as with the source code.
  184.  
  185. >5.  Other things that I've missed should be nailed down.
  186.  
  187. This isn't a criticism; just more thoughts on how to get this to work...
  188.  
  189. Personally, I think it'd be easiest if we could use the tools we already
  190. use: StuffIt and BinHex.  (StuffIt/BinHex also uses less bandwidth than
  191. plain text.)  If someone who knows the process could put out a CFD and CFV
  192. (or whatever) to change c.s.m., then it might be solved relatively quickly.
  193. And then we could all spend our time more productively writing new games.  :-)
  194.  
  195. +++
  196. Lloyd Lim               Internet: lim@cs.ucdavis.edu
  197. 224 Leach Hall          America Online: LimUnltd
  198. U.C. Davis              AppleLink: LimUnltd
  199. Davis, CA  95616        CompuServe: 72647,660
  200.  
  201. +++++++++++++++++++++++++++
  202.  
  203. From: fry@zariski.harvard.edu (David Fry)
  204. Date: 17 Jun 92 19:53:15 GMT
  205. Organization: Harvard Math Department
  206.  
  207. In article <1992Jun17.070022.4916@wolves.uucp> duke.cs.duke.edu!wolves!ggw writes:
  208. >In the heat of the discussion about comp.sources.mac it becomes obvious
  209. >that there is a problem with the way that sources for Macintosh programs
  210. >are packaged.
  211. >
  212. >On reflection this is obviously the result of the situation that current
  213. >Mac development environments provide a multi-mode form of handling the
  214. >fact that a Mac program consists of more than the ASCII codes of the
  215. >statements in the programming language in use -- there are resources
  216. >that are usually NOT composed in an ASCII plaintext form (via ResEdit),
  217. >and there is no plaintext way to describe such factors as code
  218. >segmenting and loader grouping.
  219.  
  220. Why is this necessary? If the answer is so that non-MacPeople will
  221. allows us to send our Mac source to comp.sources.mac, I say "tough for
  222. them," let's just send .hqx files.  If there's something so general
  223. about Mac source listing that it would aid non-MacPeople, then it
  224. could just be listed separately without resources, linking, etc.
  225. If the USENET gods insist we can't send .hqx files to
  226. comp.sources.mac, then send them to comp.binaries.mac or some other
  227. forum.  Make them available for ftp.
  228.  
  229. For those that really want to have ASCII representations, MPW programmers
  230. can supply a Makefile that describes all the linking steps.  THINK
  231. users could just write down that information, or use an FKEY out there
  232. that collects the information from an open project file.  As for
  233. resources, MPW has Rez and DeRez and THINK has SARez and SADeRez
  234. (which are compatible I believe) to create ASCII representations of
  235. resources.  Maybe a tabular systems of describing the linking would be
  236. nice, but I really think it's a lot of effort for nothing.
  237.  
  238. Actually, THINK project files are just resource forks anyway, so you could
  239. SARez them as well. :-)  If SARez is used to its greatest use, this
  240. might even be the best way to distribute link information.
  241.  
  242. I know there are other environments out there, but they are vastly
  243. outweighed by MPW and THINK.
  244.  
  245. >I suggest that the Mac net.community needs to get together and define a
  246. >way to address this issue so that we can start sharing source code in a
  247. >uniform and portable manner.
  248. >
  249. >As a beginning, here are some of my thoughts on the issue.
  250. >
  251. >1.  Functions written in a source language can be published in ASCII
  252. >form.  There should be an agreement on the settings of tab positions, or
  253. >a header that describes the tab positions.  Certain characters can be
  254. >represented via something akin to the C backslash escape mechanism.
  255. >
  256. >2.  The sources in ASCII can have a checksum or CRC-type value attached
  257. >to insure proper transmission of the source code.
  258. >
  259. >3.  Binary data (like resources) should appear in standard .hqx form.
  260. >Something similar is a standard occurrence in sources appearing on the
  261. >comp.sources.x groups for binary based data.
  262.  
  263. If we're going to give in and post Binhex data for this, why not just
  264. distribute the whole thing in binhex?
  265.  
  266. >4.  A tabular description syntax should be developed that describes code
  267. >segmentation/loader grouping information.
  268. >
  269. >5.  Other things that I've missed should be nailed down.
  270.  
  271. These are all good ideas, but I again wonder why this is necessary. I
  272. think it's the habit of the net.community to build structure and
  273. formalism just because we enjoy the process. I think it would be cool to have
  274. a program that I could point at a set of files and have it produce an
  275. ASCII representation, but I don't think the value of this is worth the
  276. effort, not to mention all the future effort of people straining to
  277. conform to it, and the future nitpicking of people who don't conform
  278. to it.  
  279.  
  280. As an example of the net getting carried away with itself consider the
  281. alt.binaries.* groups which have associated alt.binaries.*.d
  282. discussion groups.  You're not supposed to post a text file to the binary 
  283. group except under penalty of death, but people -- both those that
  284. know better and those that don't -- do all the time.  Now there's
  285. continual picking at people who post text files to the binary
  286. groups, including one person who has an automatic system of sending
  287. mail to people who do it telling them not to.  Who cares???!!
  288. How much effort has been spent on this silly issue?
  289. Let's not fall into a similar trap with this one.
  290.  
  291. Besides, I don't think it would induce people to distribute any more
  292. Mac sources.
  293.  
  294. >There is enough desire for Mac sources to be made available, that it is
  295. >well worth *our* effort to get this worked out so that they can be made
  296. >available.
  297.  
  298. I think people can make their sources available already.
  299.  
  300. David Fry                               fry@math.harvard.EDU
  301. Division of Applied Sciences            fry@huma1.bitnet
  302. Harvard University                      ...!harvard!huma1!fry
  303. Cambridge, MA  02138            
  304.  
  305. +++++++++++++++++++++++++++
  306.  
  307. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  308. Organization: University of Illinois at Urbana-Champaign
  309. Date: Fri, 19 Jun 1992 16:51:52 GMT
  310.  
  311. fry@zariski.harvard.edu (David Fry) writes:
  312. >If the USENET gods insist we can't send .hqx files to comp.sources.mac
  313.  
  314. The only god we have to worry about is the moderator of comp.sources.mac.
  315.  
  316. I, too, think it's silly to ban .hqx files from the group.
  317. - -- 
  318. Steve Dorner, U of Illinois Computing Services Office
  319. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  320.  
  321. +++++++++++++++++++++++++++
  322.  
  323. From: sold@kit.uni-kl.de (Christoph Sold)
  324. Organization: Universitaet Kaiserslautern
  325. Date: Fri, 19 Jun 1992 20:18:02 GMT
  326.  
  327. In article <1992Jun17.070022.4916@wolves.uucp> ggw@wolves.uucp
  328.  (Gregory G. Woodbury) writes:
  329. >From: ggw@wolves.uucp (Gregory G. Woodbury)
  330. >Subject: Proposal for Mac Source code representation
  331. >Date: 17 Jun 92 07:00:22 GMT
  332.  
  333. >In the heat of the discussion about comp.sources.mac it becomes obvious
  334. >that there is a problem with the way that sources for Macintosh programs
  335. >are packaged.
  336.  
  337. > [...]
  338.  
  339. >I suggest that the Mac net.community needs to get together and define a
  340. >way to address this issue so that we can start sharing source code in a
  341. >uniform and portable manner.
  342.  
  343.  
  344.     This seems to be a big problem. As a sabbatical MPW user, I love
  345.     projector databases. Another sabbatical user will just die for
  346.     Think's project files. Yet another one will write code using
  347.     a the PD Oberon from ETH. All of these files use plain ASCII
  348.     to represent the source text in the data fork, and put their
  349.     special resources into the resource fork. Thus, plain ASCII will
  350.     loose information.
  351.  
  352. >As a beginning, here are some of my thoughts on the issue.
  353.  
  354. >1.  Functions written in a source language can be published in ASCII
  355. >form.  There should be an agreement on the settings of tab positions, or
  356. >a header that describes the tab positions.  Certain characters can be
  357. >represented via something akin to the C backslash escape mechanism.
  358.  
  359.     I don't agree. Event I use different tab settings for assembler,
  360.     Pascal, and C sources.
  361.  
  362. >2.  The sources in ASCII can have a checksum or CRC-type value attached
  363. >to insure proper transmission of the source code.
  364.  
  365.     Why define just another checksum standard? MacBinary does this
  366.     all for you, why don't you want to use it?
  367.  
  368. > [...]
  369.  
  370. >4.  A tabular description syntax should be developed that describes code
  371. >segmentation/loader grouping information.
  372.  
  373.     I agree. I just hate Think C sources without any segmentation
  374.     notices. (Think uses its project file to segment the source.)
  375.  
  376. >5.  Other things that I've missed should be nailed down.
  377.  
  378.     As of today, exchanging source works fine for me. If I got MPW
  379.     source, bingo! all's well. Think C or Pascal sources will be 
  380.     properly read when transmitted as binary. Plain text will work,
  381.     too. The one and only thing I beg for: Always use a standard
  382.     compressor to archive your source into one file, .hqx it and
  383.     off it goes.    
  384.  
  385. > [...]
  386. >The ball is in our court.
  387.  
  388.     I returned it. Write on!
  389.  
  390. - -Christoph
  391.  
  392. Christoph P. Sold                   CATS Software GmbH
  393.                                     Mussbacher Landstr.2
  394.                                     W-6730 Neustadt (Weinstrasse)
  395. ger.xse0035@applelink.apple.com     Germany
  396.  
  397. "If an apple is fun, what the heck is an appletree?"
  398.  
  399. +++++++++++++++++++++++++++
  400.  
  401. From: neeri@iis.ethz.ch (Matthias Neeracher)
  402. Organization: Integrated Systems Laboratory, ETH, Zurich
  403. Date: Mon, 22 Jun 1992 14:45:57 GMT
  404.  
  405. In article <1992Jun17.155317.13207@husc3.harvard.edu> fry@zariski.harvard.edu (David Fry) writes:
  406. >In article <1992Jun17.070022.4916@wolves.uucp> duke.cs.duke.edu!wolves!ggw writes:
  407. >[Remarks that I agree with deleted]
  408. >
  409. >For those that really want to have ASCII representations, MPW programmers
  410. >can supply a Makefile that describes all the linking steps.
  411.  
  412. No. It is not possible to write a Makefile for MPW using purely ASCII
  413. characters, since the dependence sign (The Integral/Folder sign) is not ASCII.
  414. I think this example alone should show clearly enough that any ASCII
  415. representation for Macintosh sources necessarily has to be artificial and
  416. unreadable for humans.
  417.  
  418. Another argument that especially applies to us foreign language developers:
  419. Many of us appreciate the fact that the Macintosh has a standard set of
  420. accented characters, and would hate to give up their freedom of writing
  421. comments and string literals in their native language for the sake of ASCII
  422. compatibility.
  423.  
  424. >  As for
  425. >resources, MPW has Rez and DeRez and THINK has SARez and SADeRez
  426. >(which are compatible I believe) to create ASCII representations of
  427. >resources.  Maybe a tabular systems of describing the linking would be
  428. >nice, but I really think it's a lot of effort for nothing.
  429.  
  430. I agree. Most Mac programs are inherently nonportable to other architectures,
  431. anyway (Hey, that SPARCstation on my desk is supposed to be a computer and
  432. doesn't even understand Gestalt()).
  433.  
  434. >These are all good ideas, but I again wonder why this is necessary.
  435.  
  436. So do I. Here are my thoughts on the issue:
  437.  
  438. 1) Sources on a Mac newsgroup should be represented in a form that is both
  439.    transportable and *natural* for Mac users.
  440. 2) On the other hand, sources should be readable on a UNIX system.
  441. 3) BinHex Encoding serves both 1) and 2). The Mac character set and the
  442.    resource file format present some problems to reading the information on the
  443.    UNIX side, but both are well documented.
  444. 4) The choice of a compression format is slightly more problematic. IMHO,
  445.    submitters to comp.sources.macintosh should be required to use a compression
  446.    format that can be decompressed by an UNIX host. Stuffit 1.5.1 format is
  447.    well documented, and there exist decompressors for UNIX. Are there any other
  448.    formats for which this condition holds ?
  449.  
  450. Matthias
  451.  
  452. - -----
  453. Matthias Neeracher                                      neeri@iis.ethz.ch
  454.   "And that's why I am going to turn this world upside down, and make
  455.    of it a fire so *bright* that someone real will notice"
  456.                                 -- Vernor Vinge, _Tatja Grimm's World_
  457.  
  458. +++++++++++++++++++++++++++
  459.  
  460. From: mxmora@unix.SRI.COM (Matt Mora)
  461. Date: 22 Jun 92 16:16:44 GMT
  462. Organization: SRI International, Menlo Park, California
  463.  
  464. In article <Bq3quI.9A@news.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  465. >fry@zariski.harvard.edu (David Fry) writes:
  466. >>If the USENET gods insist we can't send .hqx files to comp.sources.mac
  467.  
  468. >The only god we have to worry about is the moderator of comp.sources.mac.
  469.  
  470. >I, too, think it's silly to ban .hqx files from the group.
  471.  
  472.  
  473. Here! Here! I think its stupid to put so many conditions on a gift. Let the
  474. poster post what ever she wants since she is nice enough to freely give
  475. out source code. Why punish her by making her follow some stupid rules?
  476. I hope all sources come by as hqx files, including the project file and
  477. resources need to run the project. (if it needs them). Also if its just
  478. a routine, it would be nice to include a test program to show how it works.
  479.  
  480. Matt
  481.  
  482. - -- 
  483. ___________________________________________________________
  484. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  485. SRI International           |  my unix  mxmora@unix.sri.com
  486. ___________________________________________________________
  487.  
  488. +++++++++++++++++++++++++++
  489.  
  490. From: ggw@wolves.uucp (Gregory G. Woodbury)
  491. Date: 23 Jun 92 04:15:05 GMT
  492. Organization: Wolves Den UNIX
  493.  
  494. fry@zariski.harvard.edu (David Fry) writes:
  495. ><1992Jun17.070022.4916@wolves.uucp> I wrote:
  496. >>In the heat of the discussion about comp.sources.mac it becomes obvious
  497. >>that there is a problem with the way that sources for Macintosh programs
  498. >>are packaged.
  499. >>
  500. >Why is this necessary? If the answer is so that non-MacPeople will
  501. >allows us to send our Mac source to comp.sources.mac, I say "tough for
  502. >them," let's just send .hqx files. . . .
  503. >If the USENET gods insist we can't send .hqx files to
  504. >comp.sources.mac, then send them to comp.binaries.mac or some other
  505. >forum.  Make them available for ftp.
  506.  
  507.     There is no reason that sources couldn't be posted in .hqx form
  508. on comp.sources.mac (other than the moderators reluctance to declare a
  509. change based on a situation that has changed dramatically since the
  510. group was first established)  BUT, which format are you going to use?
  511.  
  512.     I am still using an older version (3.??) of Think C (lazy about
  513. upgrading and the boss is cheap) and can't really deal with project
  514. files from the latest and greatest version.  There is also no way for
  515. me to benefit from the similar packageing provided by MPW.  There are
  516. also other development systems out there that use incompatible file
  517. formats.  It is not just a question of .hqx files.
  518.  
  519.     Additionally, there are a lot of folks out there who don't have
  520. access to FTP!  Even anonymous UUCP is a problem for some folks.  I have
  521. an anonymous uucp archive here at wolves, and the mac stuff is hardly
  522. ever touched.  [9194937111 login:uanon (no passwd) /news/Archives/toc.Z
  523. or /news/Archives/Binaries/mac/MacBin.index]
  524.  
  525. >I know there are other environments out there, but they are vastly
  526. >outweighed by MPW and THINK.
  527.  
  528.     So, you'll just ignore them?
  529.  
  530. >>3.  Binary data (like resources) should appear in standard .hqx form.
  531. >>Something similar is a standard occurrence in sources appearing on the
  532. >>comp.sources.x groups for binary based data.
  533. >
  534. >If we're going to give in and post Binhex data for this, why not just
  535. >distribute the whole thing in binhex?
  536.  
  537.     Because we are dealing with data that is hard to deal with in a
  538. plaintext format.  Bitmaps for X and other stuff in various groups that
  539. is not well represented in ASCII should be encoded.
  540.  
  541. >>There is enough desire for Mac sources to be made available, that it is
  542. >>well worth *our* effort to get this worked out so that they can be made
  543. >>available.
  544. >
  545. >I think people can make their sources available already.
  546.  
  547. Sure, they can, but for some reason, they *are not* doing so!
  548.  
  549. I suspect it is due to the dearth of postings in comp.sources.mac.  In
  550. fact, there is a source package that was just posted to
  551. comp.binaries.mac!  There is no reason (other than Roger's opinion) for
  552. it to have not be at least cross-posted to comp.sources.mac as well.
  553.  
  554.  
  555. Additionally, you asked why do it in ASCII.  This machine is not a Mac,
  556. and there isn't a mac near it to make it easy to decode the stuff.  If I
  557. get something that I want to take a look at in the mac groups, I have to
  558. mail it to my office, spool it there, ftp it somehow to the mac, decode
  559. it (after recombining the parts), unstuff/uncompress it, and then look
  560. at it to see if I can interpret it in the development environment I
  561. have.
  562.  
  563. Since most of my reading and research is done here, I'd much rather see
  564. the ASCII code of the programs simply to see how the various programmers
  565. do the things that I seem to have trouble with (despite having all the
  566. Apple books and a fair collection of others as well.)  [For example, I
  567. have some scrolling text in a window - e.g. a debugging log  - and I
  568. have a little bit of trouble totally comprehending how the scroll bars
  569. and their values are used to allow full scroll-bar functionality.  I
  570. have it working after a fashion, but it's not the same as all the other
  571. mac programs do, and the users complain that they have to think twice
  572. about how this program differs.   Two or three programs that do the
  573. scroll-bars right would be invaluable to me in terms of showing me how
  574. to do them right.]
  575.  
  576. I'm also fairly sure that there are a fair number of non-Mac-programmers
  577. would be interested in being able to read some mac sources to be able to
  578. learn a bit about mac programming in their spare time.  Event-driven
  579. interfaces are getting more and more common, and techniques developed
  580. for the Mac are applicable all over the programming map.
  581.  
  582. There is a distressing tendancy for the Mac development world to get too
  583. wrapped up in itself and forget that there are lots of other people out
  584. there who would like to avoid re-inventing the wheel.  There is much
  585. more to usenet than comp.*.mac.* groups!
  586. - -- 
  587. Gregory G. Woodbury @ The Wolves Den UNIX, Durham NC
  588. UUCP: ...dukcds!wolves!ggw   ...duke!wolves!ggw           [use the maps!]
  589. Domain: ggw@cds.duke.edu     ggw%wolves@duke.cs.duke.edu
  590. [The line eater is a boojum snark! ]           <standard disclaimers apply>
  591.  
  592. +++++++++++++++++++++++++++
  593.  
  594. From: neeri@iis.ethz.ch (Matthias Neeracher)
  595. Organization: Integrated Systems Laboratory, ETH, Zurich
  596. Date: Tue, 23 Jun 1992 11:44:27 GMT
  597.  
  598. In article <1992Jun23.041505.16908@wolves.uucp> ggw@wolves.uucp (Gregory G. Woodbury) writes:
  599. >    There is no reason that sources couldn't be posted in .hqx form
  600. >on comp.sources.mac (other than the moderators reluctance to declare a
  601. >change based on a situation that has changed dramatically since the
  602. >group was first established)  BUT, which format are you going to use?
  603.  
  604. A valid objection. How about the following:
  605.  
  606. - - 'TEXT' files for sources
  607. - - ResEdit or {SARez,Rez} files for resources.
  608. - - 'PICT' or 'MPNT' for graphic data
  609. - - TextEdit, MacWrite, or MS Word files for documentation.
  610. - - Optionally Think or MPW project files, as long as Text files are also
  611.   included. 
  612. - - Encoded in BinHex/Stuffit Classic format
  613.  
  614. >>I know there are other environments out there, but they are vastly
  615. >>outweighed by MPW and THINK.
  616. >
  617. >    So, you'll just ignore them?
  618.  
  619. I don't know whether it would be a good idea to distribute SmallTalk, Neon, or
  620. J sources via comp.binaries.mac
  621.  
  622. >>If we're going to give in and post Binhex data for this, why not just
  623. >>distribute the whole thing in binhex?
  624. >
  625. >    Because we are dealing with data that is hard to deal with in a
  626. >plaintext format.  Bitmaps for X and other stuff in various groups that
  627. >is not well represented in ASCII should be encoded.
  628.  
  629. As I said before, even Mac *text* file can not be that well represented in
  630. ASCII.
  631.  
  632. >Additionally, you asked why do it in ASCII.  This machine is not a Mac,
  633. >and there isn't a mac near it to make it easy to decode the stuff.  If I
  634. >get something that I want to take a look at in the mac groups, I have to
  635. >mail it to my office, spool it there, ftp it somehow to the mac, decode
  636. >it (after recombining the parts), unstuff/uncompress it, and then look
  637. >at it to see if I can interpret it in the development environment I
  638. >have.
  639.  
  640. .hqx files are handled by mcvert
  641. .sit files are handled by unsit
  642.  
  643. Both of these are UNIX programs. So it seems to me that there *is* a subset of
  644. formats that is easily decoded on both the Mac and the UNIX side.
  645.  
  646. >I'm also fairly sure that there are a fair number of non-Mac-programmers
  647. >would be interested in being able to read some mac sources to be able to
  648. >learn a bit about mac programming in their spare time.  Event-driven
  649. >interfaces are getting more and more common, and techniques developed
  650. >for the Mac are applicable all over the programming map.
  651.  
  652. But these non-Mac-programmers will at least need to get their hands in Inside
  653. Macintosh, unless you want to rule that sources posted to c.s.m shall not
  654. contain any Toolbox calls :-)
  655.  
  656. Matthias
  657.  
  658. - -----
  659. Matthias Neeracher                                      neeri@iis.ethz.ch
  660.   "And that's why I am going to turn this world upside down, and make
  661.    of it a fire so *bright* that someone real will notice"
  662.                                 -- Vernor Vinge, _Tatja Grimm's World_
  663.  
  664. +++++++++++++++++++++++++++
  665.  
  666. From: jcav@quads.uchicago.edu (JohnC)
  667. Date: 23 Jun 92 17:37:13 GMT
  668. Organization: The Royal Society for Putting Things on Top of Other Things
  669.  
  670. In article <NEERI.92Jun23124427@iis.ethz.ch> neeri@iis.ethz.ch (Matthias Neeracher) writes:
  671. >In article <1992Jun23.041505.16908@wolves.uucp> ggw@wolves.uucp (Gregory G. Woodbury) writes:
  672. >>    There is no reason that sources couldn't be posted in .hqx form
  673. >>on comp.sources.mac (other than the moderators reluctance to declare a
  674. >>change based on a situation that has changed dramatically since the
  675. >>group was first established)  BUT, which format are you going to use?
  676. >
  677. >A valid objection. How about the following:
  678. >
  679. >- 'TEXT' files for sources
  680. Unfortunately, Mac sources (esp. from MPW) make use of Mac-specific 8-bit
  681. ASCII characters.  What to do?
  682.  
  683. >- ResEdit or {SARez,Rez} files for resources.
  684. Rez descriptions would be the best, I think, unless SARez/SADeRez aren't
  685. freely available.  Are they on ftp.apple.com?
  686.  
  687. >- 'PICT' or 'MPNT' for graphic data
  688.               ^^^^
  689. Please, not MacPaint (may it rest in peace) format, although it's easy enough
  690. to decode.  I believe that it is very important to allow full Quickdraw
  691. generality, and PICT is also quite easy to deal with.
  692.  
  693. >- TextEdit, MacWrite, or MS Word files for documentation.
  694. I think the best for for short docs would be TeachText, using pictures as
  695. needed.  For more complex docs MS Word is the way to go, much as I hate to
  696. say it.
  697.  
  698. >- Optionally Think or MPW project files, as long as Text files are also
  699. >  included. 
  700. I'd love to see a THINK project "decompiler" that emitted some standardized
  701. text-based description of a project.
  702.  
  703. >- Encoded in BinHex/Stuffit Classic format
  704. Agreed.
  705.  
  706. - -- 
  707. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  708. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  709. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  710. B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
  711.  
  712. +++++++++++++++++++++++++++
  713.  
  714. From: suitti@ima.isc.com (Stephen Uitti)
  715. Organization: Interactive Systems, Cambridge, MA 02138-5302
  716. Date: Wed, 24 Jun 1992 00:04:32 GMT
  717.  
  718. In article <1992Jun23.173713.21759@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  719. >>- 'TEXT' files for sources
  720. >Unfortunately, Mac sources (esp. from MPW) make use of Mac-specific 8-bit
  721. >ASCII characters.  What to do?
  722.  
  723. Think C sources too.  We like to put copyright symbols right into the
  724. comments.
  725.  
  726. >>- ResEdit or {SARez,Rez} files for resources.
  727. >Rez descriptions would be the best, I think, unless SARez/SADeRez aren't
  728. >freely available.  Are they on ftp.apple.com?
  729.  
  730. Rez also generates characters with the MS bit set.  Sometimes it even
  731. does this (in comments) when it is inappropriate.  Certainly, if you
  732. put a character (like the copyright symbol) into a text string, you
  733. will get an 8th bit set character in the Rez file.
  734.  
  735. >>- TextEdit, MacWrite, or MS Word files for documentation.
  736. >I think the best for for short docs would be TeachText, using pictures as
  737. >needed.  For more complex docs MS Word is the way to go, much as I hate to
  738. >say it.
  739.  
  740. Teach text is a pain to write, especially with pictures.  Almost anyone
  741. can read or write the older MacWrite format.
  742.  
  743. >>- Optionally Think or MPW project files, as long as Text files are also
  744. >>  included. 
  745. >I'd love to see a THINK project "decompiler" that emitted some standardized
  746. >text-based description of a project.
  747.  
  748. As long as there was a way to recompile it into a project file.  BinHex
  749. works pretty well.
  750.  
  751. I would just say, use stuffit/binhex.  Compactor/binhex is also good.
  752. An archive should choose one.
  753.  
  754. Stephen.
  755. suitti@ima.isc.com
  756.  
  757. +++++++++++++++++++++++++++
  758.  
  759. From: neeri@iis.ethz.ch (Matthias Neeracher)
  760. Organization: Integrated Systems Laboratory, ETH, Zurich
  761. Date: Wed, 24 Jun 1992 15:12:02 GMT
  762.  
  763. In article <1992Jun24.000432.16055@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  764. >In article <1992Jun23.173713.21759@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  765. >>>- 'TEXT' files for sources
  766. >>Unfortunately, Mac sources (esp. from MPW) make use of Mac-specific 8-bit
  767. >>ASCII characters.  What to do?
  768. >
  769. >Think C sources too.  We like to put copyright symbols right into the
  770. >comments.
  771.  
  772. Yes, that's why I wrote 'TEXT', not text :-) With 'TEXT file, I mean a fiel
  773. based on teh Macintosh 8 bit alphabet.
  774.  
  775. >I would just say, use stuffit/binhex.  Compactor/binhex is also good.
  776. >An archive should choose one.
  777.  
  778. The problem with Compactor/Binhex is that I don't know how good Compact Pro
  779. format can be decoded on UNIX systems.
  780.  
  781. Matthias
  782.  
  783. - -----
  784. Matthias Neeracher                                      neeri@iis.ethz.ch
  785.       "C'THULHU FOR PRESIDENT
  786.        For people who are tired of voting the LESSER of two evils !"
  787.            -- Greble Dagmar <dagmar@brainiac.raidernet.com>
  788.  
  789. +++++++++++++++++++++++++++
  790.  
  791. From: ksand@apple.com (Kent Sandvik (High Priest of SSSM))
  792. Date: 25 Jun 92 03:53:36 GMT
  793. Organization: Secret Society of Software Mungers
  794.  
  795. In article <1992Jun17.155317.13207@husc3.harvard.edu>, fry@zariski.harvard.edu
  796. (David Fry) writes:
  797. > These are all good ideas, but I again wonder why this is necessary. I
  798. > think it's the habit of the net.community to build structure and
  799. > formalism just because we enjoy the process. I think it would be cool to have
  800. > a program that I could point at a set of files and have it produce an
  801. > ASCII representation, but I don't think the value of this is worth the
  802. > effort, not to mention all the future effort of people straining to
  803. > conform to it, and the future nitpicking of people who don't conform
  804. > to it.  
  805.  
  806. True, too complicated and convoluted standards will never catch. Binhex/Stuffit
  807. seems to work fine, so I really wonder why the need to define yet another
  808. standard?
  809.  
  810. The best standards appear automatically from long term practical use.
  811.  
  812. Cheers,
  813. Kent
  814.  
  815.  
  816. +++++++++++++++++++++++++++
  817.  
  818. From: dglo@manray.Berkeley.EDU (Dave Glowacki)
  819. Date: 26 Jun 1992 00:20:05 GMT
  820. Organization: University of California, Berkeley
  821.  
  822. In article <Bq3quI.9A@news.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  823. >fry@zariski.harvard.edu (David Fry) writes:
  824. >>If the USENET gods insist we can't send .hqx files to comp.sources.mac
  825. >
  826. >The only god we have to worry about is the moderator of comp.sources.mac.
  827.  
  828. Actually, you need to worry about the USENET administrators.  Many news admins
  829. don't carry comp.binaries.* specifically BECAUSE it contains non-human readable
  830. postings.  If news admins at major net-hubs  stop distributing comp.sources.mac
  831. because it contains binaries, the newsgroup will effectively cease to exist.
  832. - -- 
  833. Dave Glowacki                 dglo@cs.Berkeley.EDU                   UCBerkeley
  834.  
  835. +++++++++++++++++++++++++++
  836.  
  837. From: neeri@iis.ethz.ch (Matthias Neeracher)
  838. Organization: Integrated Systems Laboratory, ETH, Zurich
  839. Date: Fri, 26 Jun 1992 16:17:28 GMT
  840.  
  841. In article <12dnrlINN7jt@agate.berkeley.edu> dglo@manray.Berkeley.EDU (Dave Glowacki) writes:
  842. >In article <Bq3quI.9A@news.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  843. >>fry@zariski.harvard.edu (David Fry) writes:
  844. >>>If the USENET gods insist we can't send .hqx files to comp.sources.mac
  845. >>
  846. >>The only god we have to worry about is the moderator of comp.sources.mac.
  847. >
  848. >Actually, you need to worry about the USENET administrators.  Many news admins
  849. >don't carry comp.binaries.* specifically BECAUSE it contains non-human readable
  850. >postings.  If news admins at major net-hubs  stop distributing comp.sources.mac
  851. >because it contains binaries, the newsgroup will effectively cease to exist.
  852.  
  853. Are there any news admins at major net hubs that don't carry comp.binaries.* ?
  854. And it's not that comp.sources.macintosh would be the only .sources. group to
  855. carry encoded files: comp.sources.hp48 does this already.
  856.  
  857. And, look at it this way: There *are* no text files. All there is are *binary*
  858. encoded text files. ASCII and BinHex/Stuffit are just two different ways to
  859. binary encode a text file.
  860.  
  861. Matthias
  862.  
  863. - -----
  864. Matthias Neeracher                                      neeri@iis.ethz.ch
  865.   "I recognize that a class of criminals and juvenile delinquents
  866.    has taken to calling themselves 'hackers', but I consider them
  867.    irrelevant to the true meaning of the word; just as the Mafia
  868.    calls themselves 'businessmen' but nobody pays that fact any
  869.    attention." -- Robert Bickford <rab@well.sf.ca.us>
  870.  
  871. +++++++++++++++++++++++++++
  872.  
  873. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  874. Organization: NCRPDA, Curtin University
  875. Date: Sat, 27 Jun 1992 06:44:49 GMT
  876.  
  877. In article <12dnrlINN7jt@agate.berkeley.edu>, 
  878.      dglo@manray.Berkeley.EDU (Dave Glowacki) wrote:
  879. > In article <Bq3quI.9A@news.cso.uiuc.edu> 
  880.        dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  881. > >fry@zariski.harvard.edu (David Fry) writes:
  882. > >>If the USENET gods insist we can't send .hqx files to comp.sources.mac
  883. > >
  884. > >The only god we have to worry about is the moderator of comp.sources.mac.
  885. > Actually, you need to worry about the USENET administrators.  Many news 
  886. > admins don't carry comp.binaries.* specifically BECAUSE it contains 
  887. > non-human readable postings.  If news admins at major net-hubs  stop 
  888. > distributing comp.sources.mac because it contains binaries, the newsgroup 
  889. > will effectively cease to exist.
  890.  
  891. Ummm, it doesn't exist now!  Nothing ever comes out of it as it is!  At the
  892. moment sources go thru comp.binaries.mac, so if they were moved to
  893. comp.sources.mac and those same administrators who currently don't
  894. distribute cbm stop distributing csm what difference does it make?  At
  895. least they will be not distributing files in the correct group instead of
  896. not distributing them in the wrong group!
  897.    Peter.
  898.  
  899. _______________________________________________________________________
  900. Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
  901. GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
  902.  
  903. ---------------------------
  904.  
  905. From: kv2@prism.gatech.EDU (VAUGHN KEITH DAVIS)
  906. Subject: SendFinderOpen
  907. Date: 17 Jun 92 15:36:23 GMT
  908. Organization: Georgia Institute of Technology
  909.  
  910. I trying to send an 'OpenSelection' Apple Event to the Finder in order to
  911. launch an application. I'm using the code clip on the Feb'92 Developer CD.
  912. I get an error of -903 from the AESend call.
  913.  
  914. Does someone have code for a standalone program which would launch a file
  915. or application by using the Apple Events. I'm eventually going to use the
  916. code in a larger application to launch a background appl to perform some
  917. rendering.
  918.  
  919. Thanks.
  920.  
  921. - -- 
  922. VAUGHN,KEITH D
  923. Georgia Institute of Technology, Atlanta Georgia, 30332
  924. uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!kv2
  925. Internet: kv2@prism.gatech.edu
  926.  
  927. +++++++++++++++++++++++++++
  928.  
  929. From: jpugh@apple.com (Jon Pugh)
  930. Date: 26 Jun 92 04:18:28 GMT
  931. Organization: Apple Computer, Inc.
  932.  
  933. In article <61476@hydra.gatech.EDU>, kv2@prism.gatech.EDU (VAUGHN KEITH DAVIS) writes:
  934. > I trying to send an 'OpenSelection' Apple Event to the Finder in order to
  935. > launch an application. I'm using the code clip on the Feb'92 Developer CD.
  936. > I get an error of -903 from the AESend call.
  937. > Does someone have code for a standalone program which would launch a file
  938. > or application by using the Apple Events. I'm eventually going to use the
  939. > code in a larger application to launch a background appl to perform some
  940. > rendering.
  941.  
  942. If you are launching an application, use the LaunchApplication call.  It will
  943. work even without the Finder running (which could be conceivable on systems
  944. with an alternate Finder).  It's faster, easier and better.  See the Process
  945. Manager chapter (29) of IM6.
  946.  
  947. Your problem sounds like your application's SIZE resource.  You need to set 
  948. the highLevelEventAware bit to be able to use AE.
  949.  
  950. Jon
  951. kAERegistrar
  952.  
  953.  
  954. ---------------------------
  955.  
  956. From: ericsc@microsoft.com (Eric Schlegel)
  957. Subject: garbage sound from SndPlay
  958. Date: 17 Jun 92 16:14:51 GMT
  959. Organization: Microsoft Corp.
  960.  
  961. OK, I give up on this one, let's see if any netfolk can help...
  962.  
  963. I'm trying to play a 'snd ' resource asynchronously using SndPlay. I use the
  964. following code to create a sound channel and then play the sound:
  965.  
  966. SndChannelPtr    psc;
  967.  
  968. SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  969. SndPlay(psc, mySndHandle, true);
  970.  
  971. The first time I do this after booting the Mac, the sound comes out with lots
  972. of static and crackles, and it's very hard to make out the sound being played.
  973. The second time usually has some static, and after that the sound is fine. I
  974. can quit the app and restart it, and the sound is OK the very first time; it's
  975. just right after the Mac is booted that I have problems.
  976.  
  977. This is System 7.0.1 with TuneUp 1.1.1 on a Mac IIcx.
  978.  
  979. Any suggestions as to why this happens and what I can do about will be
  980. gratefully accepted... Thanks!
  981.  
  982. - -eric
  983. - -------
  984. My opinions, not Microsoft's.
  985.  
  986. +++++++++++++++++++++++++++
  987.  
  988. From: potts@itl.itd.umich.edu (Paul Potts)
  989. Date: 17 Jun 92 22:10:15 GMT
  990. Organization: Instructional Technology Laboratory, University of Michigan
  991.  
  992. In article <1992Jun17.161451.8632@microsoft.com> ericsc@microsoft.com (Eric Schlegel) writes:
  993. >OK, I give up on this one, let's see if any netfolk can help...
  994. >
  995. >I'm trying to play a 'snd ' resource asynchronously using SndPlay. I use the
  996. >following code to create a sound channel and then play the sound:
  997. >
  998. >SndChannelPtr    psc;
  999. >
  1000. >SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  1001. >SndPlay(psc, mySndHandle, true);
  1002.  
  1003. This little fragment doesn't tell me a whole lot (except that you speak
  1004. Hungarian!) but I'll throw out some ideas...
  1005. >
  1006. >The first time I do this after booting the Mac, the sound comes out with lots
  1007. >of static and crackles, and it's very hard to make out the sound being played.
  1008.  
  1009. Are you running Virtual Memory? It can cause noisy sound. There are ways to
  1010. keep VM from doing its thing temporarily. Also, make sure the handle to
  1011. the sound won't move while playing. Lock it.
  1012.  
  1013. Jim Reekes, the sound manager guru from Apple (who, I'm told, looks a bit like
  1014. me) will probably throw in his $.02 sometime, but you might try these things
  1015. too.
  1016.  
  1017.  
  1018. - -- 
  1019. The essence of OOP: "With all this horse manure, I know there's got to be
  1020.                      a pony in here somewhere!"
  1021. Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
  1022.  
  1023. +++++++++++++++++++++++++++
  1024.  
  1025. From: ewylie@ocf.berkeley.edu (The Web)
  1026. Date: 19 Jun 1992 08:54:35 GMT
  1027. Organization: U.C. Berkeley Open Computing Facility
  1028.  
  1029. >OK, I give up on this one, let's see if any netfolk can help...
  1030. >
  1031. >I'm trying to play a 'snd ' resource asynchronously using SndPlay. I use the
  1032. >following code to create a sound channel and then play the sound:
  1033. >
  1034. >SndChannelPtr  psc;
  1035. >
  1036. >SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  1037. >SndPlay(psc, mySndHandle, true);
  1038.  
  1039. >From Inside Mac volume V page 477:
  1040.  
  1041. "SndNewChannel opens a new channel.  If you pass NIL for the chan parameter,
  1042. the Sound Manager opens a channel for you and returns a pointer to it."
  1043.  
  1044. If you don't pass nil, it assumes that the memory has been allocated.  What does psc initially point to?  The compiler won't necessarily set this to zero
  1045. automatically for you.  (But after a few tries, you might get lucky).
  1046.  
  1047. This should fix your problem:
  1048.  
  1049. SndChannelPtr    psc = 0;
  1050.  
  1051. SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  1052.  
  1053. - -E. Wylie
  1054.  
  1055.  
  1056. +++++++++++++++++++++++++++
  1057.  
  1058. From: REEKES@applelink.apple.com (Jim Reekes)
  1059. Date: 25 Jun 92 07:26:12 GMT
  1060. Organization: Apple Computer, Inc.
  1061.  
  1062. In article <1992Jun17.161451.8632@microsoft.com>, ericsc@microsoft.com (Eric Schlegel) writes:
  1063. > OK, I give up on this one, let's see if any netfolk can help...
  1064. > I'm trying to play a 'snd ' resource asynchronously using SndPlay. I use the
  1065. > following code to create a sound channel and then play the sound:
  1066. > SndChannelPtr    psc;
  1067. > SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  1068. > SndPlay(psc, mySndHandle, true);
  1069. > The first time I do this after booting the Mac, the sound comes out with lots
  1070. > of static and crackles, and it's very hard to make out the sound being played.
  1071. > The second time usually has some static, and after that the sound is fine. I
  1072. > can quit the app and restart it, and the sound is OK the very first time; it's
  1073. > just right after the Mac is booted that I have problems.
  1074. > This is System 7.0.1 with TuneUp 1.1.1 on a Mac IIcx.
  1075. > Any suggestions as to why this happens and what I can do about will be
  1076. > gratefully accepted... Thanks!
  1077.  
  1078. You didn't initialize the psc in your code.  Add this line:
  1079.  
  1080.   psc = nil;
  1081.  
  1082. If you don't have real data allocated for this pointer, then all hell can
  1083. run amuck.  If you did allocate data then you must set the qLength field.
  1084. Also, try using the standard system 'snd ' resource to rule out any problems
  1085. with your sounds.  And don't ignore the errors (e.g. your code doesn't).
  1086.  
  1087. - -----------------------------------------------------------------------
  1088. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  1089.                              |          Sound Manager Expert
  1090. Apple Computer, Inc.         | RAll opinions expressed are mine, and do
  1091. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  1092. Cupertino, CA 95014          |       employer, Apple Computer Inc.S
  1093.  
  1094.  
  1095.  
  1096. +++++++++++++++++++++++++++
  1097.  
  1098. From: REEKES@applelink.apple.com (Jim Reekes)
  1099. Date: 25 Jun 92 07:26:36 GMT
  1100. Organization: Apple Computer, Inc.
  1101.  
  1102. In article <1992Jun17.161451.8632@microsoft.com>, ericsc@microsoft.com (Eric Schlegel) writes:
  1103. > OK, I give up on this one, let's see if any netfolk can help...
  1104. > I'm trying to play a 'snd ' resource asynchronously using SndPlay. I use the
  1105. > following code to create a sound channel and then play the sound:
  1106. > SndChannelPtr    psc;
  1107. > SndNewChannel(&psc, sampledSynth, initMono | initNoInterp, NULL);
  1108. > SndPlay(psc, mySndHandle, true);
  1109. > The first time I do this after booting the Mac, the sound comes out with lots
  1110. > of static and crackles, and it's very hard to make out the sound being played.
  1111. > The second time usually has some static, and after that the sound is fine. I
  1112. > can quit the app and restart it, and the sound is OK the very first time; it's
  1113. > just right after the Mac is booted that I have problems.
  1114. > This is System 7.0.1 with TuneUp 1.1.1 on a Mac IIcx.
  1115. > Any suggestions as to why this happens and what I can do about will be
  1116. > gratefully accepted... Thanks!
  1117.  
  1118. You didn't initialize the psc in your code.  Add this line:
  1119.  
  1120.   psc = nil;
  1121.  
  1122. If you don't have real data allocated for this pointer, then all hell can
  1123. run amuck.  If you did allocate data then you must set the qLength field.
  1124. Also, try using the standard system 'snd ' resource to rule out any problems
  1125. with your sounds.  And don't ignore the errors (e.g. your code doesn't).
  1126.  
  1127. - -----------------------------------------------------------------------
  1128. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  1129.                              |          Sound Manager Expert
  1130. Apple Computer, Inc.         | RAll opinions expressed are mine, and do
  1131. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  1132. Cupertino, CA 95014          |       employer, Apple Computer Inc.S
  1133.  
  1134. ---------------------------
  1135.  
  1136. End of C.S.M.P. Digest
  1137. **********************
  1138.