home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-10-16 | 10.5 KB | [ TEXT/CWIE]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
You can browse this item here: mainMacAMP.cpp
Confidence Program Detection Match Type Support
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, inited, Sat Oct 16 02:14:07 1999, modified Sat Oct 16 02:14:07 1999, creator 'CWIE', type ASCII, 10098 bytes "mainMacAMP.cpp" , at 0x27f2 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 key value 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 27 72 00 | 00 01 9a b4 2d c8 2f b4 |.....'r.|....-./.| |00000060| 2d c8 2f 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 69 85 00 00 |........|....i...| |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 | 56 69 73 4b 65 79 44 6f |nil,....|VisKeyDo| |000002c0| 77 6e 2c 09 09 09 2f 2f | 20 77 65 20 64 6f 6e 27 |wn,...//| we don'| |000002d0| 74 20 77 61 6e 74 20 6b | 65 79 64 6f 77 6e 73 2e |t want k|eydowns.| |000002e0| 2e 0d 09 56 69 73 4d 61 | 63 45 76 65 6e 74 2c 09 |...VisMa|cEvent,.| |000002f0| 09 2f 2f 20 2e 2e 2e 61 | 6e 64 20 65 76 65 6e 74 |.// ...a|nd event| |00000300| 73 0d 09 0d 09 6e 69 6c | 2c 0d 09 6e 69 6c 2c 09 |s....nil|,..nil,.| |00000310| 09 09 09 2f 2f 20 77 65 | 20 68 61 76 65 20 6e 6f |...// we| have no| |00000320| 20 73 65 74 74 69 6e 67 | 73 0d 09 6e 69 6c 2c 0d | setting|s..nil,.| |00000330| 09 6e 69 6c 2c 0d 09 0d | 09 2f 2f 20 4e 69 66 74 |.nil,...|.// Nift| |00000340| 79 20 6d 61 63 72 6f 20 | 74 6f 20 73 65 74 20 61 |y macro |to set a| |00000350| 6c 6c 20 74 68 65 73 65 | 20 27 72 65 73 65 72 76 |ll these| 'reserv| |00000360| 65 64 27 20 76 61 6c 75 | 65 73 20 66 6f 72 20 75 |ed' valu|es for u| |00000370| 73 0d 09 56 50 5f 49 4e | 46 4f 42 4c 4f 43 4b 5f |s..VP_IN|FOBLOCK_| |00000380| 46 4f 4f 54 45 52 0d 7d | 3b 0d 0d 0d 0d 0d 2f 2f |FOOTER.}|;.....//| |00000390| 20 54 68 65 73 65 20 61 | 72 65 20 67 6c 6f 62 61 | These a|re globa| |000003a0| 6c 73 2e 0d 73 74 61 74 | 69 63 20 57 68 69 74 65 |ls..stat|ic White| |000003b0| 43 61 70 2a 09 09 67 57 | 43 20 3d 20 4e 55 4c 4c |Cap*..gW|C = NULL| |000003c0| 3b 0d 73 74 61 74 69 63 | 20 73 68 6f 72 74 09 09 |;.static| short..| |000003d0| 09 67 52 65 66 4e 75 6d | 20 3d 20 2d 31 3b 0d 73 |.gRefNum| = -1;.s| |000003e0| 74 61 74 69 63 20 64 6f | 75 62 6c 65 09 09 09 67 |tatic do|uble...g| |000003f0| 44 75 6d 6d 79 46 46 54 | 5b 20 4e 55 4d 5f 53 41 |DummyFFT|[ NUM_SA| |00000400| 4d 50 4c 45 5f 42 49 4e | 53 20 5d 3b 0d 0d 0d 0d |MPLE_BIN|S ];....| |00000410| 2f 2a 20 0d 09 50 6c 75 | 67 49 6e 69 74 69 61 6c |/* ..Plu|gInitial| |00000420| 69 7a 65 0d 0d 09 43 61 | 6c 6c 65 64 20 65 76 65 |ize...Ca|lled eve| |00000430| 72 79 20 74 69 6d 65 20 | 75 73 65 20 73 65 6c 65 |ry time |use sele| |00000440| 63 74 73 20 79 6f 75 72 | 20 70 6c 75 67 69 6e 20 |cts your| plugin | |00000450| 66 72 6f 6d 20 74 68 65 | 20 50 6c 75 67 69 6e 73 |from the| Plugins| |00000460| 20 6d 65 6e 75 2e 20 59 | 6f 75 20 6e 65 65 64 20 | menu. Y|ou need | |00000470| 74 6f 20 61 6c 6c 6f 63 | 61 74 65 20 61 6e 64 20 |to alloc|ate and | |00000480| 64 69 73 70 6c 61 79 20 | 61 20 77 69 6e 64 6f 77 |display |a window| |00000490| 20 68 65 72 65 2c 0d 09 | 69 6e 69 74 20 79 6f 75 | here,..|init you| |000004a0| 72 20 76 61 72 69 61 62 | 6c 65 73 2c 20 61 6e 64 |r variab|les, and| |000004b0| 20 64 6f 20 77 68 61 74 | 65 76 65 72 20 79 6f 75 | do what|ever you| |000004c0| 20 77 61 6e 74 2c 20 6c | 69 6b 65 20 73 65 74 20 | want, l|ike set | |000004d0| 74 68 65 20 72 65 66 6e | 75 6d 20 69 66 20 79 6f |the refn|um if yo| |000004e0| 75 20 6e 65 65 64 20 69 | 74 2e 0d 09 0d 09 54 68 |u need i|t.....Th| |000004f0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 75 73 65 73 |is funct|ion uses| |00000500| 20 46 53 53 70 65 63 20 | 74 6f 20 69 74 73 65 6c | FSSpec |to itsel| |00000510| 66 20 74 68 61 74 20 4d | 61 63 41 6d 70 20 70 72 |f that M|acAmp pr| |00000520| 6f 76 69 64 65 73 20 74 | 6f 20 69 74 20 74 6f 20 |ovides t|o it to | |00000530| 67 61 69 6e 20 61 63 63 | 65 73 73 20 74 6f 20 69 |gain acc|ess to i| |00000540| 74 73 20 72 65 73 6f 75 | 72 63 65 20 66 6f 72 6b |ts resou|rce fork| |00000550| 2e 0d 09 0d 09 4f 74 68 | 65 72 20 74 68 61 6e 20 |.....Oth|er than | |00000560| 74 68 61 74 2c 20 65 76 | 65 72 79 74 68 69 6e 67 |that, ev|erything| |00000570| 20 69 73 20 68 61 72 64 | 2d 63 6f 64 65 64 20 61 | is hard|-coded a| |00000580| 6e 64 20 69 73 20 64 65 | 66 69 6e 69 74 6c 79 20 |nd is de|finitly | |00000590| 6e 6f 74 20 61 6e 20 65 | 78 61 6d 70 6c 65 20 6f |not an e|xample o| |000005a0| 66 20 67 6f 6f 64 20 70 | 72 6f 67 72 61 6d 6d 69 |f good p|rogrammi| |000005b0| 6e 67 20 3d 50 0d 2a 2f | 0d 4f 53 53 74 61 74 75 |ng =P.*/|.OSStatu| |000005c0| 73 09 56 69 73 49 6e 69 | 74 69 61 6c 69 7a 65 28 |s.VisIni|tialize(| |000005d0| 46 53 53 70 65 63 50 74 | 72 20 69 6e 50 6c 75 67 |FSSpecPt|r inPlug| |000005e0| 69 6e 2c 20 57 69 6e 64 | 6f 77 50 74 72 2a 20 6f |in, Wind|owPtr* o| |000005f0| 75 74 57 69 6e 64 6f 77 | 2c 20 55 49 6e 74 33 32 |utWindow|, UInt32| |00000600| 2a 20 29 20 7b 0d 09 0d | 09 67 52 65 66 4e 75 6d |* ) {...|.gRefNum| |00000610| 20 3d 20 3a 3a 46 53 70 | 4f 70 65 6e 52 65 73 46 | = ::FSp|OpenResF| |00000620| 69 6c 65 28 20 69 6e 50 | 6c 75 67 69 6e 2c 20 66 |ile( inP|lugin, f| |00000630| 73 52 64 50 65 72 6d 20 | 29 3b 0d 0d 09 45 67 4f |sRdPerm |);...EgO| |00000640| 53 55 74 69 6c 73 3a 3a | 49 6e 69 74 69 61 6c 69 |SUtils::|Initiali| |00000650| 7a 65 28 29 3b 0d 09 50 | 69 78 50 6f 72 74 3a 3a |ze();..P|ixPort::| |00000660| 53 74 61 72 74 75 70 28 | 29 3b 0d 09 09 0d 09 43 |Startup(|);.....C| |00000670| 45 67 46 69 6c 65 53 70 | 65 63 20 66 6f 6c 64 65 |EgFileSp|ec folde| |00000680| 72 3b 0d 09 66 6f 6c 64 | 65 72 2e 41 73 73 69 67 |r;..fold|er.Assig| |00000690| 6e 46 6f 6c 64 65 72 28 | 20 22 57 68 69 74 65 43 |nFolder(| "WhiteC| |000006a0| 61 70 20 43 6f 6e 66 69 | 67 73 22 20 29 3b 0d 09 |ap Confi|gs" );..| |000006b0| 67 57 43 20 3d 20 6e 65 | 77 20 57 68 69 74 65 43 |gWC = ne|w WhiteC| |000006c0| 61 70 28 20 66 6f 6c 64 | 65 72 20 29 3b 0d 09 0d |ap( fold|er );...| |000006d0| 09 52 65 63 74 20 72 20 | 3d 20 7b 20 30 2c 20 30 |.Rect r |= { 0, 0| |000006e0| 2c 20 30 2c 20 30 20 7d | 3b 0d 09 0d 09 69 66 20 |, 0, 0 }|;....if | |000006f0| 28 20 67 57 43 20 2d 3e | 20 42 6f 72 64 65 72 6c |( gWC ->| Borderl| |00000700| 65 73 73 57 69 6e 64 6f | 77 28 29 20 29 0d 09 09 |essWindo|w() )...| |00000710| 2a 6f 75 74 57 69 6e 64 | 6f 77 20 3d 20 3a 3a 4e |*outWind|ow = ::N| |00000720| 65 77 43 57 69 6e 64 6f | 77 28 20 4e 55 4c 4c 2c |ewCWindo|w( NULL,| |00000730| 20 26 72 2c 20 22 5c 70 | 57 68 69 74 65 43 61 70 | &r, "\p|WhiteCap| |00000740| 22 2c 20 66 61 6c 73 65 | 2c 20 70 6c 61 69 6e 44 |", false|, plainD| |00000750| 42 6f 78 2c 09 28 57 69 | 6e 64 6f 77 50 74 72 29 |Box,.(Wi|ndowPtr)| |00000760| 2d 31 2c 20 74 72 75 65 | 2c 20 4e 55 4c 4c 20 29 |-1, true|, NULL )| |00000770| 3b 0d 09 65 6c 73 65 0d | 09 09 2a 6f 75 74 57 69 |;..else.|..*outWi| |00000780| 6e 64 6f 77 20 3d 20 3a | 3a 4e 65 77 43 57 69 6e |ndow = :|:NewCWin| |00000790| 64 6f 77 28 20 4e 55 4c | 4c 2c 20 26 72 2c 20 22 |dow( NUL|L, &r, "| |000007a0| 5c 70 57 68 69 74 65 43 | 61 70 22 2c 20 66 61 6c |\pWhiteC|ap", fal| |000007b0| 73 65 2c 20 31 39 38 35 | 2c 09 09 09 28 57 69 6e |se, 1985|,...(Win| |000007c0| 64 6f 77 50 74 72 29 2d | 31 2c 20 74 72 75 65 2c |dowPtr)-|1, true,| |000007d0| 20 4e 55 4c 4c 20 29 3b | 0d 09 09 0d 09 2f 2f 20 | NULL );|.....// | |000007e0| 55 70 64 61 74 65 20 77 | 68 69 74 65 63 61 70 2e |Update w|hitecap.| |000007f0| 2e 2e 2e 09 0d 09 67 57 | 43 20 2d 3e 20 53 65 74 |......gW|C -> Set| |00000800| 57 69 6e 50 6f 72 74 28 | 20 2a 6f 75 74 57 69 6e |WinPort(| *outWin| |00000810| 64 6f 77 20 29 3b 0d 09 | 67 57 43 20 2d 3e 20 44 |dow );..|gWC -> D| |00000820| 72 61 77 28 29 3b 0d 0d | 09 72 65 74 75 72 6e 20 |raw();..|.return | |00000830| 6e 6f 45 72 72 3b 0d 7d | 0d 0d 0d 2f 2a 20 0d 09 |noErr;.}|.../* ..| |00000840| 50 6c 75 67 54 65 72 6d | 69 6e 61 74 65 0d 0d 09 |PlugTerm|inate...| |00000850| 43 61 6c 6c 65 64 20 77 | 68 65 6e 20 75 73 65 72 |Called w|hen user| |00000860| 20 64 65 73 65 6c 65 63 | 74 73 20 79 6f 75 72 20 | deselec|ts your | |00000870| 70 6c 75 67 69 6e 2c 20 | 4d 61 63 41 6d 70 20 71 |plugin, |MacAmp q| |00000880| 75 69 74 73 20 6f 72 20 | 69 6e 20 74 68 65 20 63 |uits or |in the c| |00000890| 61 73 65 20 69 66 20 79 | 6f 75 20 68 61 76 65 20 |ase if y|ou have | |000008a0| 70 61 73 73 65 64 20 76 | 69 73 54 65 72 6d 69 6e |passed v|isTermin| |000008b0| 61 74 65 2f 76 69 73 4e | 6f 4d 65 6d 6f 72 79 20 |ate/visN|oMemory | |000008c0| 65 72 72 6f 72 2e 0d 09 | 59 6f 75 20 73 68 6f 75 |error...|You shou| |000008d0| 6c 64 20 64 69 73 70 6f | 73 65 20 79 6f 75 72 20 |ld dispo|se your | |000008e0| 77 69 6e 64 6f 77 20 68 | 65 72 65 20 26 20 63 6c |window h|ere & cl| |000008f0| 65 61 6e 20 75 70 20 74 | 68 65 20 6d 65 73 73 2e |ean up t|he mess.| |00000900| 0d 2a 2f 0d 4f 53 53 74 | 61 74 75 73 09 56 69 73 |.*/.OSSt|atus.Vis| |00000910| 54 65 72 6d 69 6e 61 74 | 65 28 57 69 6e 64 6f 77 |Terminat|e(Window| |00000920| 50 74 72 20 69 6e 57 69 | 6e 2c 20 55 49 6e 74 33 |Ptr inWi|n, UInt3| |00000930| 32 2a 29 0d 7b 0d 0d 09 | 64 65 6c 65 74 65 20 67 |2*).{...|delete g| |00000940| 57 43 3b 0d 09 67 57 43 | 20 3d 20 4e 55 4c 4c 3b |WC;..gWC| = NULL;| |00000950| 0d 0d 0d 09 3a 3a 44 69 | 73 70 6f 73 65 57 69 6e |....::Di|sposeWin| |00000960| 64 6f 77 28 20 69 6e 57 | 69 6e 20 29 3b 0d 09 0d |dow( inW|in );...| |00000970| 09 50 69 78 50 6f 72 74 | 3a 3a 53 68 75 74 64 6f |.PixPort|::Shutdo| |00000980| 77 6e 28 29 3b 0d 0d 09 | 09 0d 09 2f 2f 20 43 6c |wn();...|...// Cl| |00000990| 6f 73 65 20 6f 75 72 20 | 72 65 73 6f 75 72 63 65 |ose our |resource| |000009a0| 20 66 6f 72 6b 2e 0d 09 | 69 66 20 28 20 67 52 65 | fork...|if ( gRe| |000009b0| 66 4e 75 6d 20 21 3d 20 | 2d 31 20 29 0d 09 09 3a |fNum != |-1 )...:| |000009c0| 3a 46 53 43 6c 6f 73 65 | 28 20 67 52 65 66 4e 75 |:FSClose|( gRefNu| |000009d0| 6d 20 29 3b 0d 09 0d 09 | 72 65 74 75 72 6e 20 6e |m );....|return n| |000009e0| 6f 45 72 72 3b 0d 7d 0d | 0d 0d 4f 53 53 74 61 74 |oErr;.}.|..OSStat| |000009f0| 75 73 20 56 69 73 44 72 | 61 77 28 57 69 6e 64 6f |us VisDr|aw(Windo| |00000a00| 77 50 74 72 20 2c 20 55 | 49 6e 74 33 32 2a 29 20 |wPtr , U|Int32*) | |00000a10| 7b 20 0d 0d 09 2f 2f 20 | 49 66 20 77 65 20 64 65 |{ ...// |If we de| |00000a20| 74 65 78 74 20 61 20 63 | 6c 69 63 6b 20 69 6e 20 |text a c|lick in | |00000a30| 66 75 6c 6c 73 63 72 65 | 65 6e 2c 20 74 68 65 6e |fullscre|en, then| |00000a40| 20 65 78 69 74 20 66 75 | 6c 6c 73 63 72 65 65 6e | exit fu|llscreen| |00000a50| 20 6d 6f 64 65 20 6e 6f | 20 6d 61 74 74 65 72 20 | mode no| matter | |00000a60| 77 68 61 74 0d 09 69 66 | 20 28 20 67 57 43 20 2d |what..if| ( gWC -| |00000a70| 3e 20 49 73 46 75 6c 6c | 53 63 72 65 65 6e 28 29 |> IsFull|Screen()| |00000a80| 20 29 20 7b 0d 09 09 69 | 66 20 28 20 3a 3a 42 75 | ) {...i|f ( ::Bu| |00000a90| 74 74 6f 6e 28 29 20 29 | 0d 09 09 09 67 57 43 20 |tton() )|....gWC | |00000aa0| 2d 3e 20 53 65 74 46 75 | 6c 6c 53 63 72 65 65 6e |-> SetFu|llScreen| |00000ab0| 28 20 66 61 6c 73 65 20 | 29 3b 20 0d 09 7d 0d 09 |( false |); ..}..| |00000ac0| 0d 09 0d 09 0d 09 69 6e | 74 20 69 2c 20 6a 2c 20 |......in|t i, j, | |00000ad0| 62 69 6e 3b 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |bin;..un|signed l| |00000ae0| 6f 6e 67 20 74 69 6d 65 | 2c 20 73 74 61 74 75 73 |ong time|, status| |00000af0| 20 3d 20 30 3b 0d 09 75 | 6e 73 69 67 6e 65 64 20 | = 0;..u|nsigned | |00000b00| 73 68 6f 72 74 20 66 66 | 74 4e 75 6d 3b 0d 09 64 |short ff|tNum;..d| |00000b10| 6f 75 62 6c 65 2a 20 73 | 61 6d 70 3b 0d 09 66 6c |ouble* s|amp;..fl| |00000b20| 6f 61 74 20 73 63 61 6c | 65 20 3d 20 2e 31 32 20 |oat scal|e = .12 | |00000b30| 2a 20 55 4e 49 56 5f 4d | 41 47 5f 53 43 41 4c 45 |* UNIV_M|AG_SCALE| |00000b40| 3b 0d 09 66 6c 6f 61 74 | 2a 20 73 61 6d 70 6c 65 |;..float|* sample| |00000b50| 20 3d 20 67 57 43 20 2d | 3e 20 6d 53 61 6d 70 6c | = gWC -|> mSampl| |00000b60| 65 3b 0d 09 0d 0d 09 67 | 50 6c 75 67 49 6e 66 6f |e;.....g|PlugInfo| |00000b70| 2e 6d 61 2d 3e 47 65 74 | 46 46 54 28 20 26 73 61 |.ma->Get|FFT( &sa| |00000b80| 6d 70 2c 20 26 66 66 74 | 4e 75 6d 20 29 3b 0d 0d |mp, &fft|Num );..| |00000b90| 09 69 66 20 28 20 67 50 | 6c 75 67 49 6e 66 6f 2e |.if ( gP|lugInfo.| |00000ba0| 6d 61 2d 3e 47 65 74 53 | 74 61 74 75 73 20 29 0d |ma->GetS|tatus ).| |00000bb0| 09 09 67 50 6c 75 67 49 | 6e 66 6f 2e 6d 61 2d 3e |..gPlugI|nfo.ma->| |00000bc0| 47 65 74 53 74 61 74 75 | 73 28 20 26 74 69 6d 65 |GetStatu|s( &time| |00000bd0| 2c 20 26 73 74 61 74 75 | 73 20 29 3b 0d 0d 09 69 |, &statu|s );...i| |00000be0| 66 20 28 20 66 66 74 4e | 75 6d 20 3c 20 4e 55 4d |f ( fftN|um < NUM| |00000bf0| 5f 53 41 4d 50 4c 45 5f | 42 49 4e 53 20 2a 20 31 |_SAMPLE_|BINS * 1| |00000c00| 31 20 2b 20 31 30 20 7c | 7c 20 28 20 73 74 61 74 |1 + 10 ||| ( stat| |00000c10| 75 73 20 26 20 73 74 61 | 74 75 73 53 74 6f 70 70 |us & sta|tusStopp| |00000c20| 65 64 20 29 20 29 20 7b | 0d 09 09 66 6f 72 20 28 |ed ) ) {|...for (| |00000c30| 20 69 20 3d 20 30 3b 20 | 69 20 3c 20 4e 55 4d 5f | i = 0; |i < NUM_| |00000c40| 53 41 4d 50 4c 45 5f 42 | 49 4e 53 3b 20 69 2b 2b |SAMPLE_B|INS; i++| |00000c50| 20 29 20 7b 0d 09 09 09 | 73 61 6d 70 6c 65 5b 20 | ) {....|sample[ | |00000c60| 69 20 5d 20 3d 20 30 3b | 20 0d 09 09 7d 20 7d 0d |i ] = 0;| ...} }.| |00000c70| 09 65 6c 73 65 20 7b 0d | 09 0d 09 09 62 69 6e 20 |.else {.|....bin | |00000c80| 3d 20 31 30 3b 0d 09 09 | 66 6f 72 20 28 20 69 20 |= 10;...|for ( i | |00000c90| 3d 20 30 3b 20 69 20 3c | 20 4e 55 4d 5f 53 41 4d |= 0; i <| NUM_SAM| |00000ca0| 50 4c 45 5f 42 49 4e 53 | 3b 20 69 2b 2b 20 29 20 |PLE_BINS|; i++ ) | |00000cb0| 7b 0d 09 09 09 73 61 6d | 70 6c 65 5b 20 69 20 5d |{....sam|ple[ i ]| |00000cc0| 20 3d 20 30 3b 0d 09 09 | 09 66 6f 72 20 28 20 6a | = 0;...|.for ( j| |00000cd0| 20 3d 20 30 3b 20 6a 20 | 3c 20 45 4c 45 4d 45 4e | = 0; j |< ELEMEN| |00000ce0| 54 53 5f 50 45 52 5f 42 | 49 4e 3b 20 6a 2b 2b 2c |TS_PER_B|IN; j++,| |00000cf0| 20 62 69 6e 2b 2b 20 29 | 20 0d 09 09 09 09 73 61 | bin++ )| .....sa| |00000d00| 6d 70 6c 65 5b 20 69 20 | 5d 20 2b 3d 20 73 61 6d |mple[ i |] += sam| |00000d10| 70 5b 20 62 69 6e 20 5d | 3b 0d 09 09 7d 0d 09 09 |p[ bin ]|;...}...| |00000d20| 0d 09 09 62 69 6e 20 3d | 20 31 30 3b 0d 09 09 66 |...bin =| 10;...f| |00000d30| 6f 72 20 28 20 69 20 3d | 20 30 3b 20 69 20 3c 20 |or ( i =| 0; i < | |00000d40| 4e 55 4d 5f 53 41 4d 50 | 4c 45 5f 42 49 4e 53 3b |NUM_SAMP|LE_BINS;| |00000d50| 20 69 2b 2b 20 29 20 7b | 0d 09 09 09 66 6f 72 20 | i++ ) {|....for | |00000d60| 28 20 6a 20 3d 20 30 3b | 20 6a 20 3c 20 45 4c 45 |( j = 0;| j < ELE| |00000d70| 4d 45 4e 54 53 5f 50 45 | 52 5f 42 49 4e 3b 20 6a |MENTS_PE|R_BIN; j| |00000d80| 2b 2b 2c 20 62 69 6e 2b | 2b 20 29 20 0d 09 09 09 |++, bin+|+ ) ....| |00000d90| 09 73 61 6d 70 6c 65 5b | 20 69 20 5d 20 2b 3d 20 |.sample[| i ] += | |00000da0| 73 61 6d 70 5b 20 62 69 | 6e 20 5d 3b 0d 2f 2f 09 |samp[ bi|n ];.//.| |00000db0| 09 09 67 53 61 6d 70 6c | 65 5b 20 69 20 5d 20 3d |..gSampl|e[ i ] =| |00000dc0| 20 2e 30 33 20 2a 20 2e | 30 30 30 33 20 2a 20 67 | .03 * .|0003 * g| |00000dd0| 53 61 6d 70 6c 65 5b 20 | 69 20 5d 20 2a 20 28 30 |Sample[ |i ] * (0| |00000de0| 2e 38 35 20 2b 20 2e 30 | 35 39 20 2a 20 69 29 3b |.85 + .0|59 * i);| |00000df0| 0d 2f 2f 09 09 09 67 53 | 61 6d 70 6c 65 5b 20 69 |.//...gS|ample[ i| |00000e00| 20 5d 20 3d 20 2e 31 20 | 2a 20 28 20 73 71 72 74 | ] = .1 |* ( sqrt| |00000e10| 28 20 31 35 20 2b 20 2e | 30 30 30 33 20 2a 20 67 |( 15 + .|0003 * g| |00000e20| 53 61 6d 70 6c 65 5b 20 | 69 20 5d 20 2a 20 28 30 |Sample[ |i ] * (0| |00000e30| 2e 38 35 20 2b 20 2e 30 | 35 39 20 2a 20 69 29 20 |.85 + .0|59 * i) | |00000e40| 29 20 2d 20 73 71 72 74 | 28 20 31 35 20 29 20 29 |) - sqrt|( 15 ) )| |00000e50| 3b 0d 0d 09 09 09 73 61 | 6d 70 6c 65 5b 20 69 20 |;.....sa|mple[ i | |00000e60| 5d 20 3d 20 73 63 61 6c | 65 20 2a 20 28 20 73 71 |] = scal|e * ( sq| |00000e70| 72 74 28 20 34 30 20 2b | 20 2e 30 30 30 34 32 20 |rt( 40 +| .00042 | |00000e80| 2a 20 73 61 6d 70 6c 65 | 5b 20 69 20 5d 20 2a 20 |* sample|[ i ] * | |00000e90| 28 30 2e 38 35 20 2b 20 | 2e 30 35 31 20 2a 20 69 |(0.85 + |.051 * i| |00000ea0| 29 20 29 20 2d 20 73 71 | 72 74 28 20 34 30 20 29 |) ) - sq|rt( 40 )| |00000eb0| 20 29 3b 0d 09 09 09 0d | 09 09 09 0d 09 09 09 2f | );.....|......./| |00000ec0| 2f 67 53 61 6d 70 6c 65 | 5b 20 69 20 5d 20 3d 20 |/gSample|[ i ] = | |00000ed0| 2e 30 30 30 30 31 33 20 | 2a 20 67 53 61 6d 70 6c |.000013 |* gSampl| |00000ee0| 65 5b 20 69 20 5d 20 2a | 20 28 30 2e 38 35 20 2b |e[ i ] *| (0.85 +| |00000ef0| 20 2e 30 35 38 20 2a 20 | 69 29 3b 0d 09 09 09 2f | .058 * |i);..../| |00000f00| 2f 67 53 61 6d 70 6c 65 | 5b 20 69 20 5d 20 3d 20 |/gSample|[ i ] = | |00000f10| 31 20 2a 20 6c 6f 67 28 | 20 32 20 2a 20 67 53 61 |1 * log(| 2 * gSa| |00000f20| 6d 70 6c 65 5b 20 69 20 | 5d 20 2b 20 31 20 29 3b |mple[ i |] + 1 );| |00000f30| 0d 0d 09 09 09 2f 2f 67 | 53 61 6d 70 6c 65 5b 20 |.....//g|Sample[ | |00000f40| 69 20 5d 20 3d 20 70 6f | 77 28 20 67 53 61 6d 70 |i ] = po|w( gSamp| |00000f50| 6c 65 5b 20 69 20 5d 2c | 20 31 2e 34 20 29 3b 0d |le[ i ],| 1.4 );.| |00000f60| 09 09 09 2f 2f 67 53 61 | 6d 70 6c 65 5b 20 69 20 |...//gSa|mple[ i | |00000f70| 5d 20 3d 20 6c 6f 67 28 | 20 31 20 2b 20 2e 36 20 |] = log(| 1 + .6 | |00000f80| 2a 20 67 53 61 6d 70 6c | 65 5b 20 69 20 5d 20 29 |* gSampl|e[ i ] )| |00000f90| 3b 0d 0d 09 09 7d 0d 09 | 09 0d 09 09 73 61 6d 70 |;....}..|....samp| |00000fa0| 6c 65 5b 20 30 20 5d 20 | 2a 3d 20 30 2e 34 35 3b |le[ 0 ] |*= 0.45;| |00000fb0| 0d 09 09 73 61 6d 70 6c | 65 5b 20 31 20 5d 20 2a |...sampl|e[ 1 ] *| |00000fc0| 3d 20 30 2e 37 35 3b 0d | 09 09 0d 09 09 2f 2f 67 |= 0.75;.|.....//g| |00000fd0| 53 61 6d 70 6c 65 5b 20 | 34 20 5d 20 3d 20 31 3b |Sample[ |4 ] = 1;| |00000fe0| 0d 09 7d 0d 0d 09 2f 2f | 20 53 74 6f 72 65 20 74 |..}...//| Store t| |00000ff0| 68 65 20 6e 65 77 65 73 | 74 20 73 61 6d 70 6c 65 |he newes|t sample| |00001000| 20 61 6e 64 20 63 68 75 | 63 6b 20 61 6e 64 20 6f | and chu|ck and o| |00001010| 6c 64 20 73 61 6d 70 6c | 65 73 0d 09 67 57 43 20 |ld sampl|es..gWC | |00001020| 2d 3e 20 52 65 63 6f 72 | 64 53 61 6d 70 6c 65 28 |-> Recor|dSample(| |00001030| 20 45 67 4f 53 55 74 69 | 6c 73 3a 3a 43 75 72 54 | EgOSUti|ls::CurT| |00001040| 69 6d 65 4d 53 28 29 20 | 29 3b 0d 0d 09 2f 2f 20 |imeMS() |);...// | |00001050| 55 70 64 61 74 65 20 74 | 68 65 20 73 63 72 65 65 |Update t|he scree| |00001060| 6e 2c 20 62 61 62 79 2e | 20 20 4c 65 74 27 73 20 |n, baby.| Let's | |00001070| 73 68 61 67 21 0d 09 67 | 57 43 20 2d 3e 20 44 72 |shag!..g|WC -> Dr| |00001080| 61 77 28 29 3b 0d 09 09 | 0d 09 72 65 74 75 72 6e |aw();...|..return| |00001090| 20 6e 6f 45 72 72 3b 0d | 0d 7d 0d 0d 0d 2f 2a 0d | noErr;.|.}.../*.| |000010a0| 4f 53 53 74 61 74 75 73 | 20 56 69 73 43 6c 69 63 |OSStatus| VisClic| |000010b0| 6b 28 20 57 69 6e 64 6f | 77 50 74 72 20 69 6e 57 |k( Windo|wPtr inW| |000010c0| 69 6e 64 6f 77 2c 20 50 | 6f 69 6e 74 20 69 6e 50 |indow, P|oint inP| |000010d0| 74 2c 20 55 49 6e 74 33 | 32 2a 20 29 20 7b 0d 0d |t, UInt3|2* ) {..| |000010e0| 09 73 74 61 74 69 63 20 | 6c 6f 6e 67 20 73 4c 61 |.static |long sLa| |000010f0| 73 74 57 68 65 6e 20 3d | 20 30 3b 0d 09 6c 6f 6e |stWhen =| 0;..lon| |00001100| 67 20 09 63 75 72 54 69 | 6d 65 20 3d 20 3a 3a 54 |g .curTi|me = ::T| |00001110| 69 63 6b 43 6f 75 6e 74 | 28 29 3b 0d 09 62 6f 6f |ickCount|();..boo| |00001120| 6c 09 64 6f 53 65 6c 65 | 63 74 20 3d 20 66 61 6c |l.doSele|ct = fal| |00001130| 73 65 3b 0d 09 62 6f 6f | 6c 09 62 75 74 74 6f 6e |se;..boo|l.button| |00001140| 20 3d 20 3a 3a 42 75 74 | 74 6f 6e 28 29 3b 0d 0d | = ::But|ton();..| |00001150| 09 2f 2f 20 73 65 65 20 | 69 66 20 74 68 65 20 63 |.// see |if the c| |00001160| 6d 64 20 6b 65 79 20 69 | 73 20 64 6f 77 6e 0d 09 |md key i|s down..| |00001170| 69 66 20 28 20 62 75 74 | 74 6f 6e 20 29 20 7b 0d |if ( but|ton ) {.| |00001180| 09 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char | |00001190| 6b 6d 5b 31 36 5d 3b 0d | 09 09 3a 3a 47 65 74 4b |km[16];.|..::GetK| |000011a0| 65 79 73 28 20 28 75 6e | 73 69 67 6e 65 64 20 6c |eys( (un|signed l| |000011b0| 6f 6e 67 2a 29 20 6b 6d | 20 29 3b 0d 09 09 6c 6f |ong*) km| );...lo| |000011c0| 6e 67 20 63 6f 64 65 20 | 3d 20 35 35 3b 09 20 2f |ng code |= 55;. /| |000011d0| 2f 20 43 6d 64 20 6b 65 | 79 20 63 6f 64 65 0d 09 |/ Cmd ke|y code..| |000011e0| 09 69 66 20 28 20 28 28 | 6b 6d 5b 20 63 6f 64 65 |.if ( ((|km[ code| |000011f0| 20 3e 3e 20 33 20 5d 20 | 3e 3e 20 28 63 6f 64 65 | >> 3 ] |>> (code| |00001200| 20 26 20 37 29 29 20 26 | 20 31 29 20 21 3d 20 30 | & 7)) &| 1) != 0| |00001210| 20 29 20 7b 0d 09 09 09 | 64 6f 53 65 6c 65 63 74 | ) {....|doSelect| |00001220| 20 3d 20 74 72 75 65 3b | 0d 09 09 7d 0d 09 7d 0d | = true;|...}..}.| |00001230| 09 0d 09 69 66 20 28 20 | 67 57 43 20 2d 3e 20 50 |...if ( |gWC -> P| |00001240| 74 49 6e 54 69 74 6c 65 | 28 20 69 6e 50 74 20 29 |tInTitle|( inPt )| |00001250| 20 7c 7c 20 64 6f 53 65 | 6c 65 63 74 20 29 0d 09 | || doSe|lect )..| |00001260| 09 67 57 43 20 2d 3e 20 | 53 65 6c 65 63 74 43 6f |.gWC -> |SelectCo| |00001270| 6e 66 69 67 28 29 3b 0d | 09 65 6c 73 65 20 69 66 |nfig();.|.else if| |00001280| 20 28 20 63 75 72 54 69 | 6d 65 20 2d 20 73 4c 61 | ( curTi|me - sLa| |00001290| 73 74 57 68 65 6e 20 3c | 20 3a 3a 47 65 74 44 62 |stWhen <| ::GetDb| |000012a0| 6c 54 69 6d 65 28 29 20 | 29 20 0d 09 09 67 57 43 |lTime() |) ...gWC| |000012b0| 20 2d 3e 20 53 65 74 46 | 75 6c 6c 53 63 72 65 65 | -> SetF|ullScree| |000012c0| 6e 28 20 74 72 75 65 20 | 29 3b 0d 09 65 6c 73 65 |n( true |);..else| |000012d0| 20 69 66 20 28 20 21 20 | 67 57 43 20 2d 3e 20 49 | if ( ! |gWC -> I| |000012e0| 73 46 75 6c 6c 53 63 72 | 65 65 6e 28 29 20 29 20 |sFullScr|een() ) | |000012f0| 7b 0d 09 09 69 66 20 28 | 20 62 75 74 74 6f 6e 20 |{...if (| button | |00001300| 29 20 7b 0d 09 09 09 52 | 65 63 74 20 72 2c 20 67 |) {....R|ect r, g| |00001310| 72 6f 77 42 6f 78 2c 20 | 6c 69 6d 3b 0d 09 09 09 |rowBox, |lim;....| |00001320| 67 57 43 20 2d 3e 20 47 | 65 74 57 69 6e 52 65 63 |gWC -> G|etWinRec| |00001330| 74 28 20 72 20 29 3b 0d | 09 09 09 67 72 6f 77 42 |t( r );.|...growB| |00001340| 6f 78 20 3d 20 72 3b 0d | 09 09 09 67 72 6f 77 42 |ox = r;.|...growB| |00001350| 6f 78 2e 6c 65 66 74 20 | 3d 20 72 2e 72 69 67 68 |ox.left |= r.righ| |00001360| 74 20 2d 20 33 30 3b 0d | 09 09 09 67 72 6f 77 42 |t - 30;.|...growB| |00001370| 6f 78 2e 74 6f 70 20 3d | 20 72 2e 62 6f 74 74 6f |ox.top =| r.botto| |00001380| 6d 20 2d 20 33 30 3b 0d | 09 09 09 69 66 20 28 20 |m - 30;.|...if ( | |00001390| 3a 3a 50 74 49 6e 52 65 | 63 74 28 20 69 6e 50 74 |::PtInRe|ct( inPt| |000013a0| 2c 20 26 67 72 6f 77 42 | 6f 78 20 29 20 29 20 7b |, &growB|ox ) ) {| |000013b0| 0d 09 09 09 09 6c 69 6d | 2e 74 6f 70 20 3d 20 6c |.....lim|.top = l| |000013c0| 69 6d 2e 6c 65 66 74 20 | 3d 20 33 30 3b 0d 09 09 |im.left |= 30;...| |000013d0| 09 09 6c 69 6d 2e 62 6f | 74 74 6f 6d 20 3d 20 6c |..lim.bo|ttom = l| |000013e0| 69 6d 2e 72 69 67 68 74 | 20 3d 20 39 30 30 30 3b |im.right| = 9000;| |000013f0| 0d 09 09 09 09 75 6e 73 | 69 67 6e 65 64 20 6c 6f |.....uns|igned lo| |00001400| 6e 67 20 6e 65 77 53 69 | 7a 65 20 3d 20 3a 3a 47 |ng newSi|ze = ::G| |00001410| 72 6f 77 57 69 6e 64 6f | 77 28 20 69 6e 57 69 6e |rowWindo|w( inWin| |00001420| 64 6f 77 2c 20 69 6e 50 | 74 2c 20 26 6c 69 6d 20 |dow, inP|t, &lim | |00001430| 29 3b 0d 09 09 09 09 3a | 3a 53 69 7a 65 57 69 6e |);.....:|:SizeWin| |00001440| 64 6f 77 28 20 69 6e 57 | 69 6e 64 6f 77 2c 20 6e |dow( inW|indow, n| |00001450| 65 77 53 69 7a 65 20 26 | 20 30 78 46 46 46 46 2c |ewSize &| 0xFFFF,| |00001460| 20 6e 65 77 53 69 7a 65 | 20 3e 3e 20 31 36 2c 20 | newSize| >> 16, | |00001470| 66 61 6c 73 65 20 29 3b | 0d 09 09 09 09 67 57 43 |false );|.....gWC| |00001480| 20 2d 3e 20 47 65 74 57 | 69 6e 52 65 63 74 28 20 | -> GetW|inRect( | |00001490| 72 20 29 3b 0d 09 09 09 | 09 67 57 43 20 2d 3e 20 |r );....|.gWC -> | |000014a0| 53 65 74 57 69 6e 50 6f | 72 74 28 20 69 6e 57 69 |SetWinPo|rt( inWi| |000014b0| 6e 64 6f 77 2c 20 26 72 | 20 29 3b 09 09 2f 2f 20 |ndow, &r| );..// | |000014c0| 53 69 7a 65 57 69 6e 64 | 6f 77 20 63 68 61 6e 67 |SizeWind|ow chang| |000014d0| 65 73 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |es the s|ize of t| |000014e0| 68 65 20 77 69 6e 2c 20 | 62 75 74 20 67 57 43 20 |he win, |but gWC | |000014f0| 64 6f 65 73 6e 27 74 20 | 6b 6e 6f 77 20 74 68 61 |doesn't |know tha| |00001500| 74 0d 09 09 09 7d 0d 09 | 09 7d 0d 09 09 73 4c 61 |t....}..|.}...sLa| |00001510| 73 74 57 68 65 6e 20 3d | 20 63 75 72 54 69 6d 65 |stWhen =| curTime| |00001520| 3b 0d 09 7d 0d 0d 09 72 | 65 74 75 72 6e 20 6e 6f |;..}...r|eturn no| |00001530| 45 72 72 3b 0d 7d 0d 2a | 2f 0d 0d 0d 4f 53 53 74 |Err;.}.*|/...OSSt| |00001540| 61 74 75 73 20 56 69 73 | 4b 65 79 44 6f 77 6e 28 |atus Vis|KeyDown(| |00001550| 20 57 69 6e 64 6f 77 50 | 74 72 2c 20 45 76 65 6e | WindowP|tr, Even| |00001560| 74 52 65 63 6f 72 64 2a | 20 69 6e 45 76 74 2c 20 |tRecord*| inEvt, | |00001570| 55 49 6e 74 33 32 2a 20 | 29 20 7b 0d 0d 09 69 66 |UInt32* |) {...if| |00001580| 20 28 20 67 57 43 20 29 | 0d 09 09 67 57 43 20 2d | ( gWC )|...gWC -| |00001590| 3e 20 48 61 6e 64 6c 65 | 4b 65 79 28 20 69 6e 45 |> Handle|Key( inE| |000015a0| 76 74 20 2d 3e 20 6d 65 | 73 73 61 67 65 20 26 20 |vt -> me|ssage & | |000015b0| 63 68 61 72 43 6f 64 65 | 4d 61 73 6b 20 29 3b 09 |charCode|Mask );.| |000015c0| 0d 0d 09 72 65 74 75 72 | 6e 20 6e 6f 45 72 72 3b |...retur|n noErr;| |000015d0| 0d 7d 0d 0d 0d 4f 53 53 | 74 61 74 75 73 20 56 69 |.}...OSS|tatus Vi| |000015e0| 73 4d 61 63 45 76 65 6e | 74 28 57 69 6e 64 6f 77 |sMacEven|t(Window| |000015f0| 50 74 72 20 69 6e 57 69 | 6e 64 6f 77 2c 20 45 76 |Ptr inWi|ndow, Ev| |00001600| 65 6e 74 52 65 63 6f 72 | 64 2a 20 69 6e 45 76 74 |entRecor|d* inEvt| |00001610| 2c 20 55 49 6e 74 33 32 | 2a 20 29 20 7b 0d 09 73 |, UInt32|* ) {..s| |00001620| 74 61 74 69 63 20 6c 6f | 6e 67 20 73 4c 61 73 74 |tatic lo|ng sLast| |00001630| 57 68 65 6e 20 3d 20 30 | 3b 0d 09 6c 6f 6e 67 20 |When = 0|;..long | |00001640| 09 63 75 72 54 69 6d 65 | 20 3d 20 3a 3a 54 69 63 |.curTime| = ::Tic| |00001650| 6b 43 6f 75 6e 74 28 29 | 3b 0d 09 50 6f 69 6e 74 |kCount()|;..Point| |00001660| 20 69 6e 50 74 3b 0d 09 | 09 0d 09 73 77 69 74 63 | inPt;..|...switc| |00001670| 68 20 28 20 69 6e 45 76 | 74 20 2d 3e 20 77 68 61 |h ( inEv|t -> wha| |00001680| 74 20 29 20 7b 0d 09 0d | 09 09 63 61 73 65 20 75 |t ) {...|..case u| |00001690| 70 64 61 74 65 45 76 74 | 3a 09 0d 09 09 09 3a 3a |pdateEvt|:.....::| |000016a0| 42 65 67 69 6e 55 70 64 | 61 74 65 28 20 69 6e 57 |BeginUpd|ate( inW| |000016b0| 69 6e 64 6f 77 20 29 3b | 0d 09 09 09 67 57 43 20 |indow );|....gWC | |000016c0| 2d 3e 20 52 65 66 72 65 | 73 68 52 65 63 74 28 20 |-> Refre|shRect( | |000016d0| 28 2a 2a 28 20 69 6e 57 | 69 6e 64 6f 77 20 2d 3e |(**( inW|indow ->| |000016e0| 20 76 69 73 52 67 6e 29 | 29 2e 72 67 6e 42 42 6f | visRgn)|).rgnBBo| |000016f0| 78 20 29 3b 0d 09 09 09 | 3a 3a 45 6e 64 55 70 64 |x );....|::EndUpd| |00001700| 61 74 65 28 20 69 6e 57 | 69 6e 64 6f 77 20 29 3b |ate( inW|indow );| |00001710| 0d 09 09 09 67 57 43 20 | 2d 3e 20 44 72 61 77 28 |....gWC |-> Draw(| |00001720| 29 3b 20 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |); ....b|reak;...| |00001730| 09 0d 09 09 0d 09 09 63 | 61 73 65 20 6d 6f 75 73 |.......c|ase mous| |00001740| 65 44 6f 77 6e 3a 09 0d | 09 09 09 69 6e 50 74 20 |eDown:..|...inPt | |00001750| 3d 20 69 6e 45 76 74 20 | 2d 3e 20 77 68 65 72 65 |= inEvt |-> where| |00001760| 3b 0d 09 09 09 69 66 20 | 28 20 67 57 43 20 2d 3e |;....if |( gWC ->| |00001770| 20 50 74 49 6e 54 69 74 | 6c 65 28 20 69 6e 50 74 | PtInTit|le( inPt| |00001780| 20 29 20 7c 7c 20 28 20 | 69 6e 45 76 74 20 2d 3e | ) || ( |inEvt ->| |00001790| 20 6d 6f 64 69 66 69 65 | 72 73 20 26 20 63 6d 64 | modifie|rs & cmd| |000017a0| 4b 65 79 20 29 20 29 0d | 09 09 09 09 67 57 43 20 |Key ) ).|....gWC | |000017b0| 2d 3e 20 53 65 6c 65 63 | 74 43 6f 6e 66 69 67 28 |-> Selec|tConfig(| |000017c0| 29 3b 0d 09 09 09 65 6c | 73 65 20 69 66 20 28 20 |);....el|se if ( | |000017d0| 67 57 43 20 2d 3e 20 49 | 73 46 75 6c 6c 53 63 72 |gWC -> I|sFullScr| |000017e0| 65 65 6e 28 29 20 29 0d | 09 09 09 09 67 57 43 20 |een() ).|....gWC | |000017f0| 2d 3e 20 53 65 74 46 75 | 6c 6c 53 63 72 65 65 6e |-> SetFu|llScreen| |00001800| 28 20 66 61 6c 73 65 20 | 29 3b 0d 09 09 09 65 6c |( false |);....el| |00001810| 73 65 20 69 66 20 28 20 | 63 75 72 54 69 6d 65 20 |se if ( |curTime | |00001820| 2d 20 73 4c 61 73 74 57 | 68 65 6e 20 3c 20 3a 3a |- sLastW|hen < ::| |00001830| 47 65 74 44 62 6c 54 69 | 6d 65 28 29 20 29 20 0d |GetDblTi|me() ) .| |00001840| 09 09 09 09 67 57 43 20 | 2d 3e 20 53 65 74 46 75 |....gWC |-> SetFu| |00001850| 6c 6c 53 63 72 65 65 6e | 28 20 74 72 75 65 20 29 |llScreen|( true )| |00001860| 3b 0d 09 09 09 65 6c 73 | 65 20 69 66 20 28 20 21 |;....els|e if ( !| |00001870| 20 67 57 43 20 2d 3e 20 | 49 73 46 75 6c 6c 53 63 | gWC -> |IsFullSc| |00001880| 72 65 65 6e 28 29 20 29 | 20 7b 0d 09 09 09 09 69 |reen() )| {.....i| |00001890| 66 20 28 20 74 72 75 65 | 20 29 20 7b 0d 09 09 09 |f ( true| ) {....| |000018a0| 09 09 52 65 63 74 20 72 | 2c 20 67 72 6f 77 42 6f |..Rect r|, growBo| |000018b0| 78 2c 20 6c 69 6d 3b 0d | 09 09 09 09 09 67 57 43 |x, lim;.|.....gWC| |000018c0| 20 2d 3e 20 47 65 74 57 | 69 6e 52 65 63 74 28 20 | -> GetW|inRect( | |000018d0| 72 20 29 3b 0d 09 09 09 | 09 09 67 72 6f 77 42 6f |r );....|..growBo| |000018e0| 78 20 3d 20 72 3b 0d 09 | 09 09 09 09 67 72 6f 77 |x = r;..|....grow| |000018f0| 42 6f 78 2e 6c 65 66 74 | 20 3d 20 72 2e 72 69 67 |Box.left| = r.rig| |00001900| 68 74 20 2d 20 33 30 3b | 0d 09 09 09 09 09 67 72 |ht - 30;|......gr| |00001910| 6f 77 42 6f 78 2e 74 6f | 70 20 3d 20 72 2e 62 6f |owBox.to|p = r.bo| |00001920| 74 74 6f 6d 20 2d 20 33 | 30 3b 0d 09 09 09 09 09 |ttom - 3|0;......| |00001930| 69 66 20 28 20 3a 3a 50 | 74 49 6e 52 65 63 74 28 |if ( ::P|tInRect(| |00001940| 20 69 6e 50 74 2c 20 26 | 67 72 6f 77 42 6f 78 20 | inPt, &|growBox | |00001950| 29 20 29 20 7b 0d 09 09 | 09 09 09 09 6c 69 6d 2e |) ) {...|....lim.| |00001960| 74 6f 70 20 3d 20 6c 69 | 6d 2e 6c 65 66 74 20 3d |top = li|m.left =| |00001970| 20 33 30 3b 0d 09 09 09 | 09 09 09 6c 69 6d 2e 62 | 30;....|...lim.b| |00001980| 6f 74 74 6f 6d 20 3d 20 | 6c 69 6d 2e 72 69 67 68 |ottom = |lim.righ| |00001990| 74 20 3d 20 39 30 30 30 | 3b 0d 09 09 09 09 09 09 |t = 9000|;.......| |000019a0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 6e 65 |unsigned| long ne| |000019b0| 77 53 69 7a 65 20 3d 20 | 3a 3a 47 72 6f 77 57 69 |wSize = |::GrowWi| |000019c0| 6e 64 6f 77 28 20 69 6e | 57 69 6e 64 6f 77 2c 20 |ndow( in|Window, | |000019d0| 69 6e 50 74 2c 20 26 6c | 69 6d 20 29 3b 0d 09 09 |inPt, &l|im );...| |000019e0| 09 09 09 09 3a 3a 53 69 | 7a 65 57 69 6e 64 6f 77 |....::Si|zeWindow| |000019f0| 28 20 69 6e 57 69 6e 64 | 6f 77 2c 20 6e 65 77 53 |( inWind|ow, newS| |00001a00| 69 7a 65 20 26 20 30 78 | 46 46 46 46 2c 20 6e 65 |ize & 0x|FFFF, ne| |00001a10| 77 53 69 7a 65 20 3e 3e | 20 31 36 2c 20 66 61 6c |wSize >>| 16, fal| |00001a20| 73 65 20 29 3b 0d 09 09 | 09 09 09 09 67 57 43 20 |se );...|....gWC | |00001a30| 2d 3e 20 47 65 74 57 69 | 6e 52 65 63 74 28 20 72 |-> GetWi|nRect( r| |00001a40| 20 29 3b 0d 09 09 09 09 | 09 09 67 57 43 20 2d 3e | );.....|..gWC ->| |00001a50| 20 53 65 74 57 69 6e 50 | 6f 72 74 28 20 69 6e 57 | SetWinP|ort( inW| |00001a60| 69 6e 64 6f 77 2c 20 26 | 72 20 29 3b 09 7d 09 2f |indow, &|r );.}./| |00001a70| 2f 20 53 69 7a 65 57 69 | 6e 64 6f 77 20 63 68 61 |/ SizeWi|ndow cha| |00001a80| 6e 67 65 73 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |nges the| size of| |00001a90| 20 74 68 65 20 77 69 6e | 2c 20 62 75 74 20 67 57 | the win|, but gW| |00001aa0| 43 20 64 6f 65 73 6e 27 | 74 20 6b 6e 6f 77 20 74 |C doesn'|t know t| |00001ab0| 68 61 74 0d 09 09 09 09 | 09 65 6c 73 65 20 69 66 |hat.....|.else if| |00001ac0| 20 28 20 67 57 43 20 2d | 3e 20 42 6f 72 64 65 72 | ( gWC -|> Border| |00001ad0| 6c 65 73 73 57 69 6e 64 | 6f 77 28 29 20 26 26 20 |lessWind|ow() && | |00001ae0| 3a 3a 42 75 74 74 6f 6e | 28 29 20 29 20 7b 0d 09 |::Button|() ) {..| |00001af0| 09 09 09 09 09 6c 69 6d | 2e 74 6f 70 20 3d 20 6c |.....lim|.top = l| |00001b00| 69 6d 2e 6c 65 66 74 20 | 3d 20 30 3b 0d 09 09 09 |im.left |= 0;....| |00001b10| 09 09 09 6c 69 6d 2e 62 | 6f 74 74 6f 6d 20 3d 20 |...lim.b|ottom = | |00001b20| 6c 69 6d 2e 72 69 67 68 | 74 20 3d 20 39 30 30 30 |lim.righ|t = 9000| |00001b30| 3b 0d 09 09 09 09 09 09 | 3a 3a 44 72 61 67 57 69 |;.......|::DragWi| |00001b40| 6e 64 6f 77 28 20 69 6e | 57 69 6e 64 6f 77 2c 20 |ndow( in|Window, | |00001b50| 69 6e 50 74 2c 20 26 6c | 69 6d 20 29 3b 0d 09 09 |inPt, &l|im );...| |00001b60| 09 09 09 7d 0d 09 09 09 | 09 7d 0d 09 09 09 09 73 |...}....|.}.....s| |00001b70| 4c 61 73 74 57 68 65 6e | 20 3d 20 63 75 72 54 69 |LastWhen| = curTi| |00001b80| 6d 65 3b 0d 09 09 09 7d | 0d 09 09 09 62 72 65 61 |me;....}|....brea| |00001b90| 6b 3b 0d 09 7d 0d 0d 09 | 72 65 74 75 72 6e 20 6e |k;..}...|return n| |00001ba0| 6f 45 72 72 3b 0d 7d 0d | 0d 0d 0d 0d 0d 4f 53 53 |oErr;.}.|.....OSS| |00001bb0| 74 61 74 75 73 09 56 69 | 73 41 62 6f 75 74 28 57 |tatus.Vi|sAbout(W| |00001bc0| 69 6e 64 6f 77 50 74 72 | 2c 20 55 49 6e 74 33 32 |indowPtr|, UInt32| |00001bd0| 2a 29 0d 7b 0d 09 3a 3a | 4e 6f 74 65 41 6c 65 72 |*).{..::|NoteAler| |00001be0| 74 28 20 35 35 36 2c 20 | 6e 69 6c 20 29 3b 0d 09 |t( 556, |nil );..| |00001bf0| 72 65 74 75 72 6e 20 6e | 6f 45 72 72 3b 0d 7d 0d |return n|oErr;.}.| |00001c00| 0d 0d 0d 0d 0d 0d 2f 2a | 20 0d 09 50 6c 75 67 53 |....../*| ..PlugS| |00001c10| 65 74 74 69 6e 67 73 0d | 0d 09 43 61 6c 6c 65 64 |ettings.|..Called| |00001c20| 20 77 68 65 6e 20 75 73 | 65 72 20 73 65 6c 65 63 | when us|er selec| |00001c30| 74 73 20 79 6f 75 72 20 | 70 6c 75 67 69 6e 20 66 |ts your |plugin f| |00001c40| 72 6f 6d 20 74 68 65 20 | 53 65 74 74 69 6e 67 73 |rom the |Settings| |00001c50| 20 73 75 62 6d 65 6e 75 | 2e 20 4f 6e 6c 79 20 75 | submenu|. Only u| |00001c60| 73 65 64 20 69 66 20 79 | 6f 75 20 68 61 76 65 20 |sed if y|ou have | |00001c70| 64 65 63 6c 61 72 65 64 | 20 74 68 61 74 0d 09 79 |declared| that..y| |00001c80| 6f 75 20 73 75 70 70 6f | 72 74 20 73 65 74 74 69 |ou suppo|rt setti| |00001c90| 6e 67 73 20 28 66 6c 61 | 67 48 61 73 53 65 74 74 |ngs (fla|gHasSett| |00001ca0| 69 6e 67 73 20 69 73 20 | 73 65 74 29 2e 0d 09 0d |ings is |set)....| |00001cb0| 09 59 6f 75 20 73 68 6f | 75 6c 64 20 64 69 73 70 |.You sho|uld disp| |00001cc0| 6c 61 79 20 74 68 65 20 | 73 65 74 74 69 6e 67 73 |lay the |settings| |00001cd0| 20 64 69 61 6c 6f 67 20 | 68 65 72 65 2c 20 6f 72 | dialog |here, or| |00001ce0| 20 64 6f 20 77 68 61 74 | 65 76 65 72 72 20 79 6f | do what|everr yo| |00001cf0| 75 20 66 65 65 6c 20 6c | 69 6b 65 2e 20 3d 29 20 |u feel l|ike. =) | |00001d00| 4a 75 73 74 20 72 65 6d | 65 6d 62 65 72 20 74 68 |Just rem|ember th| |00001d10| 61 74 20 77 68 65 6e 20 | 75 73 65 72 0d 09 63 68 |at when |user..ch| |00001d20| 6f 6f 73 65 73 20 73 65 | 74 74 69 6e 67 73 20 28 |ooses se|ttings (| |00001d30| 73 29 68 65 20 65 78 70 | 65 63 74 73 20 73 6f 6d |s)he exp|ects som| |00001d40| 65 20 69 6e 74 65 72 61 | 63 74 69 6e 6f 20 77 69 |e intera|ctino wi| |00001d50| 74 68 20 74 68 65 20 70 | 6c 75 67 69 6e 2c 20 6c |th the p|lugin, l| |00001d60| 69 6b 65 20 74 68 65 20 | 64 69 61 6c 6f 67 20 6f |ike the |dialog o| |00001d70| 72 20 6c 69 6b 65 20 74 | 68 61 74 2e 0d 2a 2f 0d |r like t|hat..*/.| |00001d80| 4f 53 53 74 61 74 75 73 | 20 56 69 73 53 65 74 74 |OSStatus| VisSett| |00001d90| 69 6e 67 73 28 57 69 6e | 64 6f 77 50 74 72 20 69 |ings(Win|dowPtr i| |00001da0| 6e 57 69 6e 64 6f 77 2c | 20 55 49 6e 74 33 32 2a |nWindow,| UInt32*| |00001db0| 20 69 6f 52 65 66 63 6f | 6e 29 20 7b 0d 0d 23 70 | ioRefco|n) {..#p| |00001dc0| 72 61 67 6d 61 20 75 6e | 75 73 65 64 20 28 69 6e |ragma un|used (in| |00001dd0| 57 69 6e 64 6f 77 2c 20 | 69 6f 52 65 66 63 6f 6e |Window, |ioRefcon| |00001de0| 29 0d 09 72 65 74 75 72 | 6e 20 6e 6f 45 72 72 3b |)..retur|n noErr;| |00001df0| 0d 7d 0d 0d 0d 0d 0d 0d | 0d 0d 0d 0d 0d 23 69 66 |.}......|.....#if| |00001e00| 64 65 66 20 4d 41 43 41 | 4d 50 0d 0d 2f 2a 20 0d |def MACA|MP../* .| |00001e10| 0d 2a 2a 2a 2a 2a 20 20 | 45 76 65 72 79 74 68 69 |.***** |Everythi| |00001e20| 6e 67 20 62 65 6c 6f 77 | 20 68 65 72 65 20 69 73 |ng below| here is| |00001e30| 20 66 6f 72 20 61 20 70 | 72 6f 6a 65 63 74 20 74 | for a p|roject t| |00001e40| 68 61 74 20 72 75 6e 73 | 20 6f 6e 20 69 74 73 20 |hat runs| on its | |00001e50| 6f 77 6e 2e 20 20 0d 0d | 45 73 73 65 6e 74 69 61 |own. ..|Essentia| |00001e60| 6c 20 77 68 65 6e 20 79 | 6f 75 20 6e 65 65 64 20 |l when y|ou need | |00001e70| 74 6f 20 64 65 62 75 67 | 2c 20 65 74 63 0d 2d 41 |to debug|, etc.-A| |00001e80| 43 4f 20 31 2f 31 34 2f | 39 39 0d 0d 2a 2f 0d 0d |CO 1/14/|99..*/..| |00001e90| 23 69 6e 63 6c 75 64 65 | 20 3c 54 79 70 65 73 2e |#include| <Types.| |00001ea0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 4d 65 6d |h>.#incl|ude <Mem| |00001eb0| 6f 72 79 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ory.h>.#|include | |00001ec0| 3c 51 75 69 63 6b 64 72 | 61 77 2e 68 3e 0d 23 69 |<Quickdr|aw.h>.#i| |00001ed0| 6e 63 6c 75 64 65 20 3c | 46 6f 6e 74 73 2e 68 3e |nclude <|Fonts.h>| |00001ee0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 45 76 65 6e 74 |.#includ|e <Event| |00001ef0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 4d |s.h>.#in|clude <M| |00001f00| 65 6e 75 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |enus.h>.|#include| |00001f10| 20 3c 57 69 6e 64 6f 77 | 73 2e 68 3e 0d 23 69 6e | <Window|s.h>.#in| |00001f20| 63 6c 75 64 65 20 3c 54 | 65 78 74 45 64 69 74 2e |clude <T|extEdit.| |00001f30| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 44 69 61 |h>.#incl|ude <Dia| |00001f40| 6c 6f 67 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |logs.h>.|#include| |00001f50| 20 3c 4f 53 55 74 69 6c | 73 2e 68 3e 0d 23 69 6e | <OSUtil|s.h>.#in| |00001f60| 63 6c 75 64 65 20 3c 54 | 6f 6f 6c 55 74 69 6c 73 |clude <T|oolUtils| |00001f70| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 53 65 |.h>.#inc|lude <Se| |00001f80| 67 4c 6f 61 64 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |gLoad.h>|.#includ| |00001f90| 65 20 3c 53 6f 75 6e 64 | 2e 68 3e 0d 0d 09 0d 2f |e <Sound|.h>..../| |00001fa0| 2a 20 50 72 6f 74 6f 74 | 79 70 65 73 20 2a 2f 0d |* Protot|ypes */.| |00001fb0| 76 6f 69 64 20 49 6e 69 | 74 69 61 6c 69 7a 65 28 |void Ini|tialize(| |00001fc0| 76 6f 69 64 29 3b 0d 0d | 2f 2f 20 0d 2f 2f 09 4d |void);..|// .//.M| |00001fd0| 61 69 6e 20 62 6f 64 79 | 20 6f 66 20 70 72 6f 67 |ain body| of prog| |00001fe0| 72 61 6d 20 53 69 6c 6c | 79 42 61 6c 6c 73 0d 2f |ram Sill|yBalls./| |00001ff0| 2f 0d 23 69 6e 63 6c 75 | 64 65 20 22 45 78 70 72 |/.#inclu|de "Expr| |00002000| 65 73 73 69 6f 6e 2e 68 | 22 0d 23 69 6e 63 6c 75 |ession.h|".#inclu| |00002010| 64 65 20 22 48 61 73 68 | 74 61 62 6c 65 2e 68 22 |de "Hash|table.h"| |00002020| 0d 0d 0d 0d 0d 76 6f 69 | 64 20 64 75 6d 6d 79 47 |.....voi|d dummyG| |00002030| 65 74 46 46 54 28 20 64 | 6f 75 62 6c 65 2a 2a 20 |etFFT( d|ouble** | |00002040| 6f 75 74 46 46 54 2c 20 | 55 49 6e 74 31 36 2a 20 |outFFT, |UInt16* | |00002050| 6f 75 74 46 46 54 53 69 | 7a 65 20 29 3b 0d 0d 76 |outFFTSi|ze );..v| |00002060| 6f 69 64 20 64 75 6d 6d | 79 47 65 74 46 46 54 28 |oid dumm|yGetFFT(| |00002070| 20 64 6f 75 62 6c 65 2a | 2a 20 6f 75 74 46 46 54 | double*|* outFFT| |00002080| 2c 20 55 49 6e 74 31 36 | 2a 20 6f 75 74 46 46 54 |, UInt16|* outFFT| |00002090| 53 69 7a 65 20 29 20 7b | 0d 09 2a 6f 75 74 46 46 |Size ) {|..*outFF| |000020a0| 54 20 3d 20 67 44 75 6d | 6d 79 46 46 54 3b 0d 09 |T = gDum|myFFT;..| |000020b0| 2a 6f 75 74 46 46 54 53 | 69 7a 65 20 3d 20 30 3b |*outFFTS|ize = 0;| |000020c0| 0d 7d 0d 0d 2f 2f 4d 57 | 20 73 70 65 63 69 66 69 |.}..//MW| specifi| |000020d0| 65 64 20 61 72 67 75 6d | 65 6e 74 20 61 6e 64 20 |ed argum|ent and | |000020e0| 72 65 74 75 72 6e 20 74 | 79 70 65 2e 0d 69 6e 74 |return t|ype..int| |000020f0| 20 6d 61 69 6e 28 76 6f | 69 64 29 0d 7b 0d 09 47 | main(vo|id).{..G| |00002100| 72 61 66 50 6f 72 74 20 | 77 69 6e 3b 0d 09 57 69 |rafPort |win;..Wi| |00002110| 6e 64 6f 77 50 74 72 20 | 77 69 6e 50 20 3d 20 26 |ndowPtr |winP = &| |00002120| 77 69 6e 3b 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |win;..un|signed l| |00002130| 6f 6e 67 09 6e 75 6d 2c | 20 4e 20 3d 20 4e 55 4d |ong.num,| N = NUM| |00002140| 5f 53 41 4d 50 4c 45 5f | 42 49 4e 53 3b 0d 09 46 |_SAMPLE_|BINS;..F| |00002150| 53 53 70 65 63 20 73 70 | 65 63 3b 0d 0d 09 66 6f |SSpec sp|ec;...fo| |00002160| 72 20 28 20 6e 75 6d 20 | 3d 20 30 3b 20 6e 75 6d |r ( num |= 0; num| |00002170| 20 3c 20 4e 3b 20 6e 75 | 6d 2b 2b 20 29 0d 09 09 | < N; nu|m++ )...| |00002180| 67 44 75 6d 6d 79 46 46 | 54 5b 20 6e 75 6d 20 5d |gDummyFF|T[ num ]| |00002190| 20 3d 20 30 3b 0d 09 0d | 09 49 6e 69 74 69 61 6c | = 0;...|.Initial| |000021a0| 69 7a 65 28 29 3b 0d 09 | 67 50 6c 75 67 49 6e 66 |ize();..|gPlugInf| |000021b0| 6f 2e 6d 61 20 3d 20 6e | 65 77 20 56 50 43 61 6c |o.ma = n|ew VPCal| |000021c0| 6c 62 61 63 6b 73 3b 0d | 09 67 50 6c 75 67 49 6e |lbacks;.|.gPlugIn| |000021d0| 66 6f 2e 6d 61 20 2d 3e | 20 47 65 74 46 46 54 20 |fo.ma ->| GetFFT | |000021e0| 3d 20 64 75 6d 6d 79 47 | 65 74 46 46 54 3b 0d 09 |= dummyG|etFFT;..| |000021f0| 67 50 6c 75 67 49 6e 66 | 6f 2e 6d 61 20 2d 3e 20 |gPlugInf|o.ma -> | |00002200| 47 65 74 53 74 61 74 75 | 73 20 3d 20 4e 55 4c 4c |GetStatu|s = NULL| |00002210| 3b 20 0d 09 67 50 6c 75 | 67 49 6e 66 6f 2e 6d 61 |; ..gPlu|gInfo.ma| |00002220| 20 2d 3e 20 45 6e 74 65 | 72 46 75 6c 6c 53 63 72 | -> Ente|rFullScr| |00002230| 65 65 6e 20 3d 20 4e 55 | 4c 4c 3b 0d 09 67 50 6c |een = NU|LL;..gPl| |00002240| 75 67 49 6e 66 6f 2e 6d | 61 20 2d 3e 20 45 78 69 |ugInfo.m|a -> Exi| |00002250| 74 46 75 6c 6c 53 63 72 | 65 65 6e 20 3d 20 4e 55 |tFullScr|een = NU| |00002260| 4c 4c 3b 0d 09 0d 09 56 | 69 73 49 6e 69 74 69 61 |LL;....V|isInitia| |00002270| 6c 69 7a 65 28 20 26 73 | 70 65 63 2c 20 26 77 69 |lize( &s|pec, &wi| |00002280| 6e 50 2c 20 26 6e 75 6d | 20 29 3b 0d 0d 09 0d 09 |nP, &num| );.....| |00002290| 64 6f 20 7b 0d 09 09 56 | 69 73 44 72 61 77 28 20 |do {...V|isDraw( | |000022a0| 77 69 6e 50 2c 20 26 6e | 75 6d 20 29 3b 0d 09 09 |winP, &n|um );...| |000022b0| 6c 6f 6e 67 20 6e 20 3d | 20 45 67 4f 53 55 74 69 |long n =| EgOSUti| |000022c0| 6c 73 3a 3a 52 6e 64 28 | 20 30 2c 20 4e 2d 31 20 |ls::Rnd(| 0, N-1 | |000022d0| 29 3b 0d 09 09 67 44 75 | 6d 6d 79 46 46 54 5b 20 |);...gDu|mmyFFT[ | |000022e0| 6e 20 5d 20 2b 3d 20 2e | 30 31 31 20 2a 20 45 67 |n ] += .|011 * Eg| |000022f0| 4f 53 55 74 69 6c 73 3a | 3a 52 6e 64 28 20 30 2c |OSUtils:|:Rnd( 0,| |00002300| 20 31 30 30 20 29 3b 0d | 09 09 66 6f 72 20 28 20 | 100 );.|..for ( | |00002310| 6e 75 6d 20 3d 20 30 3b | 20 6e 75 6d 20 3c 20 4e |num = 0;| num < N| |00002320| 3b 20 6e 75 6d 2b 2b 20 | 29 20 7b 0d 09 09 09 67 |; num++ |) {....g| |00002330| 44 75 6d 6d 79 46 46 54 | 5b 20 6e 75 6d 20 5d 20 |DummyFFT|[ num ] | |00002340| 3d 20 2e 38 20 2a 20 67 | 44 75 6d 6d 79 46 46 54 |= .8 * g|DummyFFT| |00002350| 5b 20 6e 75 6d 20 5d 3b | 0d 09 09 7d 0d 09 7d 20 |[ num ];|...}..} | |00002360| 77 68 69 6c 65 20 28 21 | 42 75 74 74 6f 6e 28 29 |while (!|Button()| |00002370| 29 3b 0d 0d 09 56 69 73 | 54 65 72 6d 69 6e 61 74 |);...Vis|Terminat| |00002380| 65 28 20 77 69 6e 50 2c | 20 26 6e 75 6d 20 29 3b |e( winP,| &num );| |00002390| 0d 09 0d 09 64 65 6c 65 | 74 65 20 67 50 6c 75 67 |....dele|te gPlug| |000023a0| 49 6e 66 6f 2e 6d 61 3b | 0d 09 0d 09 72 65 74 75 |Info.ma;|....retu| |000023b0| 72 6e 20 30 3b 09 0d 7d | 0d 0d 0d 2f 2f 20 0d 2f |rn 0;..}|...// ./| |000023c0| 2f 09 49 6e 69 74 69 61 | 6c 69 7a 65 20 65 76 65 |/.Initia|lize eve| |000023d0| 72 79 74 68 69 6e 67 20 | 66 6f 72 20 74 68 65 20 |rything |for the | |000023e0| 70 72 6f 67 72 61 6d 2c | 20 6d 61 6b 65 20 73 75 |program,| make su| |000023f0| 72 65 20 77 65 20 63 61 | 6e 20 72 75 6e 0d 2f 2f |re we ca|n run.//| |00002400| 0d 0d 2f 2f 4d 57 20 73 | 70 65 63 69 66 69 65 64 |..//MW s|pecified| |00002410| 20 61 72 67 75 6d 65 6e | 74 20 61 6e 64 20 72 65 | argumen|t and re| |00002420| 74 75 72 6e 20 74 79 70 | 65 2e 0d 76 6f 69 64 20 |turn typ|e..void | |00002430| 49 6e 69 74 69 61 6c 69 | 7a 65 28 76 6f 69 64 29 |Initiali|ze(void)| |00002440| 0d 7b 0d 09 4f 53 45 72 | 72 09 09 65 72 72 6f 72 |.{..OSEr|r..error| |00002450| 3b 0d 09 53 79 73 45 6e | 76 52 65 63 09 74 68 65 |;..SysEn|vRec.the| |00002460| 57 6f 72 6c 64 3b 0d 09 | 09 0d 09 2f 2f 0d 09 2f |World;..|...//../| |00002470| 2f 09 54 65 73 74 20 74 | 68 65 20 63 6f 6d 70 75 |/.Test t|he compu| |00002480| 74 65 72 20 74 6f 20 62 | 65 20 73 75 72 65 20 77 |ter to b|e sure w| |00002490| 65 20 63 61 6e 20 64 6f | 20 63 6f 6c 6f 72 2e 20 |e can do| color. | |000024a0| 20 0d 09 2f 2f 09 49 66 | 20 6e 6f 74 20 77 65 20 | ..//.If| not we | |000024b0| 77 6f 75 6c 64 20 63 72 | 61 73 68 2c 20 77 68 69 |would cr|ash, whi| |000024c0| 63 68 20 77 6f 75 6c 64 | 20 62 65 20 62 61 64 2e |ch would| be bad.| |000024d0| 20 20 0d 09 2f 2f 09 49 | 66 20 77 65 20 63 61 6e | ..//.I|f we can| |000024e0| d5 74 20 72 75 6e 2c 20 | 6a 75 73 74 20 62 65 65 |.t run, |just bee| |000024f0| 70 20 61 6e 64 20 65 78 | 69 74 2e 0d 09 2f 2f 0d |p and ex|it...//.| |00002500| 0d 09 65 72 72 6f 72 20 | 3d 20 53 79 73 45 6e 76 |..error |= SysEnv| |00002510| 69 72 6f 6e 73 28 31 2c | 20 26 74 68 65 57 6f 72 |irons(1,| &theWor| |00002520| 6c 64 29 3b 0d 09 69 66 | 20 28 74 68 65 57 6f 72 |ld);..if| (theWor| |00002530| 6c 64 2e 68 61 73 43 6f | 6c 6f 72 51 44 20 3d 3d |ld.hasCo|lorQD ==| |00002540| 20 66 61 6c 73 65 29 20 | 7b 0d 09 09 53 79 73 42 | false) |{...SysB| |00002550| 65 65 70 28 35 30 29 3b | 0d 09 09 45 78 69 74 54 |eep(50);|...ExitT| |00002560| 6f 53 68 65 6c 6c 28 29 | 3b 09 09 09 09 09 2f 2a |oShell()|;...../*| |00002570| 20 49 66 20 6e 6f 20 63 | 6f 6c 6f 72 20 51 44 2c | If no c|olor QD,| |00002580| 20 77 65 20 6d 75 73 74 | 20 6c 65 61 76 65 2e 20 | we must| leave. | |00002590| 2a 2f 0d 09 7d 0d 09 0d | 09 2f 2a 20 49 6e 69 74 |*/..}...|./* Init| |000025a0| 69 61 6c 69 7a 65 20 61 | 6c 6c 20 74 68 65 20 6e |ialize a|ll the n| |000025b0| 65 65 64 65 64 20 6d 61 | 6e 61 67 65 72 73 2e 20 |eeded ma|nagers. | |000025c0| 2a 2f 0d 09 49 6e 69 74 | 47 72 61 66 28 26 71 64 |*/..Init|Graf(&qd| |000025d0| 2e 74 68 65 50 6f 72 74 | 29 3b 0d 09 49 6e 69 74 |.thePort|);..Init| |000025e0| 46 6f 6e 74 73 28 29 3b | 0d 09 49 6e 69 74 57 69 |Fonts();|..InitWi| |000025f0| 6e 64 6f 77 73 28 29 3b | 0d 09 49 6e 69 74 4d 65 |ndows();|..InitMe| |00002600| 6e 75 73 28 29 3b 0d 09 | 54 45 49 6e 69 74 28 29 |nus();..|TEInit()| |00002610| 3b 0d 09 49 6e 69 74 44 | 69 61 6c 6f 67 73 28 6e |;..InitD|ialogs(n| |00002620| 69 6c 29 3b 0d 09 49 6e | 69 74 43 75 72 73 6f 72 |il);..In|itCursor| |00002630| 28 29 3b 0d 0d 09 2f 2f | 0d 09 2f 2f 09 54 6f 20 |();...//|..//.To | |00002640| 6d 61 6b 65 20 74 68 65 | 20 52 61 6e 64 6f 6d 20 |make the| Random | |00002650| 73 65 71 75 65 6e 63 65 | 73 20 74 72 75 6c 79 20 |sequence|s truly | |00002660| 72 61 6e 64 6f 6d 2c 20 | 77 65 20 6e 65 65 64 20 |random, |we need | |00002670| 74 6f 20 6d 61 6b 65 20 | 74 68 65 20 73 65 65 64 |to make |the seed| |00002680| 20 73 74 61 72 74 0d 09 | 2f 2f 09 61 74 20 61 20 | start..|//.at a | |00002690| 64 69 66 66 65 72 65 6e | 74 20 6e 75 6d 62 65 72 |differen|t number| |000026a0| 2e 20 20 41 6e 20 65 61 | 73 79 20 77 61 79 20 74 |. An ea|sy way t| |000026b0| 6f 20 64 6f 20 74 68 69 | 73 20 69 73 20 74 6f 20 |o do thi|s is to | |000026c0| 70 75 74 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |put the |current | |000026d0| 74 69 6d 65 0d 09 2f 2f | 09 61 6e 64 20 64 61 74 |time..//|.and dat| |000026e0| 65 20 69 6e 74 6f 20 74 | 68 65 20 73 65 65 64 2e |e into t|he seed.| |000026f0| 20 20 53 69 6e 63 65 20 | 69 74 20 69 73 20 61 6c | Since |it is al| |00002700| 77 61 79 73 20 69 6e 63 | 72 65 6d 65 6e 74 69 6e |ways inc|rementin| |00002710| 67 20 74 68 65 20 73 74 | 61 72 74 69 6e 67 20 73 |g the st|arting s| |00002720| 65 65 64 0d 09 2f 2f 09 | 77 69 6c 6c 20 61 6c 77 |eed..//.|will alw| |00002730| 61 79 73 20 62 65 20 64 | 69 66 66 65 72 65 6e 74 |ays be d|ifferent| |00002740| 2e 20 20 44 6f 6e d5 74 | 20 66 6f 72 20 65 61 63 |. Don.t| for eac| |00002750| 68 20 63 61 6c 6c 20 6f | 66 20 52 61 6e 64 6f 6d |h call o|f Random| |00002760| 2c 20 6f 72 20 74 68 65 | 20 73 65 71 75 65 6e 63 |, or the| sequenc| |00002770| 65 0d 09 2f 2f 09 77 69 | 6c 6c 20 6e 6f 20 6c 6f |e..//.wi|ll no lo| |00002780| 6e 67 65 72 20 62 65 20 | 72 61 6e 64 6f 6d 2e 20 |nger be |random. | |00002790| 20 4f 6e 6c 79 20 6e 65 | 65 64 65 64 20 6f 6e 63 | Only ne|eded onc| |000027a0| 65 2c 20 68 65 72 65 20 | 69 6e 20 74 68 65 20 69 |e, here |in the i| |000027b0| 6e 69 74 2e 0d 09 2f 2f | 0d 09 47 65 74 44 61 74 |nit...//|..GetDat| |000027c0| 65 54 69 6d 65 28 28 75 | 6e 73 69 67 6e 65 64 20 |eTime((u|nsigned | |000027d0| 6c 6f 6e 67 2a 29 20 26 | 71 64 2e 72 61 6e 64 53 |long*) &|qd.randS| |000027e0| 65 65 64 29 3b 0d 0d 7d | 0d 0d 0d 23 65 6e 64 69 |eed);..}|...#endi| |000027f0| 66 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |f.......|........| |00002800| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F| |00002810| 20 68 61 76 65 6e 74 20 | 74 65 73 74 65 64 2e 2e | havent |tested..| |00002820| 2e 20 2a 2f 0d 09 09 09 | 74 6d 70 3d 28 4d 41 58 |. */....|tmp=(MAX| |00002830| 0e 6d 61 69 6e 4d 61 63 | 41 4d 50 2e 63 70 70 73 |.mainMac|AMP.cpps| |00002840| 61 6e 65 6c 53 44 4b 69 | 62 75 74 69 6f 6e 31 31 |anelSDKi|bution11| |00002850| 00 73 54 45 58 54 43 57 | 49 45 00 00 ff ff ff ff |.sTEXTCW|IE......| |00002860| 00 00 00 00 00 00 00 00 | 00 00 80 00 00 00 00 00 |........|........| |00002870| 00 00 b1 d1 3f 74 00 00 | 27 72 00 00 01 9a 09 09 |....?t..|'r......| |00002880| 09 6e 6f 5f 6f 66 5f 69 | 6d 64 63 74 73 5b 30 5d |.no_of_i|mdcts[0]| |00002890| 3d 6e 6f 5f 6f 66 5f 69 | 6d 64 63 74 73 5b 31 5d |=no_of_i|mdcts[1]| |000028a0| 3d 28 74 5f 73 5b 73 66 | 62 5d 2d 31 29 2f 36 2b |=(t_s[sf|b]-1)/6+| |000028b0| 31 3b 0d 09 7d 0d 09 65 | 6c 73 65 20 6e 6f 5f 6f |1;..}..e|lse no_o| |000028c0| 66 5f 69 6d 64 63 74 73 | 5b 30 5d 3d 6e 6f 5f 6f |f_imdcts|[0]=no_o| |000028d0| 66 5f 69 6d 64 63 74 73 | 5b 31 5d 3d 28 69 73 62 |f_imdcts|[1]=(isb| |000028e0| 6f 75 6e 64 5b 30 5d 2d | 31 29 2f 31 38 2b 31 3b |ound[0]-|1)/18+1;| |000028f0| 0d 0d 20 20 20 7d 0d 0d | 20 20 20 72 65 74 75 72 |.. }..| retur| |00002900| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....| |00002910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002920| 00 00 00 00 00 00 00 03 | 00 04 00 2f 00 08 02 46 |........|.../...F| |00002930| 02 63 00 2f 00 08 02 46 | 02 63 b4 2d 81 df 00 00 |.c./...F|.c.-....| |00002940| 0a 18 00 00 0a 18 00 00 | 0b d5 01 00 00 00 00 04 |........|........| |00002950| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T| |00002960| 00 00 00 46 04 70 80 00 | 1d 62 00 00 00 1c 00 46 |...F.p..|.b.....F| |00002970| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..| |00002980| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........| |00002990| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........| |000029a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+