Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: How to get rid of clicking? Keywords: Sound Driver Message-ID: <18389@well.sf.ca.us> Date: 7 Jun 90 06:00:21 GMT References: <1990Jun4.020601.9644@msuinfo.cl.msu.edu> Reply-To: oster@well.sf.ca.us (David Phillip Oster) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 20 In article <1990Jun4.020601.9644@msuinfo.cl.msu.edu> gurney@cpsin2.uucp (Eddy J Gurney) writes: >Also, while I'm posting... has anybody come up with a way to specify a >FREQUENCY to FTSoundRec.sound1Rate instead of the rate? IM II gives the >equation: > frequency = FixMul(rate,FixRatio(22257,256)) >I solved this for frequency, and got: (Actually, I had my HP-48SX do it. I >didn't want to be flamed for not solving correctly :-) > rate = FixRatio(frequency,FixRatio(22257,256)) in floating point, this is: rate = frequency / (22257. / 256.); Or, in fixed point: rate = FixDiv(FixRatio(frequency, 1), FixRatio(22257,256)) If the FixRatio(frequency, 1) offends you , you can also say: #define FIXED(f) ( ((long) (f)) << 16) and say FIXED(frequency) -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster