home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Updaters / WhiteCap 3.0.4 / WhiteCap Source.sit / WhiteCap Source / mainMacAMP.cpp < prev    next >
MacBinary  |  1999-08-29  |  10.1 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: mainMacAMP.cpp

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun Aug 29 04:05:19 1999, modified Sun Aug 29 04:05:19 1999, creator 'CWIE', type ASCII, 9609 bytes "mainMacAMP.cpp" , at 0x2609 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 6d 61 69 6e 4d 61 | 63 41 4d 50 2e 63 70 70 |..mainMa|cAMP.cpp|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 25 89 00 | 00 01 9a b3 ee 9a 3f b3 |.....%..|......?.|
|00000060| ee 9a 3f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..?.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 19 b4 00 00 |........|........|
|00000080| 0d 23 69 6e 63 6c 75 64 | 65 20 22 43 45 67 46 69 |.#includ|e "CEgFi|
|00000090| 6c 65 53 70 65 63 2e 68 | 22 0d 23 69 6e 63 6c 75 |leSpec.h|".#inclu|
|000000a0| 64 65 20 22 4d 61 63 41 | 4d 50 5f 56 69 73 75 61 |de "MacA|MP_Visua|
|000000b0| 6c 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 57 |l.h".#in|clude "W|
|000000c0| 68 69 74 65 43 61 70 2e | 68 22 0d 23 69 6e 63 6c |hiteCap.|h".#incl|
|000000d0| 75 64 65 20 22 45 67 4f | 53 55 74 69 6c 73 2e 68 |ude "EgO|SUtils.h|
|000000e0| 22 0d 23 69 6e 63 6c 75 | 64 65 20 3c 44 69 61 6c |".#inclu|de <Dial|
|000000f0| 6f 67 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ogs.h>.#|include |
|00000100| 3c 52 65 73 6f 75 72 63 | 65 73 2e 68 3e 0d 23 69 |<Resourc|es.h>.#i|
|00000110| 6e 63 6c 75 64 65 20 3c | 73 74 64 6c 69 62 2e 68 |nclude <|stdlib.h|
|00000120| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 74 69 6d 65 |>.#inclu|de <time|
|00000130| 2e 68 3e 0d 0d 2f 2f 20 | 54 68 69 73 20 69 73 20 |.h>..// |This is |
|00000140| 74 68 65 20 67 50 6c 75 | 67 49 6e 66 6f 20 62 6c |the gPlu|gInfo bl|
|00000150| 6f 63 6b 20 2d 20 61 20 | 70 6c 61 63 65 20 77 68 |ock - a |place wh|
|00000160| 65 72 65 20 4d 61 63 41 | 6d 70 20 67 65 74 73 20 |ere MacA|mp gets |
|00000170| 69 6e 69 74 69 61 6c 20 | 69 6e 66 6f 72 6d 61 74 |initial |informat|
|00000180| 69 6f 6e 20 61 62 6f 75 | 74 20 79 6f 75 72 20 70 |ion abou|t your p|
|00000190| 6c 75 67 69 6e 2e 0d 2f | 2f 20 4d 61 6b 65 20 73 |lugin../|/ Make s|
|000001a0| 75 72 65 20 74 6f 20 73 | 65 74 20 74 68 65 20 66 |ure to s|et the f|
|000001b0| 72 61 67 6d 65 6e 74 27 | 73 20 65 6e 74 72 79 20 |ragment'|s entry |
|000001c0| 70 6f 69 6e 74 20 74 6f | 20 67 50 6c 75 67 49 6e |point to| gPlugIn|
|000001d0| 66 6f 20 74 6f 20 6d 61 | 6b 65 20 69 74 20 61 63 |fo to ma|ke it ac|
|000001e0| 63 65 73 73 69 62 6c 65 | 20 66 6f 72 20 74 68 65 |cessible| for the|
|000001f0| 20 4d 61 63 41 6d 70 20 | 72 6f 75 74 69 6e 65 73 | MacAmp |routines|
|00000200| 2e 0d 0d 56 50 49 6e 66 | 6f 42 6c 6f 63 6b 20 67 |...VPInf|oBlock g|
|00000210| 50 6c 75 67 49 6e 66 6f | 20 3d 0d 7b 0d 09 56 50 |PlugInfo| =.{..VP|
|00000220| 5f 49 4e 46 4f 42 4c 4f | 43 4b 5f 48 45 41 44 45 |_INFOBLO|CK_HEADE|
|00000230| 52 28 20 63 50 6c 75 67 | 69 6e 41 75 74 68 6f 72 |R( cPlug|inAuthor|
|00000240| 2c 20 63 57 68 69 74 65 | 43 61 70 49 44 29 2c 0d |, cWhite|CapID),.|
|00000250| 0d 09 22 5c 70 57 68 69 | 74 65 43 61 70 22 2c 0d |.."\pWhi|teCap",.|
|00000260| 0d 09 56 69 73 49 6e 69 | 74 69 61 6c 69 7a 65 2c |..VisIni|tialize,|
|00000270| 0d 09 56 69 73 54 65 72 | 6d 69 6e 61 74 65 2c 0d |..VisTer|minate,.|
|00000280| 09 6e 69 6c 2c 09 09 09 | 09 2f 2f 20 77 65 20 64 |.nil,...|.// we d|
|00000290| 6f 6e 27 74 20 69 64 6c | 65 0d 09 56 69 73 41 62 |on't idl|e..VisAb|
|000002a0| 6f 75 74 2c 0d 09 56 69 | 73 44 72 61 77 2c 0d 09 |out,..Vi|sDraw,..|
|000002b0| 6e 69 6c 2c 0d 09 0d 09 | 6e 69 6c 2c 09 09 09 2f |nil,....|nil,.../|
|000002c0| 2f 20 77 65 20 64 6f 6e | 27 74 20 77 61 6e 74 20 |/ we don|'t want |
|000002d0| 6b 65 79 64 6f 77 6e 73 | 2e 2e 0d 09 56 69 73 4d |keydowns|....VisM|
|000002e0| 61 63 45 76 65 6e 74 2c | 09 09 2f 2f 20 2e 2e 2e |acEvent,|..// ...|
|000002f0| 61 6e 64 20 65 76 65 6e | 74 73 0d 09 0d 09 6e 69 |and even|ts....ni|
|00000300| 6c 2c 0d 09 6e 69 6c 2c | 09 09 09 09 2f 2f 20 77 |l,..nil,|....// w|
|00000310| 65 20 68 61 76 65 20 6e | 6f 20 73 65 74 74 69 6e |e have n|o settin|
|00000320| 67 73 0d 09 6e 69 6c 2c | 0d 09 6e 69 6c 2c 0d 09 |gs..nil,|..nil,..|
|00000330| 0d 09 2f 2f 20 4e 69 66 | 74 79 20 6d 61 63 72 6f |..// Nif|ty macro|
|00000340| 20 74 6f 20 73 65 74 20 | 61 6c 6c 20 74 68 65 73 | to set |all thes|
|00000350| 65 20 27 72 65 73 65 72 | 76 65 64 27 20 76 61 6c |e 'reser|ved' val|
|00000360| 75 65 73 20 66 6f 72 20 | 75 73 0d 09 56 50 5f 49 |ues for |us..VP_I|
|00000370| 4e 46 4f 42 4c 4f 43 4b | 5f 46 4f 4f 54 45 52 0d |NFOBLOCK|_FOOTER.|
|00000380| 7d 3b 0d 0d 0d 0d 0d 2f | 2f 20 54 68 65 73 65 20 |};...../|/ These |
|00000390| 61 72 65 20 67 6c 6f 62 | 61 6c 73 2e 0d 73 74 61 |are glob|als..sta|
|000003a0| 74 69 63 20 57 68 69 74 | 65 43 61 70 2a 09 09 67 |tic Whit|eCap*..g|
|000003b0| 57 43 20 3d 20 4e 55 4c | 4c 3b 0d 73 74 61 74 69 |WC = NUL|L;.stati|
|000003c0| 63 20 66 6c 6f 61 74 09 | 09 09 67 53 61 6d 70 6c |c float.|..gSampl|
|000003d0| 65 5b 20 4e 55 4d 5f 53 | 41 4d 50 4c 45 5f 42 49 |e[ NUM_S|AMPLE_BI|
|000003e0| 4e 53 20 5d 3b 0d 73 74 | 61 74 69 63 20 73 68 6f |NS ];.st|atic sho|
|000003f0| 72 74 09 09 09 67 52 65 | 66 4e 75 6d 20 3d 20 2d |rt...gRe|fNum = -|
|00000400| 31 3b 0d 73 74 61 74 69 | 63 20 64 6f 75 62 6c 65 |1;.stati|c double|
|00000410| 09 09 09 67 44 75 6d 6d | 79 46 46 54 5b 20 4e 55 |...gDumm|yFFT[ NU|
|00000420| 4d 5f 53 41 4d 50 4c 45 | 5f 42 49 4e 53 20 5d 3b |M_SAMPLE|_BINS ];|
|00000430| 0d 0d 0d 0d 2f 2a 20 0d | 09 50 6c 75 67 49 6e 69 |..../* .|.PlugIni|
|00000440| 74 69 61 6c 69 7a 65 0d | 0d 09 43 61 6c 6c 65 64 |tialize.|..Called|
|00000450| 20 65 76 65 72 79 20 74 | 69 6d 65 20 75 73 65 20 | every t|ime use |
|00000460| 73 65 6c 65 63 74 73 20 | 79 6f 75 72 20 70 6c 75 |selects |your plu|
|00000470| 67 69 6e 20 66 72 6f 6d | 20 74 68 65 20 50 6c 75 |gin from| the Plu|
|00000480| 67 69 6e 73 20 6d 65 6e | 75 2e 20 59 6f 75 20 6e |gins men|u. You n|
|00000490| 65 65 64 20 74 6f 20 61 | 6c 6c 6f 63 61 74 65 20 |eed to a|llocate |
|000004a0| 61 6e 64 20 64 69 73 70 | 6c 61 79 20 61 20 77 69 |and disp|lay a wi|
|000004b0| 6e 64 6f 77 20 68 65 72 | 65 2c 0d 09 69 6e 69 74 |ndow her|e,..init|
|000004c0| 20 79 6f 75 72 20 76 61 | 72 69 61 62 6c 65 73 2c | your va|riables,|
|000004d0| 20 61 6e 64 20 64 6f 20 | 77 68 61 74 65 76 65 72 | and do |whatever|
|000004e0| 20 79 6f 75 20 77 61 6e | 74 2c 20 6c 69 6b 65 20 | you wan|t, like |
|000004f0| 73 65 74 20 74 68 65 20 | 72 65 66 6e 75 6d 20 69 |set the |refnum i|
|00000500| 66 20 79 6f 75 20 6e 65 | 65 64 20 69 74 2e 0d 09 |f you ne|ed it...|
|00000510| 0d 09 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |..This f|unction |
|00000520| 75 73 65 73 20 46 53 53 | 70 65 63 20 74 6f 20 69 |uses FSS|pec to i|
|00000530| 74 73 65 6c 66 20 74 68 | 61 74 20 4d 61 63 41 6d |tself th|at MacAm|
|00000540| 70 20 70 72 6f 76 69 64 | 65 73 20 74 6f 20 69 74 |p provid|es to it|
|00000550| 20 74 6f 20 67 61 69 6e | 20 61 63 63 65 73 73 20 | to gain| access |
|00000560| 74 6f 20 69 74 73 20 72 | 65 73 6f 75 72 63 65 20 |to its r|esource |
|00000570| 66 6f 72 6b 2e 0d 09 0d | 09 4f 74 68 65 72 20 74 |fork....|.Other t|
|00000580| 68 61 6e 20 74 68 61 74 | 2c 20 65 76 65 72 79 74 |han that|, everyt|
|00000590| 68 69 6e 67 20 69 73 20 | 68 61 72 64 2d 63 6f 64 |hing is |hard-cod|
|000005a0| 65 64 20 61 6e 64 20 69 | 73 20 64 65 66 69 6e 69 |ed and i|s defini|
|000005b0| 74 6c 79 20 6e 6f 74 20 | 61 6e 20 65 78 61 6d 70 |tly not |an examp|
|000005c0| 6c 65 20 6f 66 20 67 6f | 6f 64 20 70 72 6f 67 72 |le of go|od progr|
|000005d0| 61 6d 6d 69 6e 67 20 3d | 50 0d 2a 2f 0d 4f 53 53 |amming =|P.*/.OSS|
|000005e0| 74 61 74 75 73 09 56 69 | 73 49 6e 69 74 69 61 6c |tatus.Vi|sInitial|
|000005f0| 69 7a 65 28 46 53 53 70 | 65 63 50 74 72 20 69 6e |ize(FSSp|ecPtr in|
|00000600| 50 6c 75 67 69 6e 2c 20 | 57 69 6e 64 6f 77 50 74 |Plugin, |WindowPt|
|00000610| 72 2a 20 6f 75 74 57 69 | 6e 64 6f 77 2c 20 55 49 |r* outWi|ndow, UI|
|00000620| 6e 74 33 32 2a 20 29 20 | 7b 0d 09 0d 09 67 52 65 |nt32* ) |{....gRe|
|00000630| 66 4e 75 6d 20 3d 20 3a | 3a 46 53 70 4f 70 65 6e |fNum = :|:FSpOpen|
|00000640| 52 65 73 46 69 6c 65 28 | 20 69 6e 50 6c 75 67 69 |ResFile(| inPlugi|
|00000650| 6e 2c 20 66 73 52 64 50 | 65 72 6d 20 29 3b 0d 0d |n, fsRdP|erm );..|
|00000660| 09 45 67 4f 53 55 74 69 | 6c 73 3a 3a 49 6e 69 74 |.EgOSUti|ls::Init|
|00000670| 69 61 6c 69 7a 65 28 29 | 3b 0d 09 50 69 78 50 6f |ialize()|;..PixPo|
|00000680| 72 74 3a 3a 53 74 61 72 | 74 75 70 28 29 3b 0d 09 |rt::Star|tup();..|
|00000690| 09 0d 09 09 0d 09 52 65 | 63 74 20 72 20 3d 20 7b |......Re|ct r = {|
|000006a0| 20 30 2c 20 30 2c 20 30 | 2c 20 30 20 7d 3b 0d 09 | 0, 0, 0|, 0 };..|
|000006b0| 2a 6f 75 74 57 69 6e 64 | 6f 77 20 3d 20 3a 3a 4e |*outWind|ow = ::N|
|000006c0| 65 77 43 57 69 6e 64 6f | 77 28 20 4e 55 4c 4c 2c |ewCWindo|w( NULL,|
|000006d0| 20 26 72 2c 20 22 5c 70 | 57 68 69 74 65 43 61 70 | &r, "\p|WhiteCap|
|000006e0| 22 2c 20 66 61 6c 73 65 | 2c 20 31 39 38 35 2c 20 |", false|, 1985, |
|000006f0| 28 57 69 6e 64 6f 77 50 | 74 72 29 2d 31 2c 20 74 |(WindowP|tr)-1, t|
|00000700| 72 75 65 2c 20 4e 55 4c | 4c 20 29 3b 0d 09 43 45 |rue, NUL|L );..CE|
|00000710| 67 46 69 6c 65 53 70 65 | 63 20 66 6f 6c 64 65 72 |gFileSpe|c folder|
|00000720| 3b 0d 09 66 6f 6c 64 65 | 72 2e 41 73 73 69 67 6e |;..folde|r.Assign|
|00000730| 46 6f 6c 64 65 72 28 20 | 22 57 68 69 74 65 43 61 |Folder( |"WhiteCa|
|00000740| 70 20 43 6f 6e 66 69 67 | 73 22 20 29 3b 0d 09 0d |p Config|s" );...|
|00000750| 09 0d 09 67 57 43 20 3d | 20 6e 65 77 20 57 68 69 |...gWC =| new Whi|
|00000760| 74 65 43 61 70 28 20 66 | 6f 6c 64 65 72 20 29 3b |teCap( f|older );|
|00000770| 0d 09 67 57 43 20 2d 3e | 20 53 65 74 57 69 6e 50 |..gWC ->| SetWinP|
|00000780| 6f 72 74 28 20 2a 6f 75 | 74 57 69 6e 64 6f 77 20 |ort( *ou|tWindow |
|00000790| 29 3b 0d 0d 09 0d 09 2f | 2f 20 55 70 64 61 74 65 |);...../|/ Update|
|000007a0| 20 74 68 65 20 77 69 6e | 64 6f 77 0d 09 67 57 43 | the win|dow..gWC|
|000007b0| 20 2d 3e 20 44 72 61 77 | 28 29 3b 0d 0d 09 72 65 | -> Draw|();...re|
|000007c0| 74 75 72 6e 20 6e 6f 45 | 72 72 3b 0d 7d 0d 0d 0d |turn noE|rr;.}...|
|000007d0| 2f 2a 20 0d 09 50 6c 75 | 67 54 65 72 6d 69 6e 61 |/* ..Plu|gTermina|
|000007e0| 74 65 0d 0d 09 43 61 6c | 6c 65 64 20 77 68 65 6e |te...Cal|led when|
|000007f0| 20 75 73 65 72 20 64 65 | 73 65 6c 65 63 74 73 20 | user de|selects |
|00000800| 79 6f 75 72 20 70 6c 75 | 67 69 6e 2c 20 4d 61 63 |your plu|gin, Mac|
|00000810| 41 6d 70 20 71 75 69 74 | 73 20 6f 72 20 69 6e 20 |Amp quit|s or in |
|00000820| 74 68 65 20 63 61 73 65 | 20 69 66 20 79 6f 75 20 |the case| if you |
|00000830| 68 61 76 65 20 70 61 73 | 73 65 64 20 76 69 73 54 |have pas|sed visT|
|00000840| 65 72 6d 69 6e 61 74 65 | 2f 76 69 73 4e 6f 4d 65 |erminate|/visNoMe|
|00000850| 6d 6f 72 79 20 65 72 72 | 6f 72 2e 0d 09 59 6f 75 |mory err|or...You|
|00000860| 20 73 68 6f 75 6c 64 20 | 64 69 73 70 6f 73 65 20 | should |dispose |
|00000870| 79 6f 75 72 20 77 69 6e | 64 6f 77 20 68 65 72 65 |your win|dow here|
|00000880| 20 26 20 63 6c 65 61 6e | 20 75 70 20 74 68 65 20 | & clean| up the |
|00000890| 6d 65 73 73 2e 0d 2a 2f | 0d 4f 53 53 74 61 74 75 |mess..*/|.OSStatu|
|000008a0| 73 09 56 69 73 54 65 72 | 6d 69 6e 61 74 65 28 57 |s.VisTer|minate(W|
|000008b0| 69 6e 64 6f 77 50 74 72 | 20 69 6e 57 69 6e 2c 20 |indowPtr| inWin, |
|000008c0| 55 49 6e 74 33 32 2a 29 | 0d 7b 0d 0d 09 64 65 6c |UInt32*)|.{...del|
|000008d0| 65 74 65 20 67 57 43 3b | 0d 09 67 57 43 20 3d 20 |ete gWC;|..gWC = |
|000008e0| 4e 55 4c 4c 3b 0d 0d 0d | 09 3a 3a 44 69 73 70 6f |NULL;...|.::Dispo|
|000008f0| 73 65 57 69 6e 64 6f 77 | 28 20 69 6e 57 69 6e 20 |seWindow|( inWin |
|00000900| 29 3b 0d 09 0d 09 50 69 | 78 50 6f 72 74 3a 3a 53 |);....Pi|xPort::S|
|00000910| 68 75 74 64 6f 77 6e 28 | 29 3b 0d 0d 09 09 0d 09 |hutdown(|);......|
|00000920| 2f 2f 20 43 6c 6f 73 65 | 20 6f 75 72 20 72 65 73 |// Close| our res|
|00000930| 6f 75 72 63 65 20 66 6f | 72 6b 2e 0d 09 69 66 20 |ource fo|rk...if |
|00000940| 28 20 67 52 65 66 4e 75 | 6d 20 21 3d 20 2d 31 20 |( gRefNu|m != -1 |
|00000950| 29 0d 09 09 3a 3a 46 53 | 43 6c 6f 73 65 28 20 67 |)...::FS|Close( g|
|00000960| 52 65 66 4e 75 6d 20 29 | 3b 0d 09 0d 09 72 65 74 |RefNum )|;....ret|
|00000970| 75 72 6e 20 6e 6f 45 72 | 72 3b 0d 7d 0d 0d 0d 0d |urn noEr|r;.}....|
|00000980| 4f 53 53 74 61 74 75 73 | 20 56 69 73 44 72 61 77 |OSStatus| VisDraw|
|00000990| 28 57 69 6e 64 6f 77 50 | 74 72 2c 20 55 49 6e 74 |(WindowP|tr, UInt|
|000009a0| 33 32 2a 29 20 7b 20 0d | 0d 09 0d 09 2f 2f 20 49 |32*) { .|....// I|
|000009b0| 66 20 77 65 20 64 65 74 | 65 78 74 20 61 20 63 6c |f we det|ext a cl|
|000009c0| 69 63 6b 20 69 6e 20 66 | 75 6c 6c 73 63 72 65 65 |ick in f|ullscree|
|000009d0| 6e 2c 20 74 68 65 6e 20 | 65 78 69 74 20 66 75 6c |n, then |exit ful|
|000009e0| 6c 73 63 72 65 65 6e 20 | 6d 6f 64 65 20 6e 6f 20 |lscreen |mode no |
|000009f0| 6d 61 74 74 65 72 20 77 | 68 61 74 0d 09 69 66 20 |matter w|hat..if |
|00000a00| 28 20 67 57 43 20 2d 3e | 20 49 73 46 75 6c 6c 53 |( gWC ->| IsFullS|
|00000a10| 63 72 65 65 6e 28 29 20 | 29 20 7b 0d 09 09 69 66 |creen() |) {...if|
|00000a20| 20 28 20 3a 3a 42 75 74 | 74 6f 6e 28 29 20 29 0d | ( ::But|ton() ).|
|00000a30| 09 09 09 67 57 43 20 2d | 3e 20 53 65 74 46 75 6c |...gWC -|> SetFul|
|00000a40| 6c 53 63 72 65 65 6e 28 | 20 66 61 6c 73 65 20 29 |lScreen(| false )|
|00000a50| 3b 20 0d 09 7d 0d 09 0d | 09 0d 09 69 6e 74 20 69 |; ..}...|...int i|
|00000a60| 2c 20 6a 2c 20 62 69 6e | 3b 0d 09 75 6e 73 69 67 |, j, bin|;..unsig|
|00000a70| 6e 65 64 20 6c 6f 6e 67 | 20 74 69 6d 65 2c 20 73 |ned long| time, s|
|00000a80| 74 61 74 75 73 20 3d 20 | 30 3b 0d 09 75 6e 73 69 |tatus = |0;..unsi|
|00000a90| 67 6e 65 64 20 73 68 6f | 72 74 20 66 66 74 4e 75 |gned sho|rt fftNu|
|00000aa0| 6d 3b 0d 09 64 6f 75 62 | 6c 65 2a 20 73 61 6d 70 |m;..doub|le* samp|
|00000ab0| 3b 0d 09 66 6c 6f 61 74 | 20 73 63 61 6c 65 20 3d |;..float| scale =|
|00000ac0| 20 2e 31 32 20 2a 20 55 | 4e 49 56 5f 4d 41 47 5f | .12 * U|NIV_MAG_|
|00000ad0| 53 43 41 4c 45 3b 0d 09 | 0d 0d 09 67 50 6c 75 67 |SCALE;..|...gPlug|
|00000ae0| 49 6e 66 6f 2e 6d 61 2d | 3e 47 65 74 46 46 54 28 |Info.ma-|>GetFFT(|
|00000af0| 20 26 73 61 6d 70 2c 20 | 26 66 66 74 4e 75 6d 20 | &samp, |&fftNum |
|00000b00| 29 3b 0d 0d 09 69 66 20 | 28 20 67 50 6c 75 67 49 |);...if |( gPlugI|
|00000b10| 6e 66 6f 2e 6d 61 2d 3e | 47 65 74 53 74 61 74 75 |nfo.ma->|GetStatu|
|00000b20| 73 20 29 0d 09 09 67 50 | 6c 75 67 49 6e 66 6f 2e |s )...gP|lugInfo.|
|00000b30| 6d 61 2d 3e 47 65 74 53 | 74 61 74 75 73 28 20 26 |ma->GetS|tatus( &|
|00000b40| 74 69 6d 65 2c 20 26 73 | 74 61 74 75 73 20 29 3b |time, &s|tatus );|
|00000b50| 0d 0d 09 69 66 20 28 20 | 66 66 74 4e 75 6d 20 3c |...if ( |fftNum <|
|00000b60| 20 4e 55 4d 5f 53 41 4d | 50 4c 45 5f 42 49 4e 53 | NUM_SAM|PLE_BINS|
|00000b70| 20 2a 20 31 31 20 2b 20 | 31 30 20 7c 7c 20 28 20 | * 11 + |10 || ( |
|00000b80| 73 74 61 74 75 73 20 26 | 20 73 74 61 74 75 73 53 |status &| statusS|
|00000b90| 74 6f 70 70 65 64 20 29 | 20 29 20 7b 0d 09 09 66 |topped )| ) {...f|
|00000ba0| 6f 72 20 28 20 69 20 3d | 20 30 3b 20 69 20 3c 20 |or ( i =| 0; i < |
|00000bb0| 4e 55 4d 5f 53 41 4d 50 | 4c 45 5f 42 49 4e 53 3b |NUM_SAMP|LE_BINS;|
|00000bc0| 20 69 2b 2b 20 29 20 7b | 0d 09 09 09 67 53 61 6d | i++ ) {|....gSam|
|00000bd0| 70 6c 65 5b 20 69 20 5d | 20 3d 20 30 3b 20 0d 09 |ple[ i ]| = 0; ..|
|00000be0| 09 7d 20 7d 0d 09 65 6c | 73 65 20 7b 0d 09 0d 09 |.} }..el|se {....|
|00000bf0| 09 62 69 6e 20 3d 20 31 | 30 3b 0d 09 09 66 6f 72 |.bin = 1|0;...for|
|00000c00| 20 28 20 69 20 3d 20 30 | 3b 20 69 20 3c 20 4e 55 | ( i = 0|; i < NU|
|00000c10| 4d 5f 53 41 4d 50 4c 45 | 5f 42 49 4e 53 3b 20 69 |M_SAMPLE|_BINS; i|
|00000c20| 2b 2b 20 29 20 7b 0d 09 | 09 09 67 53 61 6d 70 6c |++ ) {..|..gSampl|
|00000c30| 65 5b 20 69 20 5d 20 3d | 20 30 3b 0d 09 09 09 66 |e[ i ] =| 0;....f|
|00000c40| 6f 72 20 28 20 6a 20 3d | 20 30 3b 20 6a 20 3c 20 |or ( j =| 0; j < |
|00000c50| 38 3b 20 6a 2b 2b 2c 20 | 62 69 6e 2b 2b 20 29 20 |8; j++, |bin++ ) |
|00000c60| 0d 09 09 09 09 67 53 61 | 6d 70 6c 65 5b 20 69 20 |.....gSa|mple[ i |
|00000c70| 5d 20 2b 3d 20 73 61 6d | 70 5b 20 62 69 6e 20 5d |] += sam|p[ bin ]|
|00000c80| 3b 0d 09 09 7d 0d 09 09 | 0d 09 09 62 69 6e 20 3d |;...}...|...bin =|
|00000c90| 20 31 30 3b 0d 09 09 66 | 6f 72 20 28 20 69 20 3d | 10;...f|or ( i =|
|00000ca0| 20 30 3b 20 69 20 3c 20 | 4e 55 4d 5f 53 41 4d 50 | 0; i < |NUM_SAMP|
|00000cb0| 4c 45 5f 42 49 4e 53 3b | 20 69 2b 2b 20 29 20 7b |LE_BINS;| i++ ) {|
|00000cc0| 0d 09 09 09 66 6f 72 20 | 28 20 6a 20 3d 20 30 3b |....for |( j = 0;|
|00000cd0| 20 6a 20 3c 20 38 3b 20 | 6a 2b 2b 2c 20 62 69 6e | j < 8; |j++, bin|
|00000ce0| 2b 2b 20 29 20 0d 09 09 | 09 09 67 53 61 6d 70 6c |++ ) ...|..gSampl|
|00000cf0| 65 5b 20 69 20 5d 20 2b | 3d 20 73 61 6d 70 5b 20 |e[ i ] +|= samp[ |
|00000d00| 62 69 6e 20 5d 3b 0d 2f | 2f 09 09 09 67 53 61 6d |bin ];./|/...gSam|
|00000d10| 70 6c 65 5b 20 69 20 5d | 20 3d 20 2e 30 33 20 2a |ple[ i ]| = .03 *|
|00000d20| 20 2e 30 30 30 33 20 2a | 20 67 53 61 6d 70 6c 65 | .0003 *| gSample|
|00000d30| 5b 20 69 20 5d 20 2a 20 | 28 30 2e 38 35 20 2b 20 |[ i ] * |(0.85 + |
|00000d40| 2e 30 35 39 20 2a 20 69 | 29 3b 0d 2f 2f 09 09 09 |.059 * i|);.//...|
|00000d50| 67 53 61 6d 70 6c 65 5b | 20 69 20 5d 20 3d 20 2e |gSample[| i ] = .|
|00000d60| 31 20 2a 20 28 20 73 71 | 72 74 28 20 31 35 20 2b |1 * ( sq|rt( 15 +|
|00000d70| 20 2e 30 30 30 33 20 2a | 20 67 53 61 6d 70 6c 65 | .0003 *| gSample|
|00000d80| 5b 20 69 20 5d 20 2a 20 | 28 30 2e 38 35 20 2b 20 |[ i ] * |(0.85 + |
|00000d90| 2e 30 35 39 20 2a 20 69 | 29 20 29 20 2d 20 73 71 |.059 * i|) ) - sq|
|00000da0| 72 74 28 20 31 35 20 29 | 20 29 3b 0d 0d 09 09 09 |rt( 15 )| );.....|
|00000db0| 67 53 61 6d 70 6c 65 5b | 20 69 20 5d 20 3d 20 73 |gSample[| i ] = s|
|00000dc0| 63 61 6c 65 20 2a 20 28 | 20 73 71 72 74 28 20 34 |cale * (| sqrt( 4|
|00000dd0| 30 20 2b 20 2e 30 30 30 | 34 32 20 2a 20 67 53 61 |0 + .000|42 * gSa|
|00000de0| 6d 70 6c 65 5b 20 69 20 | 5d 20 2a 20 28 30 2e 38 |mple[ i |] * (0.8|
|00000df0| 35 20 2b 20 2e 30 35 31 | 20 2a 20 69 29 20 29 20 |5 + .051| * i) ) |
|00000e00| 2d 20 73 71 72 74 28 20 | 34 30 20 29 20 29 3b 0d |- sqrt( |40 ) );.|
|00000e10| 09 09 09 0d 09 09 09 0d | 09 09 09 2f 2f 67 53 61 |........|...//gSa|
|00000e20| 6d 70 6c 65 5b 20 69 20 | 5d 20 3d 20 2e 30 30 30 |mple[ i |] = .000|
|00000e30| 30 31 33 20 2a 20 67 53 | 61 6d 70 6c 65 5b 20 69 |013 * gS|ample[ i|
|00000e40| 20 5d 20 2a 20 28 30 2e | 38 35 20 2b 20 2e 30 35 | ] * (0.|85 + .05|
|00000e50| 38 20 2a 20 69 29 3b 0d | 09 09 09 2f 2f 67 53 61 |8 * i);.|...//gSa|
|00000e60| 6d 70 6c 65 5b 20 69 20 | 5d 20 3d 20 31 20 2a 20 |mple[ i |] = 1 * |
|00000e70| 6c 6f 67 28 20 32 20 2a | 20 67 53 61 6d 70 6c 65 |log( 2 *| gSample|
|00000e80| 5b 20 69 20 5d 20 2b 20 | 31 20 29 3b 0d 0d 09 09 |[ i ] + |1 );....|
|00000e90| 09 2f 2f 67 53 61 6d 70 | 6c 65 5b 20 69 20 5d 20 |.//gSamp|le[ i ] |
|00000ea0| 3d 20 70 6f 77 28 20 67 | 53 61 6d 70 6c 65 5b 20 |= pow( g|Sample[ |
|00000eb0| 69 20 5d 2c 20 31 2e 34 | 20 29 3b 0d 09 09 09 2f |i ], 1.4| );..../|
|00000ec0| 2f 67 53 61 6d 70 6c 65 | 5b 20 69 20 5d 20 3d 20 |/gSample|[ i ] = |
|00000ed0| 6c 6f 67 28 20 31 20 2b | 20 2e 36 20 2a 20 67 53 |log( 1 +| .6 * gS|
|00000ee0| 61 6d 70 6c 65 5b 20 69 | 20 5d 20 29 3b 0d 0d 09 |ample[ i| ] );...|
|00000ef0| 09 7d 0d 09 09 0d 09 09 | 67 53 61 6d 70 6c 65 5b |.}......|gSample[|
|00000f00| 20 30 20 5d 20 2a 3d 20 | 30 2e 34 35 3b 0d 09 09 | 0 ] *= |0.45;...|
|00000f10| 67 53 61 6d 70 6c 65 5b | 20 31 20 5d 20 2a 3d 20 |gSample[| 1 ] *= |
|00000f20| 30 2e 37 35 3b 0d 09 09 | 0d 09 09 2f 2f 67 53 61 |0.75;...|...//gSa|
|00000f30| 6d 70 6c 65 5b 20 34 20 | 5d 20 3d 20 31 3b 0d 09 |mple[ 4 |] = 1;..|
|00000f40| 7d 0d 0d 09 2f 2f 20 53 | 74 6f 72 65 20 74 68 65 |}...// S|tore the|
|00000f50| 20 6e 65 77 65 73 74 20 | 73 61 6d 70 6c 65 20 61 | newest |sample a|
|00000f60| 6e 64 20 63 68 75 63 6b | 20 61 6e 64 20 6f 6c 64 |nd chuck| and old|
|00000f70| 20 73 61 6d 70 6c 65 73 | 0d 09 67 57 43 20 2d 3e | samples|..gWC ->|
|00000f80| 20 52 65 63 6f 72 64 53 | 61 6d 70 6c 65 28 20 45 | RecordS|ample( E|
|00000f90| 67 4f 53 55 74 69 6c 73 | 3a 3a 43 75 72 54 69 6d |gOSUtils|::CurTim|
|00000fa0| 65 4d 53 28 29 2c 20 67 | 53 61 6d 70 6c 65 20 29 |eMS(), g|Sample )|
|00000fb0| 3b 0d 0d 09 2f 2f 20 55 | 70 64 61 74 65 20 74 68 |;...// U|pdate th|
|00000fc0| 65 20 73 63 72 65 65 6e | 2c 20 62 61 62 79 2e 20 |e screen|, baby. |
|00000fd0| 20 4c 65 74 27 73 20 73 | 68 61 67 21 0d 09 67 57 | Let's s|hag!..gW|
|00000fe0| 43 20 2d 3e 20 44 72 61 | 77 28 29 3b 0d 0d 09 72 |C -> Dra|w();...r|
|00000ff0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 0d 7d 0d |eturn no|Err;..}.|
|00001000| 0d 0d 2f 2a 0d 4f 53 53 | 74 61 74 75 73 20 56 69 |../*.OSS|tatus Vi|
|00001010| 73 43 6c 69 63 6b 28 20 | 57 69 6e 64 6f 77 50 74 |sClick( |WindowPt|
|00001020| 72 20 69 6e 57 69 6e 64 | 6f 77 2c 20 50 6f 69 6e |r inWind|ow, Poin|
|00001030| 74 20 69 6e 50 74 2c 20 | 55 49 6e 74 33 32 2a 20 |t inPt, |UInt32* |
|00001040| 29 20 7b 0d 0d 09 73 74 | 61 74 69 63 20 6c 6f 6e |) {...st|atic lon|
|00001050| 67 20 73 4c 61 73 74 57 | 68 65 6e 20 3d 20 30 3b |g sLastW|hen = 0;|
|00001060| 0d 09 6c 6f 6e 67 20 09 | 63 75 72 54 69 6d 65 20 |..long .|curTime |
|00001070| 3d 20 3a 3a 54 69 63 6b | 43 6f 75 6e 74 28 29 3b |= ::Tick|Count();|
|00001080| 0d 09 62 6f 6f 6c 09 64 | 6f 53 65 6c 65 63 74 20 |..bool.d|oSelect |
|00001090| 3d 20 66 61 6c 73 65 3b | 0d 09 62 6f 6f 6c 09 62 |= false;|..bool.b|
|000010a0| 75 74 74 6f 6e 20 3d 20 | 3a 3a 42 75 74 74 6f 6e |utton = |::Button|
|000010b0| 28 29 3b 0d 0d 09 2f 2f | 20 73 65 65 20 69 66 20 |();...//| see if |
|000010c0| 74 68 65 20 63 6d 64 20 | 6b 65 79 20 69 73 20 64 |the cmd |key is d|
|000010d0| 6f 77 6e 0d 09 69 66 20 | 28 20 62 75 74 74 6f 6e |own..if |( button|
|000010e0| 20 29 20 7b 0d 09 09 75 | 6e 73 69 67 6e 65 64 20 | ) {...u|nsigned |
|000010f0| 63 68 61 72 20 6b 6d 5b | 31 36 5d 3b 0d 09 09 3a |char km[|16];...:|
|00001100| 3a 47 65 74 4b 65 79 73 | 28 20 28 75 6e 73 69 67 |:GetKeys|( (unsig|
|00001110| 6e 65 64 20 6c 6f 6e 67 | 2a 29 20 6b 6d 20 29 3b |ned long|*) km );|
|00001120| 0d 09 09 6c 6f 6e 67 20 | 63 6f 64 65 20 3d 20 35 |...long |code = 5|
|00001130| 35 3b 09 20 2f 2f 20 43 | 6d 64 20 6b 65 79 20 63 |5;. // C|md key c|
|00001140| 6f 64 65 0d 09 09 69 66 | 20 28 20 28 28 6b 6d 5b |ode...if| ( ((km[|
|00001150| 20 63 6f 64 65 20 3e 3e | 20 33 20 5d 20 3e 3e 20 | code >>| 3 ] >> |
|00001160| 28 63 6f 64 65 20 26 20 | 37 29 29 20 26 20 31 29 |(code & |7)) & 1)|
|00001170| 20 21 3d 20 30 20 29 20 | 7b 0d 09 09 09 64 6f 53 | != 0 ) |{....doS|
|00001180| 65 6c 65 63 74 20 3d 20 | 74 72 75 65 3b 0d 09 09 |elect = |true;...|
|00001190| 7d 0d 09 7d 0d 09 0d 09 | 69 66 20 28 20 67 57 43 |}..}....|if ( gWC|
|000011a0| 20 2d 3e 20 50 74 49 6e | 54 69 74 6c 65 28 20 69 | -> PtIn|Title( i|
|000011b0| 6e 50 74 20 29 20 7c 7c | 20 64 6f 53 65 6c 65 63 |nPt ) ||| doSelec|
|000011c0| 74 20 29 0d 09 09 67 57 | 43 20 2d 3e 20 53 65 6c |t )...gW|C -> Sel|
|000011d0| 65 63 74 43 6f 6e 66 69 | 67 28 29 3b 0d 09 65 6c |ectConfi|g();..el|
|000011e0| 73 65 20 69 66 20 28 20 | 63 75 72 54 69 6d 65 20 |se if ( |curTime |
|000011f0| 2d 20 73 4c 61 73 74 57 | 68 65 6e 20 3c 20 3a 3a |- sLastW|hen < ::|
|00001200| 47 65 74 44 62 6c 54 69 | 6d 65 28 29 20 29 20 0d |GetDblTi|me() ) .|
|00001210| 09 09 67 57 43 20 2d 3e | 20 53 65 74 46 75 6c 6c |..gWC ->| SetFull|
|00001220| 53 63 72 65 65 6e 28 20 | 74 72 75 65 20 29 3b 0d |Screen( |true );.|
|00001230| 09 65 6c 73 65 20 69 66 | 20 28 20 21 20 67 57 43 |.else if| ( ! gWC|
|00001240| 20 2d 3e 20 49 73 46 75 | 6c 6c 53 63 72 65 65 6e | -> IsFu|llScreen|
|00001250| 28 29 20 29 20 7b 0d 09 | 09 69 66 20 28 20 62 75 |() ) {..|.if ( bu|
|00001260| 74 74 6f 6e 20 29 20 7b | 0d 09 09 09 52 65 63 74 |tton ) {|....Rect|
|00001270| 20 72 2c 20 67 72 6f 77 | 42 6f 78 2c 20 6c 69 6d | r, grow|Box, lim|
|00001280| 3b 0d 09 09 09 67 57 43 | 20 2d 3e 20 47 65 74 57 |;....gWC| -> GetW|
|00001290| 69 6e 52 65 63 74 28 20 | 72 20 29 3b 0d 09 09 09 |inRect( |r );....|
|000012a0| 67 72 6f 77 42 6f 78 20 | 3d 20 72 3b 0d 09 09 09 |growBox |= r;....|
|000012b0| 67 72 6f 77 42 6f 78 2e | 6c 65 66 74 20 3d 20 72 |growBox.|left = r|
|000012c0| 2e 72 69 67 68 74 20 2d | 20 33 30 3b 0d 09 09 09 |.right -| 30;....|
|000012d0| 67 72 6f 77 42 6f 78 2e | 74 6f 70 20 3d 20 72 2e |growBox.|top = r.|
|000012e0| 62 6f 74 74 6f 6d 20 2d | 20 33 30 3b 0d 09 09 09 |bottom -| 30;....|
|000012f0| 69 66 20 28 20 3a 3a 50 | 74 49 6e 52 65 63 74 28 |if ( ::P|tInRect(|
|00001300| 20 69 6e 50 74 2c 20 26 | 67 72 6f 77 42 6f 78 20 | inPt, &|growBox |
|00001310| 29 20 29 20 7b 0d 09 09 | 09 09 6c 69 6d 2e 74 6f |) ) {...|..lim.to|
|00001320| 70 20 3d 20 6c 69 6d 2e | 6c 65 66 74 20 3d 20 33 |p = lim.|left = 3|
|00001330| 30 3b 0d 09 09 09 09 6c | 69 6d 2e 62 6f 74 74 6f |0;.....l|im.botto|
|00001340| 6d 20 3d 20 6c 69 6d 2e | 72 69 67 68 74 20 3d 20 |m = lim.|right = |
|00001350| 39 30 30 30 3b 0d 09 09 | 09 09 75 6e 73 69 67 6e |9000;...|..unsign|
|00001360| 65 64 20 6c 6f 6e 67 20 | 6e 65 77 53 69 7a 65 20 |ed long |newSize |
|00001370| 3d 20 3a 3a 47 72 6f 77 | 57 69 6e 64 6f 77 28 20 |= ::Grow|Window( |
|00001380| 69 6e 57 69 6e 64 6f 77 | 2c 20 69 6e 50 74 2c 20 |inWindow|, inPt, |
|00001390| 26 6c 69 6d 20 29 3b 0d | 09 09 09 09 3a 3a 53 69 |&lim );.|....::Si|
|000013a0| 7a 65 57 69 6e 64 6f 77 | 28 20 69 6e 57 69 6e 64 |zeWindow|( inWind|
|000013b0| 6f 77 2c 20 6e 65 77 53 | 69 7a 65 20 26 20 30 78 |ow, newS|ize & 0x|
|000013c0| 46 46 46 46 2c 20 6e 65 | 77 53 69 7a 65 20 3e 3e |FFFF, ne|wSize >>|
|000013d0| 20 31 36 2c 20 66 61 6c | 73 65 20 29 3b 0d 09 09 | 16, fal|se );...|
|000013e0| 09 09 67 57 43 20 2d 3e | 20 47 65 74 57 69 6e 52 |..gWC ->| GetWinR|
|000013f0| 65 63 74 28 20 72 20 29 | 3b 0d 09 09 09 09 67 57 |ect( r )|;.....gW|
|00001400| 43 20 2d 3e 20 53 65 74 | 57 69 6e 50 6f 72 74 28 |C -> Set|WinPort(|
|00001410| 20 69 6e 57 69 6e 64 6f | 77 2c 20 26 72 20 29 3b | inWindo|w, &r );|
|00001420| 09 09 2f 2f 20 53 69 7a | 65 57 69 6e 64 6f 77 20 |..// Siz|eWindow |
|00001430| 63 68 61 6e 67 65 73 20 | 74 68 65 20 73 69 7a 65 |changes |the size|
|00001440| 20 6f 66 20 74 68 65 20 | 77 69 6e 2c 20 62 75 74 | of the |win, but|
|00001450| 20 67 57 43 20 64 6f 65 | 73 6e 27 74 20 6b 6e 6f | gWC doe|sn't kno|
|00001460| 77 20 74 68 61 74 0d 09 | 09 09 7d 0d 09 09 7d 0d |w that..|..}...}.|
|00001470| 09 09 73 4c 61 73 74 57 | 68 65 6e 20 3d 20 63 75 |..sLastW|hen = cu|
|00001480| 72 54 69 6d 65 3b 0d 09 | 7d 0d 0d 09 72 65 74 75 |rTime;..|}...retu|
|00001490| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 2a 2f 0d 0d |rn noErr|;.}.*/..|
|000014a0| 0d 4f 53 53 74 61 74 75 | 73 20 56 69 73 4d 61 63 |.OSStatu|s VisMac|
|000014b0| 45 76 65 6e 74 28 57 69 | 6e 64 6f 77 50 74 72 20 |Event(Wi|ndowPtr |
|000014c0| 69 6e 57 69 6e 64 6f 77 | 2c 20 45 76 65 6e 74 52 |inWindow|, EventR|
|000014d0| 65 63 6f 72 64 2a 20 69 | 6e 45 76 74 2c 20 55 49 |ecord* i|nEvt, UI|
|000014e0| 6e 74 33 32 2a 20 29 20 | 7b 0d 09 73 74 61 74 69 |nt32* ) |{..stati|
|000014f0| 63 20 6c 6f 6e 67 20 73 | 4c 61 73 74 57 68 65 6e |c long s|LastWhen|
|00001500| 20 3d 20 30 3b 0d 09 6c | 6f 6e 67 20 09 63 75 72 | = 0;..l|ong .cur|
|00001510| 54 69 6d 65 20 3d 20 3a | 3a 54 69 63 6b 43 6f 75 |Time = :|:TickCou|
|00001520| 6e 74 28 29 3b 0d 09 50 | 6f 69 6e 74 20 69 6e 50 |nt();..P|oint inP|
|00001530| 74 20 3d 20 69 6e 45 76 | 74 20 2d 3e 20 77 68 65 |t = inEv|t -> whe|
|00001540| 72 65 3b 0d 09 09 0d 09 | 73 77 69 74 63 68 20 28 |re;.....|switch (|
|00001550| 20 69 6e 45 76 74 20 2d | 3e 20 77 68 61 74 20 29 | inEvt -|> what )|
|00001560| 20 7b 0d 09 09 63 61 73 | 65 20 75 70 64 61 74 65 | {...cas|e update|
|00001570| 45 76 74 3a 09 0d 09 09 | 09 3a 3a 42 65 67 69 6e |Evt:....|.::Begin|
|00001580| 55 70 64 61 74 65 28 20 | 69 6e 57 69 6e 64 6f 77 |Update( |inWindow|
|00001590| 20 29 3b 0d 09 09 09 67 | 57 43 20 2d 3e 20 52 65 | );....g|WC -> Re|
|000015a0| 66 72 65 73 68 52 65 63 | 74 28 20 28 2a 2a 28 20 |freshRec|t( (**( |
|000015b0| 69 6e 57 69 6e 64 6f 77 | 20 2d 3e 20 76 69 73 52 |inWindow| -> visR|
|000015c0| 67 6e 29 29 2e 72 67 6e | 42 42 6f 78 20 29 3b 0d |gn)).rgn|BBox );.|
|000015d0| 09 09 09 3a 3a 45 6e 64 | 55 70 64 61 74 65 28 20 |...::End|Update( |
|000015e0| 69 6e 57 69 6e 64 6f 77 | 20 29 3b 0d 09 09 09 67 |inWindow| );....g|
|000015f0| 57 43 20 2d 3e 20 44 72 | 61 77 28 29 3b 20 0d 09 |WC -> Dr|aw(); ..|
|00001600| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 0d 09 09 0d |..break;|........|
|00001610| 09 09 63 61 73 65 20 6d | 6f 75 73 65 44 6f 77 6e |..case m|ouseDown|
|00001620| 3a 09 0d 09 09 09 69 66 | 20 28 20 67 57 43 20 2d |:.....if| ( gWC -|
|00001630| 3e 20 50 74 49 6e 54 69 | 74 6c 65 28 20 69 6e 50 |> PtInTi|tle( inP|
|00001640| 74 20 29 20 7c 7c 20 28 | 20 69 6e 45 76 74 20 2d |t ) || (| inEvt -|
|00001650| 3e 20 6d 6f 64 69 66 69 | 65 72 73 20 26 20 63 6d |> modifi|ers & cm|
|00001660| 64 4b 65 79 20 29 20 29 | 0d 09 09 09 09 67 57 43 |dKey ) )|.....gWC|
|00001670| 20 2d 3e 20 53 65 6c 65 | 63 74 43 6f 6e 66 69 67 | -> Sele|ctConfig|
|00001680| 28 29 3b 0d 09 09 09 65 | 6c 73 65 20 69 66 20 28 |();....e|lse if (|
|00001690| 20 67 57 43 20 2d 3e 20 | 49 73 46 75 6c 6c 53 63 | gWC -> |IsFullSc|
|000016a0| 72 65 65 6e 28 29 20 29 | 0d 09 09 09 09 67 57 43 |reen() )|.....gWC|
|000016b0| 20 2d 3e 20 53 65 74 46 | 75 6c 6c 53 63 72 65 65 | -> SetF|ullScree|
|000016c0| 6e 28 20 66 61 6c 73 65 | 20 29 3b 0d 09 09 09 65 |n( false| );....e|
|000016d0| 6c 73 65 20 69 66 20 28 | 20 63 75 72 54 69 6d 65 |lse if (| curTime|
|000016e0| 20 2d 20 73 4c 61 73 74 | 57 68 65 6e 20 3c 20 3a | - sLast|When < :|
|000016f0| 3a 47 65 74 44 62 6c 54 | 69 6d 65 28 29 20 29 20 |:GetDblT|ime() ) |
|00001700| 0d 09 09 09 09 67 57 43 | 20 2d 3e 20 53 65 74 46 |.....gWC| -> SetF|
|00001710| 75 6c 6c 53 63 72 65 65 | 6e 28 20 74 72 75 65 20 |ullScree|n( true |
|00001720| 29 3b 0d 09 09 09 65 6c | 73 65 20 69 66 20 28 20 |);....el|se if ( |
|00001730| 21 20 67 57 43 20 2d 3e | 20 49 73 46 75 6c 6c 53 |! gWC ->| IsFullS|
|00001740| 63 72 65 65 6e 28 29 20 | 29 20 7b 0d 09 09 09 09 |creen() |) {.....|
|00001750| 69 66 20 28 20 74 72 75 | 65 20 29 20 7b 0d 09 09 |if ( tru|e ) {...|
|00001760| 09 09 09 52 65 63 74 20 | 72 2c 20 67 72 6f 77 42 |...Rect |r, growB|
|00001770| 6f 78 2c 20 6c 69 6d 3b | 0d 09 09 09 09 09 67 57 |ox, lim;|......gW|
|00001780| 43 20 2d 3e 20 47 65 74 | 57 69 6e 52 65 63 74 28 |C -> Get|WinRect(|
|00001790| 20 72 20 29 3b 0d 09 09 | 09 09 09 67 72 6f 77 42 | r );...|...growB|
|000017a0| 6f 78 20 3d 20 72 3b 0d | 09 09 09 09 09 67 72 6f |ox = r;.|.....gro|
|000017b0| 77 42 6f 78 2e 6c 65 66 | 74 20 3d 20 72 2e 72 69 |wBox.lef|t = r.ri|
|000017c0| 67 68 74 20 2d 20 33 30 | 3b 0d 09 09 09 09 09 67 |ght - 30|;......g|
|000017d0| 72 6f 77 42 6f 78 2e 74 | 6f 70 20 3d 20 72 2e 62 |rowBox.t|op = r.b|
|000017e0| 6f 74 74 6f 6d 20 2d 20 | 33 30 3b 0d 09 09 09 09 |ottom - |30;.....|
|000017f0| 09 69 66 20 28 20 3a 3a | 50 74 49 6e 52 65 63 74 |.if ( ::|PtInRect|
|00001800| 28 20 69 6e 50 74 2c 20 | 26 67 72 6f 77 42 6f 78 |( inPt, |&growBox|
|00001810| 20 29 20 29 20 7b 0d 09 | 09 09 09 09 09 6c 69 6d | ) ) {..|.....lim|
|00001820| 2e 74 6f 70 20 3d 20 6c | 69 6d 2e 6c 65 66 74 20 |.top = l|im.left |
|00001830| 3d 20 33 30 3b 0d 09 09 | 09 09 09 09 6c 69 6d 2e |= 30;...|....lim.|
|00001840| 62 6f 74 74 6f 6d 20 3d | 20 6c 69 6d 2e 72 69 67 |bottom =| lim.rig|
|00001850| 68 74 20 3d 20 39 30 30 | 30 3b 0d 09 09 09 09 09 |ht = 900|0;......|
|00001860| 09 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 6e |.unsigne|d long n|
|00001870| 65 77 53 69 7a 65 20 3d | 20 3a 3a 47 72 6f 77 57 |ewSize =| ::GrowW|
|00001880| 69 6e 64 6f 77 28 20 69 | 6e 57 69 6e 64 6f 77 2c |indow( i|nWindow,|
|00001890| 20 69 6e 50 74 2c 20 26 | 6c 69 6d 20 29 3b 0d 09 | inPt, &|lim );..|
|000018a0| 09 09 09 09 09 3a 3a 53 | 69 7a 65 57 69 6e 64 6f |.....::S|izeWindo|
|000018b0| 77 28 20 69 6e 57 69 6e | 64 6f 77 2c 20 6e 65 77 |w( inWin|dow, new|
|000018c0| 53 69 7a 65 20 26 20 30 | 78 46 46 46 46 2c 20 6e |Size & 0|xFFFF, n|
|000018d0| 65 77 53 69 7a 65 20 3e | 3e 20 31 36 2c 20 66 61 |ewSize >|> 16, fa|
|000018e0| 6c 73 65 20 29 3b 0d 09 | 09 09 09 09 09 67 57 43 |lse );..|.....gWC|
|000018f0| 20 2d 3e 20 47 65 74 57 | 69 6e 52 65 63 74 28 20 | -> GetW|inRect( |
|00001900| 72 20 29 3b 0d 09 09 09 | 09 09 09 67 57 43 20 2d |r );....|...gWC -|
|00001910| 3e 20 53 65 74 57 69 6e | 50 6f 72 74 28 20 69 6e |> SetWin|Port( in|
|00001920| 57 69 6e 64 6f 77 2c 20 | 26 72 20 29 3b 09 09 2f |Window, |&r );../|
|00001930| 2f 20 53 69 7a 65 57 69 | 6e 64 6f 77 20 63 68 61 |/ SizeWi|ndow cha|
|00001940| 6e 67 65 73 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |nges the| size of|
|00001950| 20 74 68 65 20 77 69 6e | 2c 20 62 75 74 20 67 57 | the win|, but gW|
|00001960| 43 20 64 6f 65 73 6e 27 | 74 20 6b 6e 6f 77 20 74 |C doesn'|t know t|
|00001970| 68 61 74 0d 09 09 09 09 | 09 7d 0d 09 09 09 09 7d |hat.....|.}.....}|
|00001980| 0d 09 09 09 09 73 4c 61 | 73 74 57 68 65 6e 20 3d |.....sLa|stWhen =|
|00001990| 20 63 75 72 54 69 6d 65 | 3b 0d 09 09 09 7d 0d 09 | curTime|;....}..|
|000019a0| 09 09 62 72 65 61 6b 3b | 0d 09 7d 0d 0d 0d 09 72 |..break;|..}....r|
|000019b0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 7d 0d 0d |eturn no|Err;.}..|
|000019c0| 0d 0d 0d 0d 4f 53 53 74 | 61 74 75 73 09 56 69 73 |....OSSt|atus.Vis|
|000019d0| 41 62 6f 75 74 28 57 69 | 6e 64 6f 77 50 74 72 2c |About(Wi|ndowPtr,|
|000019e0| 20 55 49 6e 74 33 32 2a | 29 0d 7b 0d 09 3a 3a 4e | UInt32*|).{..::N|
|000019f0| 6f 74 65 41 6c 65 72 74 | 28 20 35 35 36 2c 20 6e |oteAlert|( 556, n|
|00001a00| 69 6c 20 29 3b 0d 09 72 | 65 74 75 72 6e 20 6e 6f |il );..r|eturn no|
|00001a10| 45 72 72 3b 0d 7d 0d 0d | 0d 0d 0d 0d 0d 2f 2a 20 |Err;.}..|...../* |
|00001a20| 0d 09 50 6c 75 67 53 65 | 74 74 69 6e 67 73 0d 0d |..PlugSe|ttings..|
|00001a30| 09 43 61 6c 6c 65 64 20 | 77 68 65 6e 20 75 73 65 |.Called |when use|
|00001a40| 72 20 73 65 6c 65 63 74 | 73 20 79 6f 75 72 20 70 |r select|s your p|
|00001a50| 6c 75 67 69 6e 20 66 72 | 6f 6d 20 74 68 65 20 53 |lugin fr|om the S|
|00001a60| 65 74 74 69 6e 67 73 20 | 73 75 62 6d 65 6e 75 2e |ettings |submenu.|
|00001a70| 20 4f 6e 6c 79 20 75 73 | 65 64 20 69 66 20 79 6f | Only us|ed if yo|
|00001a80| 75 20 68 61 76 65 20 64 | 65 63 6c 61 72 65 64 20 |u have d|eclared |
|00001a90| 74 68 61 74 0d 09 79 6f | 75 20 73 75 70 70 6f 72 |that..yo|u suppor|
|00001aa0| 74 20 73 65 74 74 69 6e | 67 73 20 28 66 6c 61 67 |t settin|gs (flag|
|00001ab0| 48 61 73 53 65 74 74 69 | 6e 67 73 20 69 73 20 73 |HasSetti|ngs is s|
|00001ac0| 65 74 29 2e 0d 09 0d 09 | 59 6f 75 20 73 68 6f 75 |et).....|You shou|
|00001ad0| 6c 64 20 64 69 73 70 6c | 61 79 20 74 68 65 20 73 |ld displ|ay the s|
|00001ae0| 65 74 74 69 6e 67 73 20 | 64 69 61 6c 6f 67 20 68 |ettings |dialog h|
|00001af0| 65 72 65 2c 20 6f 72 20 | 64 6f 20 77 68 61 74 65 |ere, or |do whate|
|00001b00| 76 65 72 72 20 79 6f 75 | 20 66 65 65 6c 20 6c 69 |verr you| feel li|
|00001b10| 6b 65 2e 20 3d 29 20 4a | 75 73 74 20 72 65 6d 65 |ke. =) J|ust reme|
|00001b20| 6d 62 65 72 20 74 68 61 | 74 20 77 68 65 6e 20 75 |mber tha|t when u|
|00001b30| 73 65 72 0d 09 63 68 6f | 6f 73 65 73 20 73 65 74 |ser..cho|oses set|
|00001b40| 74 69 6e 67 73 20 28 73 | 29 68 65 20 65 78 70 65 |tings (s|)he expe|
|00001b50| 63 74 73 20 73 6f 6d 65 | 20 69 6e 74 65 72 61 63 |cts some| interac|
|00001b60| 74 69 6e 6f 20 77 69 74 | 68 20 74 68 65 20 70 6c |tino wit|h the pl|
|00001b70| 75 67 69 6e 2c 20 6c 69 | 6b 65 20 74 68 65 20 64 |ugin, li|ke the d|
|00001b80| 69 61 6c 6f 67 20 6f 72 | 20 6c 69 6b 65 20 74 68 |ialog or| like th|
|00001b90| 61 74 2e 0d 2a 2f 0d 4f | 53 53 74 61 74 75 73 20 |at..*/.O|SStatus |
|00001ba0| 56 69 73 53 65 74 74 69 | 6e 67 73 28 57 69 6e 64 |VisSetti|ngs(Wind|
|00001bb0| 6f 77 50 74 72 20 69 6e | 57 69 6e 64 6f 77 2c 20 |owPtr in|Window, |
|00001bc0| 55 49 6e 74 33 32 2a 20 | 69 6f 52 65 66 63 6f 6e |UInt32* |ioRefcon|
|00001bd0| 29 20 7b 0d 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |) {..#pr|agma unu|
|00001be0| 73 65 64 20 28 69 6e 57 | 69 6e 64 6f 77 2c 20 69 |sed (inW|indow, i|
|00001bf0| 6f 52 65 66 63 6f 6e 29 | 0d 09 72 65 74 75 72 6e |oRefcon)|..return|
|00001c00| 20 6e 6f 45 72 72 3b 0d | 7d 0d 0d 0d 0d 0d 0d 0d | noErr;.|}.......|
|00001c10| 0d 0d 0d 0d 23 69 66 64 | 65 66 20 4d 41 43 41 4d |....#ifd|ef MACAM|
|00001c20| 50 0d 0d 2f 2a 20 0d 0d | 2a 2a 2a 2a 2a 20 20 45 |P../* ..|***** E|
|00001c30| 76 65 72 79 74 68 69 6e | 67 20 62 65 6c 6f 77 20 |verythin|g below |
|00001c40| 68 65 72 65 20 69 73 20 | 66 6f 72 20 61 20 70 72 |here is |for a pr|
|00001c50| 6f 6a 65 63 74 20 74 68 | 61 74 20 72 75 6e 73 20 |oject th|at runs |
|00001c60| 6f 6e 20 69 74 73 20 6f | 77 6e 2e 20 20 0d 0d 45 |on its o|wn. ..E|
|00001c70| 73 73 65 6e 74 69 61 6c | 20 77 68 65 6e 20 79 6f |ssential| when yo|
|00001c80| 75 20 6e 65 65 64 20 74 | 6f 20 64 65 62 75 67 2c |u need t|o debug,|
|00001c90| 20 65 74 63 0d 2d 41 43 | 4f 20 31 2f 31 34 2f 39 | etc.-AC|O 1/14/9|
|00001ca0| 39 0d 0d 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |9..*/..#|include |
|00001cb0| 3c 54 79 70 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Types.h|>.#inclu|
|00001cc0| 64 65 20 3c 4d 65 6d 6f | 72 79 2e 68 3e 0d 23 69 |de <Memo|ry.h>.#i|
|00001cd0| 6e 63 6c 75 64 65 20 3c | 51 75 69 63 6b 64 72 61 |nclude <|Quickdra|
|00001ce0| 77 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 46 |w.h>.#in|clude <F|
|00001cf0| 6f 6e 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |onts.h>.|#include|
|00001d00| 20 3c 45 76 65 6e 74 73 | 2e 68 3e 0d 23 69 6e 63 | <Events|.h>.#inc|
|00001d10| 6c 75 64 65 20 3c 4d 65 | 6e 75 73 2e 68 3e 0d 23 |lude <Me|nus.h>.#|
|00001d20| 69 6e 63 6c 75 64 65 20 | 3c 57 69 6e 64 6f 77 73 |include |<Windows|
|00001d30| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 65 |.h>.#inc|lude <Te|
|00001d40| 78 74 45 64 69 74 2e 68 | 3e 0d 23 69 6e 63 6c 75 |xtEdit.h|>.#inclu|
|00001d50| 64 65 20 3c 44 69 61 6c | 6f 67 73 2e 68 3e 0d 23 |de <Dial|ogs.h>.#|
|00001d60| 69 6e 63 6c 75 64 65 20 | 3c 4f 53 55 74 69 6c 73 |include |<OSUtils|
|00001d70| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 6f |.h>.#inc|lude <To|
|00001d80| 6f 6c 55 74 69 6c 73 2e | 68 3e 0d 23 69 6e 63 6c |olUtils.|h>.#incl|
|00001d90| 75 64 65 20 3c 53 65 67 | 4c 6f 61 64 2e 68 3e 0d |ude <Seg|Load.h>.|
|00001da0| 23 69 6e 63 6c 75 64 65 | 20 3c 53 6f 75 6e 64 2e |#include| <Sound.|
|00001db0| 68 3e 0d 0d 09 0d 2f 2a | 20 50 72 6f 74 6f 74 79 |h>..../*| Prototy|
|00001dc0| 70 65 73 20 2a 2f 0d 76 | 6f 69 64 20 49 6e 69 74 |pes */.v|oid Init|
|00001dd0| 69 61 6c 69 7a 65 28 76 | 6f 69 64 29 3b 0d 0d 2f |ialize(v|oid);../|
|00001de0| 2f 20 0d 2f 2f 09 4d 61 | 69 6e 20 62 6f 64 79 20 |/ .//.Ma|in body |
|00001df0| 6f 66 20 70 72 6f 67 72 | 61 6d 20 53 69 6c 6c 79 |of progr|am Silly|
|00001e00| 42 61 6c 6c 73 0d 2f 2f | 0d 23 69 6e 63 6c 75 64 |Balls.//|.#includ|
|00001e10| 65 20 22 45 78 70 72 65 | 73 73 69 6f 6e 2e 68 22 |e "Expre|ssion.h"|
|00001e20| 0d 23 69 6e 63 6c 75 64 | 65 20 22 48 61 73 68 74 |.#includ|e "Hasht|
|00001e30| 61 62 6c 65 2e 68 22 0d | 0d 0d 0d 0d 76 6f 69 64 |able.h".|....void|
|00001e40| 20 64 75 6d 6d 79 47 65 | 74 46 46 54 28 20 64 6f | dummyGe|tFFT( do|
|00001e50| 75 62 6c 65 2a 2a 20 6f | 75 74 46 46 54 2c 20 55 |uble** o|utFFT, U|
|00001e60| 49 6e 74 31 36 2a 20 6f | 75 74 46 46 54 53 69 7a |Int16* o|utFFTSiz|
|00001e70| 65 20 29 3b 0d 0d 76 6f | 69 64 20 64 75 6d 6d 79 |e );..vo|id dummy|
|00001e80| 47 65 74 46 46 54 28 20 | 64 6f 75 62 6c 65 2a 2a |GetFFT( |double**|
|00001e90| 20 6f 75 74 46 46 54 2c | 20 55 49 6e 74 31 36 2a | outFFT,| UInt16*|
|00001ea0| 20 6f 75 74 46 46 54 53 | 69 7a 65 20 29 20 7b 0d | outFFTS|ize ) {.|
|00001eb0| 09 2a 6f 75 74 46 46 54 | 20 3d 20 67 44 75 6d 6d |.*outFFT| = gDumm|
|00001ec0| 79 46 46 54 3b 0d 09 2a | 6f 75 74 46 46 54 53 69 |yFFT;..*|outFFTSi|
|00001ed0| 7a 65 20 3d 20 30 3b 0d | 7d 0d 0d 2f 2f 4d 57 20 |ze = 0;.|}..//MW |
|00001ee0| 73 70 65 63 69 66 69 65 | 64 20 61 72 67 75 6d 65 |specifie|d argume|
|00001ef0| 6e 74 20 61 6e 64 20 72 | 65 74 75 72 6e 20 74 79 |nt and r|eturn ty|
|00001f00| 70 65 2e 0d 69 6e 74 20 | 6d 61 69 6e 28 76 6f 69 |pe..int |main(voi|
|00001f10| 64 29 0d 7b 0d 09 47 72 | 61 66 50 6f 72 74 20 77 |d).{..Gr|afPort w|
|00001f20| 69 6e 3b 0d 09 57 69 6e | 64 6f 77 50 74 72 20 77 |in;..Win|dowPtr w|
|00001f30| 69 6e 50 20 3d 20 26 77 | 69 6e 3b 0d 09 75 6e 73 |inP = &w|in;..uns|
|00001f40| 69 67 6e 65 64 20 6c 6f | 6e 67 09 6e 75 6d 2c 20 |igned lo|ng.num, |
|00001f50| 4e 20 3d 20 4e 55 4d 5f | 53 41 4d 50 4c 45 5f 42 |N = NUM_|SAMPLE_B|
|00001f60| 49 4e 53 3b 0d 09 46 53 | 53 70 65 63 20 73 70 65 |INS;..FS|Spec spe|
|00001f70| 63 3b 0d 0d 09 66 6f 72 | 20 28 20 6e 75 6d 20 3d |c;...for| ( num =|
|00001f80| 20 30 3b 20 6e 75 6d 20 | 3c 20 4e 3b 20 6e 75 6d | 0; num |< N; num|
|00001f90| 2b 2b 20 29 0d 09 09 67 | 44 75 6d 6d 79 46 46 54 |++ )...g|DummyFFT|
|00001fa0| 5b 20 6e 75 6d 20 5d 20 | 3d 20 30 3b 0d 09 0d 09 |[ num ] |= 0;....|
|00001fb0| 49 6e 69 74 69 61 6c 69 | 7a 65 28 29 3b 0d 09 67 |Initiali|ze();..g|
|00001fc0| 50 6c 75 67 49 6e 66 6f | 2e 6d 61 20 3d 20 6e 65 |PlugInfo|.ma = ne|
|00001fd0| 77 20 56 50 43 61 6c 6c | 62 61 63 6b 73 3b 0d 09 |w VPCall|backs;..|
|00001fe0| 67 50 6c 75 67 49 6e 66 | 6f 2e 6d 61 20 2d 3e 20 |gPlugInf|o.ma -> |
|00001ff0| 47 65 74 46 46 54 20 3d | 20 64 75 6d 6d 79 47 65 |GetFFT =| dummyGe|
|00002000| 74 46 46 54 3b 0d 09 67 | 50 6c 75 67 49 6e 66 6f |tFFT;..g|PlugInfo|
|00002010| 2e 6d 61 20 2d 3e 20 47 | 65 74 53 74 61 74 75 73 |.ma -> G|etStatus|
|00002020| 20 3d 20 4e 55 4c 4c 3b | 20 0d 09 67 50 6c 75 67 | = NULL;| ..gPlug|
|00002030| 49 6e 66 6f 2e 6d 61 20 | 2d 3e 20 45 6e 74 65 72 |Info.ma |-> Enter|
|00002040| 46 75 6c 6c 53 63 72 65 | 65 6e 20 3d 20 4e 55 4c |FullScre|en = NUL|
|00002050| 4c 3b 0d 09 67 50 6c 75 | 67 49 6e 66 6f 2e 6d 61 |L;..gPlu|gInfo.ma|
|00002060| 20 2d 3e 20 45 78 69 74 | 46 75 6c 6c 53 63 72 65 | -> Exit|FullScre|
|00002070| 65 6e 20 3d 20 4e 55 4c | 4c 3b 0d 09 0d 09 56 69 |en = NUL|L;....Vi|
|00002080| 73 49 6e 69 74 69 61 6c | 69 7a 65 28 20 26 73 70 |sInitial|ize( &sp|
|00002090| 65 63 2c 20 26 77 69 6e | 50 2c 20 26 6e 75 6d 20 |ec, &win|P, &num |
|000020a0| 29 3b 0d 0d 09 0d 09 64 | 6f 20 7b 0d 09 09 56 69 |);.....d|o {...Vi|
|000020b0| 73 44 72 61 77 28 20 77 | 69 6e 50 2c 20 26 6e 75 |sDraw( w|inP, &nu|
|000020c0| 6d 20 29 3b 0d 09 09 6c | 6f 6e 67 20 6e 20 3d 20 |m );...l|ong n = |
|000020d0| 45 67 4f 53 55 74 69 6c | 73 3a 3a 52 6e 64 28 20 |EgOSUtil|s::Rnd( |
|000020e0| 30 2c 20 4e 2d 31 20 29 | 3b 0d 09 09 67 44 75 6d |0, N-1 )|;...gDum|
|000020f0| 6d 79 46 46 54 5b 20 6e | 20 5d 20 2b 3d 20 2e 30 |myFFT[ n| ] += .0|
|00002100| 31 31 20 2a 20 45 67 4f | 53 55 74 69 6c 73 3a 3a |11 * EgO|SUtils::|
|00002110| 52 6e 64 28 20 30 2c 20 | 31 30 30 20 29 3b 0d 09 |Rnd( 0, |100 );..|
|00002120| 09 66 6f 72 20 28 20 6e | 75 6d 20 3d 20 30 3b 20 |.for ( n|um = 0; |
|00002130| 6e 75 6d 20 3c 20 4e 3b | 20 6e 75 6d 2b 2b 20 29 |num < N;| num++ )|
|00002140| 20 7b 0d 09 09 09 67 44 | 75 6d 6d 79 46 46 54 5b | {....gD|ummyFFT[|
|00002150| 20 6e 75 6d 20 5d 20 3d | 20 2e 38 20 2a 20 67 44 | num ] =| .8 * gD|
|00002160| 75 6d 6d 79 46 46 54 5b | 20 6e 75 6d 20 5d 3b 0d |ummyFFT[| num ];.|
|00002170| 09 09 7d 0d 09 7d 20 77 | 68 69 6c 65 20 28 21 42 |..}..} w|hile (!B|
|00002180| 75 74 74 6f 6e 28 29 29 | 3b 0d 0d 09 56 69 73 54 |utton())|;...VisT|
|00002190| 65 72 6d 69 6e 61 74 65 | 28 20 77 69 6e 50 2c 20 |erminate|( winP, |
|000021a0| 26 6e 75 6d 20 29 3b 0d | 09 0d 09 64 65 6c 65 74 |&num );.|...delet|
|000021b0| 65 20 67 50 6c 75 67 49 | 6e 66 6f 2e 6d 61 3b 0d |e gPlugI|nfo.ma;.|
|000021c0| 09 0d 09 72 65 74 75 72 | 6e 20 30 3b 09 0d 7d 0d |...retur|n 0;..}.|
|000021d0| 0d 0d 2f 2f 20 0d 2f 2f | 09 49 6e 69 74 69 61 6c |..// .//|.Initial|
|000021e0| 69 7a 65 20 65 76 65 72 | 79 74 68 69 6e 67 20 66 |ize ever|ything f|
|000021f0| 6f 72 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2c 20 |or the p|rogram, |
|00002200| 6d 61 6b 65 20 73 75 72 | 65 20 77 65 20 63 61 6e |make sur|e we can|
|00002210| 20 72 75 6e 0d 2f 2f 0d | 0d 2f 2f 4d 57 20 73 70 | run.//.|.//MW sp|
|00002220| 65 63 69 66 69 65 64 20 | 61 72 67 75 6d 65 6e 74 |ecified |argument|
|00002230| 20 61 6e 64 20 72 65 74 | 75 72 6e 20 74 79 70 65 | and ret|urn type|
|00002240| 2e 0d 76 6f 69 64 20 49 | 6e 69 74 69 61 6c 69 7a |..void I|nitializ|
|00002250| 65 28 76 6f 69 64 29 0d | 7b 0d 09 4f 53 45 72 72 |e(void).|{..OSErr|
|00002260| 09 09 65 72 72 6f 72 3b | 0d 09 53 79 73 45 6e 76 |..error;|..SysEnv|
|00002270| 52 65 63 09 74 68 65 57 | 6f 72 6c 64 3b 0d 09 09 |Rec.theW|orld;...|
|00002280| 0d 09 2f 2f 0d 09 2f 2f | 09 54 65 73 74 20 74 68 |..//..//|.Test th|
|00002290| 65 20 63 6f 6d 70 75 74 | 65 72 20 74 6f 20 62 65 |e comput|er to be|
|000022a0| 20 73 75 72 65 20 77 65 | 20 63 61 6e 20 64 6f 20 | sure we| can do |
|000022b0| 63 6f 6c 6f 72 2e 20 20 | 0d 09 2f 2f 09 49 66 20 |color. |..//.If |
|000022c0| 6e 6f 74 20 77 65 20 77 | 6f 75 6c 64 20 63 72 61 |not we w|ould cra|
|000022d0| 73 68 2c 20 77 68 69 63 | 68 20 77 6f 75 6c 64 20 |sh, whic|h would |
|000022e0| 62 65 20 62 61 64 2e 20 | 20 0d 09 2f 2f 09 49 66 |be bad. | ..//.If|
|000022f0| 20 77 65 20 63 61 6e d5 | 74 20 72 75 6e 2c 20 6a | we can.|t run, j|
|00002300| 75 73 74 20 62 65 65 70 | 20 61 6e 64 20 65 78 69 |ust beep| and exi|
|00002310| 74 2e 0d 09 2f 2f 0d 0d | 09 65 72 72 6f 72 20 3d |t...//..|.error =|
|00002320| 20 53 79 73 45 6e 76 69 | 72 6f 6e 73 28 31 2c 20 | SysEnvi|rons(1, |
|00002330| 26 74 68 65 57 6f 72 6c | 64 29 3b 0d 09 69 66 20 |&theWorl|d);..if |
|00002340| 28 74 68 65 57 6f 72 6c | 64 2e 68 61 73 43 6f 6c |(theWorl|d.hasCol|
|00002350| 6f 72 51 44 20 3d 3d 20 | 66 61 6c 73 65 29 20 7b |orQD == |false) {|
|00002360| 0d 09 09 53 79 73 42 65 | 65 70 28 35 30 29 3b 0d |...SysBe|ep(50);.|
|00002370| 09 09 45 78 69 74 54 6f | 53 68 65 6c 6c 28 29 3b |..ExitTo|Shell();|
|00002380| 09 09 09 09 09 2f 2a 20 | 49 66 20 6e 6f 20 63 6f |...../* |If no co|
|00002390| 6c 6f 72 20 51 44 2c 20 | 77 65 20 6d 75 73 74 20 |lor QD, |we must |
|000023a0| 6c 65 61 76 65 2e 20 2a | 2f 0d 09 7d 0d 09 0d 09 |leave. *|/..}....|
|000023b0| 2f 2a 20 49 6e 69 74 69 | 61 6c 69 7a 65 20 61 6c |/* Initi|alize al|
|000023c0| 6c 20 74 68 65 20 6e 65 | 65 64 65 64 20 6d 61 6e |l the ne|eded man|
|000023d0| 61 67 65 72 73 2e 20 2a | 2f 0d 09 49 6e 69 74 47 |agers. *|/..InitG|
|000023e0| 72 61 66 28 26 71 64 2e | 74 68 65 50 6f 72 74 29 |raf(&qd.|thePort)|
|000023f0| 3b 0d 09 49 6e 69 74 46 | 6f 6e 74 73 28 29 3b 0d |;..InitF|onts();.|
|00002400| 09 49 6e 69 74 57 69 6e | 64 6f 77 73 28 29 3b 0d |.InitWin|dows();.|
|00002410| 09 49 6e 69 74 4d 65 6e | 75 73 28 29 3b 0d 09 54 |.InitMen|us();..T|
|00002420| 45 49 6e 69 74 28 29 3b | 0d 09 49 6e 69 74 44 69 |EInit();|..InitDi|
|00002430| 61 6c 6f 67 73 28 6e 69 | 6c 29 3b 0d 09 49 6e 69 |alogs(ni|l);..Ini|
|00002440| 74 43 75 72 73 6f 72 28 | 29 3b 0d 0d 09 2f 2f 0d |tCursor(|);...//.|
|00002450| 09 2f 2f 09 54 6f 20 6d | 61 6b 65 20 74 68 65 20 |.//.To m|ake the |
|00002460| 52 61 6e 64 6f 6d 20 73 | 65 71 75 65 6e 63 65 73 |Random s|equences|
|00002470| 20 74 72 75 6c 79 20 72 | 61 6e 64 6f 6d 2c 20 77 | truly r|andom, w|
|00002480| 65 20 6e 65 65 64 20 74 | 6f 20 6d 61 6b 65 20 74 |e need t|o make t|
|00002490| 68 65 20 73 65 65 64 20 | 73 74 61 72 74 0d 09 2f |he seed |start../|
|000024a0| 2f 09 61 74 20 61 20 64 | 69 66 66 65 72 65 6e 74 |/.at a d|ifferent|
|000024b0| 20 6e 75 6d 62 65 72 2e | 20 20 41 6e 20 65 61 73 | number.| An eas|
|000024c0| 79 20 77 61 79 20 74 6f | 20 64 6f 20 74 68 69 73 |y way to| do this|
|000024d0| 20 69 73 20 74 6f 20 70 | 75 74 20 74 68 65 20 63 | is to p|ut the c|
|000024e0| 75 72 72 65 6e 74 20 74 | 69 6d 65 0d 09 2f 2f 09 |urrent t|ime..//.|
|000024f0| 61 6e 64 20 64 61 74 65 | 20 69 6e 74 6f 20 74 68 |and date| into th|
|00002500| 65 20 73 65 65 64 2e 20 | 20 53 69 6e 63 65 20 69 |e seed. | Since i|
|00002510| 74 20 69 73 20 61 6c 77 | 61 79 73 20 69 6e 63 72 |t is alw|ays incr|
|00002520| 65 6d 65 6e 74 69 6e 67 | 20 74 68 65 20 73 74 61 |ementing| the sta|
|00002530| 72 74 69 6e 67 20 73 65 | 65 64 0d 09 2f 2f 09 77 |rting se|ed..//.w|
|00002540| 69 6c 6c 20 61 6c 77 61 | 79 73 20 62 65 20 64 69 |ill alwa|ys be di|
|00002550| 66 66 65 72 65 6e 74 2e | 20 20 44 6f 6e d5 74 20 |fferent.| Don.t |
|00002560| 66 6f 72 20 65 61 63 68 | 20 63 61 6c 6c 20 6f 66 |for each| call of|
|00002570| 20 52 61 6e 64 6f 6d 2c | 20 6f 72 20 74 68 65 20 | Random,| or the |
|00002580| 73 65 71 75 65 6e 63 65 | 0d 09 2f 2f 09 77 69 6c |sequence|..//.wil|
|00002590| 6c 20 6e 6f 20 6c 6f 6e | 67 65 72 20 62 65 20 72 |l no lon|ger be r|
|000025a0| 61 6e 64 6f 6d 2e 20 20 | 4f 6e 6c 79 20 6e 65 65 |andom. |Only nee|
|000025b0| 64 65 64 20 6f 6e 63 65 | 2c 20 68 65 72 65 20 69 |ded once|, here i|
|000025c0| 6e 20 74 68 65 20 69 6e | 69 74 2e 0d 09 2f 2f 0d |n the in|it...//.|
|000025d0| 09 47 65 74 44 61 74 65 | 54 69 6d 65 28 28 75 6e |.GetDate|Time((un|
|000025e0| 73 69 67 6e 65 64 20 6c | 6f 6e 67 2a 29 20 26 71 |signed l|ong*) &q|
|000025f0| 64 2e 72 61 6e 64 53 65 | 65 64 29 3b 0d 0d 7d 0d |d.randSe|ed);..}.|
|00002600| 0d 0d 23 65 6e 64 69 66 | 0d 00 00 00 00 00 00 00 |..#endif|........|
|00002610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002680| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00002690| 20 68 61 76 65 6e 74 20 | 74 65 73 74 65 64 2e 2e | havent |tested..|
|000026a0| 2e 20 2a 2f 0d 09 09 09 | 74 6d 70 3d 28 4d 41 58 |. */....|tmp=(MAX|
|000026b0| 08 6d 61 69 6e 2e 63 70 | 70 6f 6c 64 65 72 50 72 |.main.cp|polderPr|
|000026c0| 65 66 73 65 73 68 6f 75 | 73 65 5f 6d 69 78 2e 6d |efseshou|se_mix.m|
|000026d0| 00 73 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |.sTEXTCW|IE......|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 b1 d1 3f 74 00 00 | 2b eb 00 00 01 9a 09 09 |....?t..|+.......|
|00002700| 09 6e 6f 5f 6f 66 5f 69 | 6d 64 63 74 73 5b 30 5d |.no_of_i|mdcts[0]|
|00002710| 3d 6e 6f 5f 6f 66 5f 69 | 6d 64 63 74 73 5b 31 5d |=no_of_i|mdcts[1]|
|00002720| 3d 28 74 5f 73 5b 73 66 | 62 5d 2d 31 29 2f 36 2b |=(t_s[sf|b]-1)/6+|
|00002730| 31 3b 0d 09 7d 0d 09 65 | 6c 73 65 20 6e 6f 5f 6f |1;..}..e|lse no_o|
|00002740| 66 5f 69 6d 64 63 74 73 | 5b 30 5d 3d 6e 6f 5f 6f |f_imdcts|[0]=no_o|
|00002750| 66 5f 69 6d 64 63 74 73 | 5b 31 5d 3d 28 69 73 62 |f_imdcts|[1]=(isb|
|00002760| 6f 75 6e 64 5b 30 5d 2d | 31 29 2f 31 38 2b 31 3b |ound[0]-|1)/18+1;|
|00002770| 0d 0d 20 20 20 7d 0d 0d | 20 20 20 72 65 74 75 72 |.. }..| retur|
|00002780| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 03 | 00 04 00 2f 00 0a 02 0c |........|.../....|
|000027b0| 02 60 00 2f 00 0a 02 0c | 02 60 b3 ee 53 ef 00 00 |.`./....|.`..S...|
|000027c0| 0a 47 00 00 0a 55 00 00 | 09 ea 01 00 00 00 00 04 |.G...U..|........|
|000027d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|000027e0| 00 00 00 46 05 c6 db 80 | 1a 72 00 00 00 1c 00 46 |...F....|.r.....F|
|000027f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00002800| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00002810| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+