[comp.sys.mac.programmer] How do I make sound without the click?

phil@mva.cs.liv.ac.uk (12/20/88)

OK you Mac programmers out there, Hellllllppppp!!!!
Basically, I am writing a program which is full of sound (the program is
to be used by children, and so information will be given via spoken messages
rather than written ones. I had hoped to use Macintalk etc. but now that
I hear that that is not guaranteed to still be here in a few months time....),
Anyway, the question is
"How do I produce my bits of sound without that annoying click at the start
and end?"  If you string together lots of sounds and play them altogether
you only get a click right at the very end (if you do it all in advance
that is).  Sound experts please help.  My idea is to use sound effects as
well as spoken words, put together in the sequences that I need in order
to convey my messages.  Anyone with hints tips etc (preferably in Pascal)
on how to do the above would receive my utmost gratitude.

I shall shortly put together a little piece on how I did my animation (dragging
a non-rectangular PICT over a complex background) as soon as I'm happy with
it.  To everyone on the net who helped me with that one - "ThankYou!"

Phil Jimmieson,           ***************************************************
Computer Science Dept.,   *        ** Note New Address & UserName **        *
Liverpool University,     * JANET : PHIL@UK.AC.LIV.CS.MVA                   *
Merseyside, England,      * ARPA  : PHIL%mva.cs.liv.ac.uk@cunyvm.cuny.edu   *
L69  3BX                  *                                                 *
                          * old address SQPHIL@UK.AC.LIV.CSVAX may work     *
(UK) 051-794-3689         ***************************************************

han@Apple.COM (Byron Han, Architect) (12/23/88)

Use the new sound manager documented in Inside Macintosh Volume V
and is back patched to all machines with system 6.0.2 (MacPlus and later).
If you add sounds to be played before an old one completes, it will
not click (or at least that is the premise).

There is also a technical note on producing clickless sound with the old
sound manager (Inside Macintosh Volume II) - Technical Note 19.

The gist of Technical Note 19 is to not use more than one Write call to
the sound driver and to not use the StartSound call at all.  Set up your
own parameter block and make the device manager call to the sound driver.
Modify ioActCount on the fly to feed the sound driver more data.

Hope this helps.  
+-----------------------------------------------------------------------------+
| Disclaimer: Apple has no connection with my postings.                       |
+-----------------------------------------------------------------------------+
Byron Han, Communications Architect      I. B. what?
Apple Computer, Inc.                     -------------------------------------
20525 Mariani Ave, MS27Y                 Internet: han@apple.COM
Cupertino, CA 95014                      UUCP:{sun,voder,nsc,decwrl}!apple!han
--------------------------------------   GENIE: BYRONHAN
ATTnet: 408-974-6450   Applelink: HAN1   CompuServe: 72167,1664
------------------------------------------------------------------------------