rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) (11/17/87)
I have been writing a program in Turbo Pascal, and wanted very much to incorporate Digitized Sound in it. I bought the Audio Digitizer from MacNifty (Impulse), and also got their programmer's stuff. It said that you could use it in your programs to play digitized (SoundCap) files. This is true, but I have two problems. The first, and most annoying problem that I have encountered is that the source code does not do a "back door" trick on the Sound Manager to elliminate the annoying click that is produced with every call to StartSound. Apple Computer's Tech Note 19 describes a way to get around this, but I have not been able to get it to work. I have also been having many troubles keeping StartSound calls from giving me System Errors (especially ID=02 [Address Error]). Does anybody have a piece of source code floating around that does this successfully? Or, maybe just some helpful suggestions or comments. Thanks, Rob Johnston
eacj@batcomputer.tn.cornell.edu (Julian Vrieslander) (11/18/87)
In article <4Vc96ly00XcPN3o0OS@andrew.cmu.edu> rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) writes: > > This is true, but I have two problems. The first, and most annoying >problem that I have encountered is that the source code does not do a "back >door" trick on the Sound Manager to elliminate the annoying click that is >produced with every call to StartSound. One way to avoid clicks is to allocate your samples in integral multiples of 370 (or maybe 740, I forget which). Pad the sample block with bytes set to 80 (hex). That's the sample value for zero amplitude. The number 740 comes from the size of the RAM buffer in high memory used by the Sound Driver and Disk Driver (alternate bytes are used for the sound samples and disk drive motor speed values). So what's a "back door" trick? -- Julian Vrieslander (607) 255-3594 Neurobiology & Behavior, W250 Mudd Hall, Cornell University, Ithaca NY 14853 UUCP: {cmcl2,decvax,rochester,uw-beaver,ihnp4}!cornell!batcomputer!eacj ARPA: eacj@tcgould.tn.cornell.edu BITNET: eacj@CRNLTHRY
rj0z+@andrew.cmu.edu.UUCP (11/21/87)
I asked how to do the "back door" trick with the sound manager, and wasn't too clear as to what this was. Apple Computer writes in Technical Note 19 "How to produce sound without clicking" that you can make only one call to the Sound Driver to turn it on, and then send it continuous null sound. When the application decides to make a noise, stuff the waveform in the sound buffer. After the sound has played, continue sending it null sound. I believe that the concept here is to have the sound driver running all of the time, so it dosen't click on and off. Now, in that Technical Note, Apple includes a sample program that is supposed to do this. I may have a corrupt version of the technical note, or an outdated copy, but it dosen't work. (That is from Turbo Pascal 1.0a). Rob Johnston
cole@sas.UUCP (Tom Cole) (11/22/87)
[This is actually a new question, but our news is brain damaged...] I have a Mac SE with a Radius Accelerator in it. When the accelerator is fully enabled ('020, code and data caching on) then Macintalk sounds like a throat cancer victim - basically like lots of bytes are missing in the sound buffer, or something. It's not timing dependant because I can leave the '020 on but turn off the caches (must be both!) and it sounds fine. I am using Macintalk 1.2, May 1985. Is there a newer version, and does anyone know if it solves the problem (perhaps someone who has such a hardware configuration - *Rich*)?!? Many thanks to anyone who can help...