Sound.pas 90 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324
  1. {
  2. File: Sound.p
  3. Contains: Sound Manager Interfaces.
  4. Version: Technology: Sound Manager 3.6
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1986-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit Sound;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,Components,MixedMode,Dialogs;
  92. {$ALIGN MAC68K}
  93. {
  94. * * * N O T E * * *
  95. This file has been updated to include Sound Manager 3.3 interfaces.
  96. Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  97. that originally shipped with the PowerMacs. These missing functions and the
  98. new 3.3 interfaces have been released in the SoundLib library for PowerPC
  99. developers to link with. The runtime library for these functions are
  100. installed by the Sound Manager. The following functions are found in SoundLib.
  101. GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
  102. UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
  103. SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
  104. SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
  105. SoundConverterConvertBuffer(), SoundConverterEndConversion(),
  106. AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
  107. AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
  108. AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
  109. OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
  110. SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
  111. SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
  112. SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
  113. SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
  114. SoundComponentStartSource(), SoundComponentStopSource(),
  115. ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
  116. }
  117. {
  118. Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
  119. These items are no longer defined, but appear here so that someone
  120. searching the interfaces might find them. If you are using one of these
  121. items, you must change your code to support the Sound Manager.
  122. swMode, ftMode, ffMode
  123. FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
  124. SndCompletionProcPtr
  125. StartSound, StopSound, SoundDone
  126. SetSoundVol, GetSoundVol
  127. }
  128. {
  129. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130. constants
  131. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  132. }
  133. const twelfthRootTwo = 1.05946309435;
  134. const
  135. soundListRsrc = $736E6420 (* 'snd ' *); { Resource type used by Sound Manager }
  136. kSimpleBeepID = 1; { reserved resource ID for Simple Beep }
  137. rate48khz = $BB800000; { 48000.00000 in fixed-point }
  138. rate44khz = $AC440000; { 44100.00000 in fixed-point }
  139. rate32khz = $7D000000; { 32000.00000 in fixed-point }
  140. rate22050hz = $56220000; { 22050.00000 in fixed-point }
  141. rate22khz = $56EE8BA3; { 22254.54545 in fixed-point }
  142. rate16khz = $3E800000; { 16000.00000 in fixed-point }
  143. rate11khz = $2B7745D1; { 11127.27273 in fixed-point }
  144. rate11025hz = $2B110000; { 11025.00000 in fixed-point }
  145. rate8khz = $1F400000; { 8000.00000 in fixed-point }
  146. { synthesizer numbers for SndNewChannel }
  147. sampledSynth = 5; { sampled sound synthesizer }
  148. {$ifc CALL_NOT_IN_CARBON}
  149. squareWaveSynth = 1; { square wave synthesizer }
  150. waveTableSynth = 3; { wave table synthesizer }
  151. { old Sound Manager MACE synthesizer numbers }
  152. MACE3snthID = 11;
  153. MACE6snthID = 13;
  154. {$endc} {CALL_NOT_IN_CARBON}
  155. kMiddleC = 60; { MIDI note value for middle C }
  156. kNoVolume = 0; { setting for no sound volume }
  157. kFullVolume = $0100; { 1.0, setting for full hardware output volume }
  158. stdQLength = 128;
  159. dataOffsetFlag = $8000;
  160. kUseOptionalOutputDevice = -1; { only for Sound Manager 3.0 or later }
  161. notCompressed = 0; { compression ID's }
  162. fixedCompression = -1; { compression ID for fixed-sized compression }
  163. variableCompression = -2; { compression ID for variable-sized compression }
  164. twoToOne = 1;
  165. eightToThree = 2;
  166. threeToOne = 3;
  167. sixToOne = 4;
  168. sixToOnePacketSize = 8;
  169. threeToOnePacketSize = 16;
  170. stateBlockSize = 64;
  171. leftOverBlockSize = 32;
  172. firstSoundFormat = $0001; { general sound format }
  173. secondSoundFormat = $0002; { special sampled sound format (HyperCard) }
  174. {$ifc CALL_NOT_IN_CARBON}
  175. dbBufferReady = $00000001; { double buffer is filled }
  176. dbLastBuffer = $00000004; { last double buffer to play }
  177. {$endc} {CALL_NOT_IN_CARBON}
  178. sysBeepDisable = $0000; { SysBeep() enable flags }
  179. sysBeepEnable = $01;
  180. sysBeepSynchronous = $02; { if bit set, make alert sounds synchronous }
  181. unitTypeNoSelection = $FFFF; { unitTypes for AudioSelection.unitType }
  182. unitTypeSeconds = $0000;
  183. stdSH = $00; { Standard sound header encode value }
  184. extSH = $FF; { Extended sound header encode value }
  185. cmpSH = $FE; { Compressed sound header encode value }
  186. { command numbers for SndDoCommand and SndDoImmediate }
  187. nullCmd = 0;
  188. quietCmd = 3;
  189. flushCmd = 4;
  190. reInitCmd = 5;
  191. waitCmd = 10;
  192. pauseCmd = 11;
  193. resumeCmd = 12;
  194. callBackCmd = 13;
  195. syncCmd = 14;
  196. availableCmd = 24;
  197. versionCmd = 25;
  198. volumeCmd = 46; { sound manager 3.0 or later only }
  199. getVolumeCmd = 47; { sound manager 3.0 or later only }
  200. clockComponentCmd = 50; { sound manager 3.2.1 or later only }
  201. getClockComponentCmd = 51; { sound manager 3.2.1 or later only }
  202. scheduledSoundCmd = 52; { sound manager 3.3 or later only }
  203. linkSoundComponentsCmd = 53; { sound manager 3.3 or later only }
  204. soundCmd = 80;
  205. bufferCmd = 81;
  206. rateMultiplierCmd = 86;
  207. getRateMultiplierCmd = 87;
  208. {$ifc CALL_NOT_IN_CARBON}
  209. { command numbers for SndDoCommand and SndDoImmediate that are not available for use in Carbon }
  210. initCmd = 1;
  211. freeCmd = 2;
  212. totalLoadCmd = 26;
  213. loadCmd = 27;
  214. freqDurationCmd = 40;
  215. restCmd = 41;
  216. freqCmd = 42;
  217. ampCmd = 43;
  218. timbreCmd = 44;
  219. getAmpCmd = 45;
  220. waveTableCmd = 60;
  221. phaseCmd = 61;
  222. rateCmd = 82;
  223. continueCmd = 83;
  224. doubleBufferCmd = 84;
  225. getRateCmd = 85;
  226. sizeCmd = 90; { obsolete command }
  227. convertCmd = 91; { obsolete MACE command }
  228. {$endc} {CALL_NOT_IN_CARBON}
  229. {$ifc OLDROUTINENAMES}
  230. { channel initialization parameters }
  231. waveInitChannelMask = $07;
  232. waveInitChannel0 = $04; { wave table only, Sound Manager 2.0 and earlier }
  233. waveInitChannel1 = $05; { wave table only, Sound Manager 2.0 and earlier }
  234. waveInitChannel2 = $06; { wave table only, Sound Manager 2.0 and earlier }
  235. waveInitChannel3 = $07; { wave table only, Sound Manager 2.0 and earlier }
  236. initChan0 = $04; { obsolete spelling }
  237. initChan1 = $05; { obsolete spelling }
  238. initChan2 = $06; { obsolete spelling }
  239. initChan3 = $07; { obsolete spelling }
  240. outsideCmpSH = 0; { obsolete MACE constant }
  241. insideCmpSH = 1; { obsolete MACE constant }
  242. aceSuccess = 0; { obsolete MACE constant }
  243. aceMemFull = 1; { obsolete MACE constant }
  244. aceNilBlock = 2; { obsolete MACE constant }
  245. aceBadComp = 3; { obsolete MACE constant }
  246. aceBadEncode = 4; { obsolete MACE constant }
  247. aceBadDest = 5; { obsolete MACE constant }
  248. aceBadCmd = 6; { obsolete MACE constant }
  249. {$endc} {OLDROUTINENAMES}
  250. initChanLeft = $0002; { left stereo channel }
  251. initChanRight = $0003; { right stereo channel }
  252. initNoInterp = $0004; { no linear interpolation }
  253. initNoDrop = $0008; { no drop-sample conversion }
  254. initMono = $0080; { monophonic channel }
  255. initStereo = $00C0; { stereo channel }
  256. initMACE3 = $0300; { MACE 3:1 }
  257. initMACE6 = $0400; { MACE 6:1 }
  258. initPanMask = $0003; { mask for right/left pan values }
  259. initSRateMask = $0030; { mask for sample rate values }
  260. initStereoMask = $00C0; { mask for mono/stereo values }
  261. initCompMask = $FF00; { mask for compression IDs }
  262. { Get&Set Sound Information Selectors }
  263. siActiveChannels = $63686163 (* 'chac' *); { active channels }
  264. siActiveLevels = $6C6D6163 (* 'lmac' *); { active meter levels }
  265. siAGCOnOff = $61676320 (* 'agc ' *); { automatic gain control state }
  266. siAsync = $6173796E (* 'asyn' *); { asynchronous capability }
  267. siAVDisplayBehavior = $61766462 (* 'avdb' *);
  268. siChannelAvailable = $63686176 (* 'chav' *); { number of channels available }
  269. siCompressionAvailable = $636D6176 (* 'cmav' *); { compression types available }
  270. siCompressionChannels = $63706374 (* 'cpct' *); { compressor's number of channels }
  271. siCompressionFactor = $636D6661 (* 'cmfa' *); { current compression factor }
  272. siCompressionHeader = $636D6864 (* 'cmhd' *); { return compression header }
  273. siCompressionNames = $636E616D (* 'cnam' *); { compression type names available }
  274. siCompressionParams = $65766177 (* 'evaw' *); { compression parameters }
  275. siCompressionSampleRate = $63707274 (* 'cprt' *); { compressor's sample rate }
  276. siCompressionType = $636F6D70 (* 'comp' *); { current compression type }
  277. siContinuous = $636F6E74 (* 'cont' *); { continous recording }
  278. siDecompressionParams = $77617665 (* 'wave' *); { decompression parameters }
  279. siDeviceBufferInfo = $6462696E (* 'dbin' *); { size of interrupt buffer }
  280. siDeviceConnected = $64636F6E (* 'dcon' *); { input device connection status }
  281. siDeviceIcon = $69636F6E (* 'icon' *); { input device icon }
  282. siDeviceName = $6E616D65 (* 'name' *); { input device name }
  283. siEQSpectrumBands = $65717362 (* 'eqsb' *); { number of spectrum bands }
  284. siEQSpectrumLevels = $65716C76 (* 'eqlv' *); { gets spectum meter levels }
  285. siEQSpectrumOnOff = $65716C6F (* 'eqlo' *); { turn on/off spectum meter levels }
  286. siEQSpectrumResolution = $65717273 (* 'eqrs' *); { set the resolution of the FFT, 0 = low res (<=16 bands), 1 = high res (16-64 bands) }
  287. siEQToneControlGain = $65717467 (* 'eqtg' *); { set the bass and treble gain }
  288. siEQToneControlOnOff = $65717463 (* 'eqtc' *); { turn on equalizer attenuation }
  289. siHardwareBalance = $6862616C (* 'hbal' *);
  290. siHardwareBalanceSteps = $68626C73 (* 'hbls' *);
  291. siHardwareBass = $68626173 (* 'hbas' *);
  292. siHardwareBassSteps = $68627374 (* 'hbst' *);
  293. siHardwareBusy = $68776273 (* 'hwbs' *); { sound hardware is in use }
  294. siHardwareFormat = $6877666D (* 'hwfm' *); { get hardware format }
  295. siHardwareMute = $686D7574 (* 'hmut' *); { mute state of all hardware }
  296. siHardwareMuteNoPrefs = $686D6E70 (* 'hmnp' *); { mute state of all hardware, but don't store in prefs }
  297. siHardwareTreble = $68747262 (* 'htrb' *);
  298. siHardwareTrebleSteps = $68777473 (* 'hwts' *);
  299. siHardwareVolume = $68766F6C (* 'hvol' *); { volume level of all hardware }
  300. siHardwareVolumeSteps = $68737470 (* 'hstp' *); { number of volume steps for hardware }
  301. siHeadphoneMute = $706D7574 (* 'pmut' *); { mute state of headphones }
  302. siHeadphoneVolume = $70766F6C (* 'pvol' *); { volume level of headphones }
  303. siHeadphoneVolumeSteps = $68647374 (* 'hdst' *); { number of volume steps for headphones }
  304. siInputAvailable = $696E6176 (* 'inav' *); { input sources available }
  305. siInputGain = $6761696E (* 'gain' *); { input gain }
  306. siInputSource = $736F7572 (* 'sour' *); { input source selector }
  307. siInputSourceNames = $736E616D (* 'snam' *); { input source names }
  308. siLevelMeterOnOff = $6C6D6574 (* 'lmet' *); { level meter state }
  309. siModemGain = $6D676169 (* 'mgai' *); { modem input gain }
  310. siMonitorAvailable = $6D6E6176 (* 'mnav' *);
  311. siMonitorSource = $6D6F6E73 (* 'mons' *);
  312. siNumberChannels = $6368616E (* 'chan' *); { current number of channels }
  313. siOptionsDialog = $6F707464 (* 'optd' *); { display options dialog }
  314. siOSTypeInputSource = $696E7074 (* 'inpt' *); { input source by OSType }
  315. siOSTypeInputAvailable = $696E6176 (* 'inav' *); { list of available input source OSTypes }
  316. siOutputDeviceName = $6F6E616D (* 'onam' *); { output device name }
  317. siPlayThruOnOff = $706C7468 (* 'plth' *); { playthrough state }
  318. siPostMixerSoundComponent = $70736D78 (* 'psmx' *); { install post-mixer effect }
  319. siPreMixerSoundComponent = $70726D78 (* 'prmx' *); { install pre-mixer effect }
  320. siQuality = $7175616C (* 'qual' *); { quality setting }
  321. siRateMultiplier = $726D756C (* 'rmul' *); { throttle rate setting }
  322. siRecordingQuality = $7175616C (* 'qual' *); { recording quality }
  323. siSampleRate = $73726174 (* 'srat' *); { current sample rate }
  324. siSampleRateAvailable = $73726176 (* 'srav' *); { sample rates available }
  325. siSampleSize = $7373697A (* 'ssiz' *); { current sample size }
  326. siSampleSizeAvailable = $73736176 (* 'ssav' *); { sample sizes available }
  327. siSetupCDAudio = $73756364 (* 'sucd' *); { setup sound hardware for CD audio }
  328. siSetupModemAudio = $73756D64 (* 'sumd' *); { setup sound hardware for modem audio }
  329. siSlopeAndIntercept = $666C6170 (* 'flap' *); { floating point variables for conversion }
  330. siSoundClock = $73636C6B (* 'sclk' *);
  331. siUseThisSoundClock = $73636C63 (* 'sclc' *); { sdev uses this to tell the mixer to use his sound clock }
  332. siSpeakerMute = $736D7574 (* 'smut' *); { mute state of all built-in speaker }
  333. siSpeakerVolume = $73766F6C (* 'svol' *); { volume level of built-in speaker }
  334. siSSpCPULoadLimit = $33646C6C (* '3dll' *);
  335. siSSpLocalization = $33646966 (* '3dif' *);
  336. siSSpSpeakerSetup = $33647374 (* '3dst' *);
  337. siStereoInputGain = $73676169 (* 'sgai' *); { stereo input gain }
  338. siSubwooferMute = $626D7574 (* 'bmut' *); { mute state of sub-woofer }
  339. siTerminalType = $74747970 (* 'ttyp' *); { usb terminal type }
  340. siTwosComplementOnOff = $74776F73 (* 'twos' *); { two's complement state }
  341. siVendorProduct = $7670726F (* 'vpro' *); { vendor and product ID }
  342. siVolume = $766F6C75 (* 'volu' *); { volume level of source }
  343. siVoxRecordInfo = $766F7872 (* 'voxr' *); { VOX record parameters }
  344. siVoxStopInfo = $766F7873 (* 'voxs' *); { VOX stop parameters }
  345. siWideStereo = $77696465 (* 'wide' *); { wide stereo setting }
  346. siSupportedExtendedFlags = $6578666C (* 'exfl' *); { which flags are supported in Extended sound data structures }
  347. siRateConverterRollOffSlope = $72636462 (* 'rcdb' *); { the roll-off slope for the rate converter's filter, in whole dB as a long this value is a long whose range is from 20 (worst quality/fastest performance) to 90 (best quality/slowest performance) }
  348. siOutputLatency = $6F6C7465 (* 'olte' *); { latency of sound output component }
  349. siCloseDriver = $636C6F73 (* 'clos' *); { reserved for internal use only }
  350. siInitializeDriver = $696E6974 (* 'init' *); { reserved for internal use only }
  351. siPauseRecording = $70617573 (* 'paus' *); { reserved for internal use only }
  352. siUserInterruptProc = $75736572 (* 'user' *); { reserved for internal use only }
  353. { input source Types }
  354. kInvalidSource = $FFFFFFFF; { this source may be returned from GetInfo if no other source is the monitored source }
  355. kNoSource = $6E6F6E65 (* 'none' *); { no source selection }
  356. kCDSource = $63642020 (* 'cd ' *); { internal CD player input }
  357. kExtMicSource = $656D6963 (* 'emic' *); { external mic input }
  358. kSoundInSource = $73696E6A (* 'sinj' *); { sound input jack }
  359. kRCAInSource = $69726361 (* 'irca' *); { RCA jack input }
  360. kTVFMTunerSource = $7476666D (* 'tvfm' *);
  361. kDAVInSource = $69646176 (* 'idav' *); { DAV analog input }
  362. kIntMicSource = $696D6963 (* 'imic' *); { internal mic input }
  363. kMediaBaySource = $6D626179 (* 'mbay' *); { media bay input }
  364. kModemSource = $6D6F646D (* 'modm' *); { modem input (internal modem on desktops, PCI input on PowerBooks) }
  365. kPCCardSource = $70636D20 (* 'pcm ' *); { PC Card pwm input }
  366. kZoomVideoSource = $7A767063 (* 'zvpc' *); { zoom video input }
  367. kDVDSource = $64766461 (* 'dvda' *); { DVD audio input }
  368. kMicrophoneArray = $6D696361 (* 'mica' *); { microphone array }
  369. { Sound Component Types and Subtypes }
  370. kNoSoundComponentType = $2A2A2A2A (* '****' *);
  371. kSoundComponentType = $73696674 (* 'sift' *); { component type }
  372. kSoundComponentPPCType = $6E696674 (* 'nift' *); { component type for PowerPC code }
  373. kRate8SubType = $72617462 (* 'ratb' *); { 8-bit rate converter }
  374. kRate16SubType = $72617477 (* 'ratw' *); { 16-bit rate converter }
  375. kConverterSubType = $636F6E76 (* 'conv' *); { sample format converter }
  376. kSndSourceSubType = $736F7572 (* 'sour' *); { generic source component }
  377. kMixerType = $6D697872 (* 'mixr' *);
  378. kMixer8SubType = $6D697862 (* 'mixb' *); { 8-bit mixer }
  379. kMixer16SubType = $6D697877 (* 'mixw' *); { 16-bit mixer }
  380. kSoundInputDeviceType = $73696E70 (* 'sinp' *); { sound input component }
  381. kWaveInSubType = $77617669 (* 'wavi' *); { Windows waveIn }
  382. kWaveInSnifferSubType = $7769736E (* 'wisn' *); { Windows waveIn sniffer }
  383. kSoundOutputDeviceType = $73646576 (* 'sdev' *); { sound output component }
  384. kClassicSubType = $636C6173 (* 'clas' *); { classic hardware, i.e. Mac Plus }
  385. kASCSubType = $61736320 (* 'asc ' *); { Apple Sound Chip device }
  386. kDSPSubType = $64737020 (* 'dsp ' *); { DSP device }
  387. kAwacsSubType = $61776163 (* 'awac' *); { Another of Will's Audio Chips device }
  388. kGCAwacsSubType = $61776763 (* 'awgc' *); { Awacs audio with Grand Central DMA }
  389. kSingerSubType = $73696E67 (* 'sing' *); { Singer (via Whitney) based sound }
  390. kSinger2SubType = $736E6732 (* 'sng2' *); { Singer 2 (via Whitney) for Acme }
  391. kWhitSubType = $77686974 (* 'whit' *); { Whit sound component for PrimeTime 3 }
  392. kSoundBlasterSubType = $73626C73 (* 'sbls' *); { Sound Blaster for CHRP }
  393. kWaveOutSubType = $7761766F (* 'wavo' *); { Windows waveOut }
  394. kWaveOutSnifferSubType = $776F736E (* 'wosn' *); { Windows waveOut sniffer }
  395. kDirectSoundSubType = $64736E64 (* 'dsnd' *); { Windows DirectSound }
  396. kDirectSoundSnifferSubType = $6473736E (* 'dssn' *); { Windows DirectSound sniffer }
  397. kUNIXsdevSubType = $756E3178 (* 'un1x' *); { UNIX base sdev }
  398. kUSBSubType = $75736220 (* 'usb ' *); { USB device }
  399. kBlueBoxSubType = $62736E64 (* 'bsnd' *); { Blue Box sound component }
  400. kSoundCompressor = $73636F6D (* 'scom' *);
  401. kSoundDecompressor = $73646563 (* 'sdec' *);
  402. kAudioComponentType = $6164696F (* 'adio' *); { Audio components and sub-types }
  403. kAwacsPhoneSubType = $6870686E (* 'hphn' *);
  404. kAudioVisionSpeakerSubType = $74656C63 (* 'telc' *);
  405. kAudioVisionHeadphoneSubType = $74656C68 (* 'telh' *);
  406. kPhilipsFaderSubType = $74766176 (* 'tvav' *);
  407. kSGSToneSubType = $73677330 (* 'sgs0' *);
  408. kSoundEffectsType = $736E6678 (* 'snfx' *); { sound effects type }
  409. kEqualizerSubType = $6571616C (* 'eqal' *); { frequency equalizer }
  410. kSSpLocalizationSubType = $736E6433 (* 'snd3' *);
  411. { Format Types }
  412. kSoundNotCompressed = $4E4F4E45 (* 'NONE' *); { sound is not compressed }
  413. k8BitOffsetBinaryFormat = $72617720 (* 'raw ' *); { 8-bit offset binary }
  414. k16BitBigEndianFormat = $74776F73 (* 'twos' *); { 16-bit big endian }
  415. k16BitLittleEndianFormat = $736F7774 (* 'sowt' *); { 16-bit little endian }
  416. kFloat32Format = $666C3332 (* 'fl32' *); { 32-bit floating point }
  417. kFloat64Format = $666C3634 (* 'fl64' *); { 64-bit floating point }
  418. k24BitFormat = $696E3234 (* 'in24' *); { 24-bit SInt16 }
  419. k32BitFormat = $696E3332 (* 'in32' *); { 32-bit SInt16 }
  420. k32BitLittleEndianFormat = $32336E69 (* '23ni' *); { 32-bit little endian SInt16 }
  421. kMACE3Compression = $4D414333 (* 'MAC3' *); { MACE 3:1 }
  422. kMACE6Compression = $4D414336 (* 'MAC6' *); { MACE 6:1 }
  423. kCDXA4Compression = $63647834 (* 'cdx4' *); { CD/XA 4:1 }
  424. kCDXA2Compression = $63647832 (* 'cdx2' *); { CD/XA 2:1 }
  425. kIMACompression = $696D6134 (* 'ima4' *); { IMA 4:1 }
  426. kULawCompression = $756C6177 (* 'ulaw' *); { µLaw 2:1 }
  427. kALawCompression = $616C6177 (* 'alaw' *); { aLaw 2:1 }
  428. kMicrosoftADPCMFormat = $6D730002; { Microsoft ADPCM - ACM code 2 }
  429. kDVIIntelIMAFormat = $6D730011; { DVI/Intel IMA ADPCM - ACM code 17 }
  430. kDVAudioFormat = $64766361 (* 'dvca' *); { DV Audio }
  431. kQDesignCompression = $51444D43 (* 'QDMC' *); { QDesign music }
  432. kQDesign2Compression = $51444D32 (* 'QDM2' *); { QDesign2 music }
  433. kQUALCOMMCompression = $51636C70 (* 'Qclp' *); { QUALCOMM PureVoice }
  434. kOffsetBinary = $72617720 (* 'raw ' *); { for compatibility }
  435. kTwosComplement = $74776F73 (* 'twos' *); { for compatibility }
  436. kLittleEndianFormat = $736F7774 (* 'sowt' *); { for compatibility }
  437. kMPEGLayer3Format = $6D730055; { MPEG Layer 3, CBR only (pre QT4.1) }
  438. kFullMPEGLay3Format = $2E6D7033 (* '.mp3' *); { MPEG Layer 3, CBR & VBR (QT4.1 and later) }
  439. {$ifc TARGET_RT_LITTLE_ENDIAN}
  440. k16BitNativeEndianFormat = k16BitLittleEndianFormat;
  441. k16BitNonNativeEndianFormat = k16BitBigEndianFormat;
  442. {$elsec}
  443. k16BitNativeEndianFormat = k16BitBigEndianFormat;
  444. k16BitNonNativeEndianFormat = k16BitLittleEndianFormat;
  445. {$endc} {TARGET_RT_LITTLE_ENDIAN}
  446. { Features Flags }
  447. k8BitRawIn = $01; { data description }
  448. k8BitTwosIn = $02;
  449. k16BitIn = $04;
  450. kStereoIn = $08;
  451. k8BitRawOut = $0100;
  452. k8BitTwosOut = $0200;
  453. k16BitOut = $0400;
  454. kStereoOut = $0800;
  455. kReverse = $00010000; { function description }
  456. kRateConvert = $00020000;
  457. kCreateSoundSource = $00040000;
  458. kVMAwareness = $00200000; { component will hold its memory }
  459. kHighQuality = $00400000; { performance description }
  460. kNonRealTime = $00800000;
  461. { SoundComponentPlaySourceBuffer action flags }
  462. kSourcePaused = $01;
  463. kPassThrough = $00010000;
  464. kNoSoundComponentChain = $00020000;
  465. { SoundParamBlock flags, usefull for OpenMixerSoundComponent }
  466. kNoMixing = $01; { don't mix source }
  467. kNoSampleRateConversion = $02; { don't convert sample rate (i.e. 11 kHz -> 22 kHz) }
  468. kNoSampleSizeConversion = $04; { don't convert sample size (i.e. 16 -> 8) }
  469. kNoSampleFormatConversion = $08; { don't convert sample format (i.e. 'twos' -> 'raw ') }
  470. kNoChannelConversion = $10; { don't convert stereo/mono }
  471. kNoDecompression = $20; { don't decompress (i.e. 'MAC3' -> 'raw ') }
  472. kNoVolumeConversion = $40; { don't apply volume }
  473. kNoRealtimeProcessing = $80; { won't run at interrupt time }
  474. kScheduledSource = $0100; { source is scheduled }
  475. kNonInterleavedBuffer = $0200; { buffer is not interleaved samples }
  476. kNonPagingMixer = $0400; { if VM is on, use the non-paging mixer }
  477. kSoundConverterMixer = $0800; { the mixer is to be used by the SoundConverter }
  478. kPagingMixer = $1000; { the mixer is to be used as a paging mixer when VM is on }
  479. kVMAwareMixer = $2000; { passed to the output device when the SM is going to deal with VM safety }
  480. kExtendedSoundData = $4000; { SoundComponentData record is actually an ExtendedSoundComponentData }
  481. { SoundParamBlock quality settings }
  482. kBestQuality = $01; { use interpolation in rate conversion }
  483. { useful bit masks }
  484. kInputMask = $000000FF; { masks off input bits }
  485. kOutputMask = $0000FF00; { masks off output bits }
  486. kOutputShift = 8; { amount output bits are shifted }
  487. kActionMask = $00FF0000; { masks off action bits }
  488. kSoundComponentBits = $00FFFFFF;
  489. { audio atom types }
  490. kAudioFormatAtomType = $66726D61 (* 'frma' *);
  491. kAudioEndianAtomType = $656E6461 (* 'enda' *);
  492. kAudioVBRAtomType = $76627261 (* 'vbra' *);
  493. kAudioTerminatorAtomType = 0;
  494. { siAVDisplayBehavior types }
  495. kAVDisplayHeadphoneRemove = 0; { monitor does not have a headphone attached }
  496. kAVDisplayHeadphoneInsert = 1; { monitor has a headphone attached }
  497. kAVDisplayPlainTalkRemove = 2; { monitor either sending no input through CPU input port or unable to tell if input is coming in }
  498. kAVDisplayPlainTalkInsert = 3; { monitor sending PlainTalk level microphone source input through sound input port }
  499. { Audio Component constants }
  500. { Values for whichChannel parameter }
  501. audioAllChannels = 0; { All channels (usually interpreted as both left and right) }
  502. audioLeftChannel = 1; { Left channel }
  503. audioRightChannel = 2; { Right channel }
  504. { Values for mute parameter }
  505. audioUnmuted = 0; { Device is unmuted }
  506. audioMuted = 1; { Device is muted }
  507. { Capabilities flags definitions }
  508. audioDoesMono = $00000001; { Device supports mono output }
  509. audioDoesStereo = $00000002; { Device supports stereo output }
  510. audioDoesIndependentChannels = $00000004; { Device supports independent software control of each channel }
  511. { Sound Input Qualities }
  512. siCDQuality = $63642020 (* 'cd ' *); { 44.1kHz, stereo, 16 bit }
  513. siBestQuality = $62657374 (* 'best' *); { 22kHz, mono, 8 bit }
  514. siBetterQuality = $62657472 (* 'betr' *); { 22kHz, mono, MACE 3:1 }
  515. siGoodQuality = $676F6F64 (* 'good' *); { 22kHz, mono, MACE 6:1 }
  516. siNoneQuality = $6E6F6E65 (* 'none' *); { settings don't match any quality for a get call }
  517. siDeviceIsConnected = 1; { input device is connected and ready for input }
  518. siDeviceNotConnected = 0; { input device is not connected }
  519. siDontKnowIfConnected = -1; { can't tell if input device is connected }
  520. siReadPermission = 0; { permission passed to SPBOpenDevice }
  521. siWritePermission = 1; { permission passed to SPBOpenDevice }
  522. { flags that SoundConverterFillBuffer will return }
  523. kSoundConverterDidntFillBuffer = $01; { set if the converter couldn't completely satisfy a SoundConverterFillBuffer request }
  524. kSoundConverterHasLeftOverData = $02; { set if the converter had left over data after completely satisfying a SoundConverterFillBuffer call }
  525. { flags for extendedFlags fields of ExtendedSoundComponentData, ExtendedSoundParamBlock, and ExtendedScheduledSoundHeader }
  526. kExtendedSoundSampleCountNotValid = $00000001; { set if sampleCount of SoundComponentData isn't meaningful; use buffer size instead }
  527. kExtendedSoundBufferSizeValid = $00000002; { set if bufferSize field is valid }
  528. {
  529. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  530. typedefs
  531. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  532. }
  533. type
  534. SndCommandPtr = ^SndCommand;
  535. SndCommand = packed record
  536. cmd: UInt16;
  537. param1: SInt16;
  538. param2: SInt32;
  539. end;
  540. SndChannelPtr = ^SndChannel;
  541. {$ifc TYPED_FUNCTION_POINTERS}
  542. SndCallBackProcPtr = procedure(chan: SndChannelPtr; var cmd: SndCommand);
  543. {$elsec}
  544. SndCallBackProcPtr = ProcPtr;
  545. {$endc}
  546. {$ifc OPAQUE_UPP_TYPES}
  547. SndCallBackUPP = ^SInt32; { an opaque UPP }
  548. {$elsec}
  549. SndCallBackUPP = UniversalProcPtr;
  550. {$endc}
  551. SndChannel = packed record
  552. nextChan: SndChannelPtr;
  553. firstMod: Ptr; { reserved for the Sound Manager }
  554. callBack: SndCallBackUPP;
  555. userInfo: SInt32;
  556. wait: SInt32; { The following is for internal Sound Manager use only. }
  557. cmdInProgress: SndCommand;
  558. flags: SInt16;
  559. qLength: SInt16;
  560. qHead: SInt16;
  561. qTail: SInt16;
  562. queue: array [0..127] of SndCommand;
  563. end;
  564. const
  565. uppSndCallBackProcInfo = $000003C0;
  566. {
  567. * NewSndCallBackUPP()
  568. *
  569. * Availability:
  570. * Non-Carbon CFM: available as macro/inline
  571. * CarbonLib: in CarbonLib 1.0 and later
  572. * Mac OS X: in version 10.0 and later
  573. }
  574. function NewSndCallBackUPP(userRoutine: SndCallBackProcPtr): SndCallBackUPP; external name '_NewSndCallBackUPP'; { old name was NewSndCallBackProc }
  575. {
  576. * DisposeSndCallBackUPP()
  577. *
  578. * Availability:
  579. * Non-Carbon CFM: available as macro/inline
  580. * CarbonLib: in CarbonLib 1.0 and later
  581. * Mac OS X: in version 10.0 and later
  582. }
  583. procedure DisposeSndCallBackUPP(userUPP: SndCallBackUPP); external name '_DisposeSndCallBackUPP';
  584. {
  585. * InvokeSndCallBackUPP()
  586. *
  587. * Availability:
  588. * Non-Carbon CFM: available as macro/inline
  589. * CarbonLib: in CarbonLib 1.0 and later
  590. * Mac OS X: in version 10.0 and later
  591. }
  592. procedure InvokeSndCallBackUPP(chan: SndChannelPtr; var cmd: SndCommand; userRoutine: SndCallBackUPP); external name '_InvokeSndCallBackUPP'; { old name was CallSndCallBackProc }
  593. {MACE structures}
  594. type
  595. StateBlockPtr = ^StateBlock;
  596. StateBlock = record
  597. stateVar: array [0..63] of SInt16;
  598. end;
  599. LeftOverBlockPtr = ^LeftOverBlock;
  600. LeftOverBlock = record
  601. count: UInt32;
  602. sampleArea: array [0..31] of SInt8;
  603. end;
  604. ModRefPtr = ^ModRef;
  605. ModRef = record
  606. modNumber: UInt16;
  607. modInit: SInt32;
  608. end;
  609. SndListResourcePtr = ^SndListResource;
  610. SndListResource = record
  611. format: SInt16;
  612. numModifiers: SInt16;
  613. modifierPart: array [0..0] of ModRef;
  614. numCommands: SInt16;
  615. commandPart: array [0..0] of SndCommand;
  616. dataPart: SInt8;
  617. end;
  618. SndListPtr = ^SndListResource;
  619. SndListHandle = ^SndListPtr;
  620. SndListHndl = SndListHandle;
  621. { HyperCard sound resource format }
  622. Snd2ListResourcePtr = ^Snd2ListResource;
  623. Snd2ListResource = record
  624. format: SInt16;
  625. refCount: SInt16;
  626. numCommands: SInt16;
  627. commandPart: array [0..0] of SndCommand;
  628. dataPart: SInt8;
  629. end;
  630. Snd2ListPtr = ^Snd2ListResource;
  631. Snd2ListHandle = ^Snd2ListPtr;
  632. Snd2ListHndl = Snd2ListHandle;
  633. SoundHeaderPtr = ^SoundHeader;
  634. SoundHeader = packed record
  635. samplePtr: Ptr; { if NIL then samples are in sampleArea }
  636. length: UInt32; { length of sound in bytes }
  637. sampleRate: UnsignedFixed; { sample rate for this sound }
  638. loopStart: UInt32; { start of looping portion }
  639. loopEnd: UInt32; { end of looping portion }
  640. encode: UInt8; { header encoding }
  641. baseFrequency: UInt8; { baseFrequency value }
  642. sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
  643. pad: UInt8;
  644. end;
  645. CmpSoundHeaderPtr = ^CmpSoundHeader;
  646. CmpSoundHeader = packed record
  647. samplePtr: Ptr; { if nil then samples are in sample area }
  648. numChannels: UInt32; { number of channels i.e. mono = 1 }
  649. sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
  650. loopStart: UInt32; { loopStart of sound before compression }
  651. loopEnd: UInt32; { loopEnd of sound before compression }
  652. encode: UInt8; { data structure used , stdSH, extSH, or cmpSH }
  653. baseFrequency: UInt8; { same meaning as regular SoundHeader }
  654. numFrames: UInt32; { length in frames ( packetFrames or sampleFrames ) }
  655. AIFFSampleRate: extended80; { IEEE sample rate }
  656. markerChunk: Ptr; { sync track }
  657. format: OSType; { data format type, was futureUse1 }
  658. futureUse2: UInt32; { reserved by Apple }
  659. stateVars: StateBlockPtr; { pointer to State Block }
  660. leftOverSamples: LeftOverBlockPtr; { used to save truncated samples between compression calls }
  661. compressionID: SInt16; { 0 means no compression, non zero means compressionID }
  662. packetSize: UInt16; { number of bits in compressed sample packet }
  663. snthID: UInt16; { resource ID of Sound Manager snth that contains NRT C/E }
  664. sampleSize: UInt16; { number of bits in non-compressed sample }
  665. sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
  666. pad: UInt8;
  667. end;
  668. ExtSoundHeaderPtr = ^ExtSoundHeader;
  669. ExtSoundHeader = packed record
  670. samplePtr: Ptr; { if nil then samples are in sample area }
  671. numChannels: UInt32; { number of channels, ie mono = 1 }
  672. sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
  673. loopStart: UInt32; { same meaning as regular SoundHeader }
  674. loopEnd: UInt32; { same meaning as regular SoundHeader }
  675. encode: UInt8; { data structure used , stdSH, extSH, or cmpSH }
  676. baseFrequency: UInt8; { same meaning as regular SoundHeader }
  677. numFrames: UInt32; { length in total number of frames }
  678. AIFFSampleRate: extended80; { IEEE sample rate }
  679. markerChunk: Ptr; { sync track }
  680. instrumentChunks: Ptr; { AIFF instrument chunks }
  681. AESRecording: Ptr;
  682. sampleSize: UInt16; { number of bits in sample }
  683. futureUse1: UInt16; { reserved by Apple }
  684. futureUse2: UInt32; { reserved by Apple }
  685. futureUse3: UInt32; { reserved by Apple }
  686. futureUse4: UInt32; { reserved by Apple }
  687. sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
  688. pad: UInt8;
  689. end;
  690. SoundHeaderUnionPtr = ^SoundHeaderUnion;
  691. SoundHeaderUnion = record
  692. case SInt16 of
  693. 0: (
  694. stdHeader: SoundHeader;
  695. );
  696. 1: (
  697. cmpHeader: CmpSoundHeader;
  698. );
  699. 2: (
  700. extHeader: ExtSoundHeader;
  701. );
  702. end;
  703. ConversionBlockPtr = ^ConversionBlock;
  704. ConversionBlock = record
  705. destination: SInt16;
  706. unused: SInt16;
  707. inputPtr: CmpSoundHeaderPtr;
  708. outputPtr: CmpSoundHeaderPtr;
  709. end;
  710. { ScheduledSoundHeader flags }
  711. const
  712. kScheduledSoundDoScheduled = $01;
  713. kScheduledSoundDoCallBack = $02;
  714. kScheduledSoundExtendedHdr = $04;
  715. type
  716. ScheduledSoundHeaderPtr = ^ScheduledSoundHeader;
  717. ScheduledSoundHeader = record
  718. u: SoundHeaderUnion;
  719. flags: SInt32;
  720. reserved: SInt16;
  721. callBackParam1: SInt16;
  722. callBackParam2: SInt32;
  723. startTime: TimeRecord;
  724. end;
  725. ExtendedScheduledSoundHeaderPtr = ^ExtendedScheduledSoundHeader;
  726. ExtendedScheduledSoundHeader = record
  727. u: SoundHeaderUnion;
  728. flags: SInt32;
  729. reserved: SInt16;
  730. callBackParam1: SInt16;
  731. callBackParam2: SInt32;
  732. startTime: TimeRecord;
  733. recordSize: SInt32;
  734. extendedFlags: SInt32;
  735. bufferSize: SInt32;
  736. end;
  737. SMStatusPtr = ^SMStatus;
  738. SMStatus = packed record
  739. smMaxCPULoad: SInt16;
  740. smNumChannels: SInt16;
  741. smCurCPULoad: SInt16;
  742. end;
  743. SCStatusPtr = ^SCStatus;
  744. SCStatus = record
  745. scStartTime: UnsignedFixed;
  746. scEndTime: UnsignedFixed;
  747. scCurrentTime: UnsignedFixed;
  748. scChannelBusy: boolean;
  749. scChannelDisposed: boolean;
  750. scChannelPaused: boolean;
  751. scUnused: boolean;
  752. scChannelAttributes: UInt32;
  753. scCPULoad: SInt32;
  754. end;
  755. AudioSelectionPtr = ^AudioSelection;
  756. AudioSelection = packed record
  757. unitType: SInt32;
  758. selStart: UnsignedFixed;
  759. selEnd: UnsignedFixed;
  760. end;
  761. {$ifc CALL_NOT_IN_CARBON}
  762. SndDoubleBufferPtr = ^SndDoubleBuffer;
  763. SndDoubleBuffer = packed record
  764. dbNumFrames: SInt32;
  765. dbFlags: SInt32;
  766. dbUserInfo: array [0..1] of SInt32;
  767. dbSoundData: array [0..0] of SInt8;
  768. end;
  769. {$ifc TYPED_FUNCTION_POINTERS}
  770. SndDoubleBackProcPtr = procedure(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr);
  771. {$elsec}
  772. SndDoubleBackProcPtr = ProcPtr;
  773. {$endc}
  774. {$ifc OPAQUE_UPP_TYPES}
  775. SndDoubleBackUPP = ^SInt32; { an opaque UPP }
  776. {$elsec}
  777. SndDoubleBackUPP = UniversalProcPtr;
  778. {$endc}
  779. const
  780. uppSndDoubleBackProcInfo = $000003C0;
  781. {$ifc CALL_NOT_IN_CARBON}
  782. {
  783. * NewSndDoubleBackUPP()
  784. *
  785. * Availability:
  786. * Non-Carbon CFM: available as macro/inline
  787. * CarbonLib: not available
  788. * Mac OS X: not available
  789. }
  790. function NewSndDoubleBackUPP(userRoutine: SndDoubleBackProcPtr): SndDoubleBackUPP; external name '_NewSndDoubleBackUPP'; { old name was NewSndDoubleBackProc }
  791. {
  792. * DisposeSndDoubleBackUPP()
  793. *
  794. * Availability:
  795. * Non-Carbon CFM: available as macro/inline
  796. * CarbonLib: not available
  797. * Mac OS X: not available
  798. }
  799. procedure DisposeSndDoubleBackUPP(userUPP: SndDoubleBackUPP); external name '_DisposeSndDoubleBackUPP';
  800. {
  801. * InvokeSndDoubleBackUPP()
  802. *
  803. * Availability:
  804. * Non-Carbon CFM: available as macro/inline
  805. * CarbonLib: not available
  806. * Mac OS X: not available
  807. }
  808. procedure InvokeSndDoubleBackUPP(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr; userRoutine: SndDoubleBackUPP); external name '_InvokeSndDoubleBackUPP'; { old name was CallSndDoubleBackProc }
  809. {$endc} {CALL_NOT_IN_CARBON}
  810. type
  811. SndDoubleBufferHeaderPtr = ^SndDoubleBufferHeader;
  812. SndDoubleBufferHeader = packed record
  813. dbhNumChannels: SInt16;
  814. dbhSampleSize: SInt16;
  815. dbhCompressionID: SInt16;
  816. dbhPacketSize: SInt16;
  817. dbhSampleRate: UnsignedFixed;
  818. dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
  819. dbhDoubleBack: SndDoubleBackUPP;
  820. end;
  821. SndDoubleBufferHeader2Ptr = ^SndDoubleBufferHeader2;
  822. SndDoubleBufferHeader2 = packed record
  823. dbhNumChannels: SInt16;
  824. dbhSampleSize: SInt16;
  825. dbhCompressionID: SInt16;
  826. dbhPacketSize: SInt16;
  827. dbhSampleRate: UnsignedFixed;
  828. dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
  829. dbhDoubleBack: SndDoubleBackUPP;
  830. dbhFormat: OSType;
  831. end;
  832. {$endc} {CALL_NOT_IN_CARBON}
  833. SoundInfoListPtr = ^SoundInfoList;
  834. SoundInfoList = packed record
  835. count: SInt16;
  836. infoHandle: Handle;
  837. end;
  838. SoundComponentDataPtr = ^SoundComponentData;
  839. SoundComponentData = record
  840. flags: SInt32;
  841. format: OSType;
  842. numChannels: SInt16;
  843. sampleSize: SInt16;
  844. sampleRate: UnsignedFixed;
  845. sampleCount: SInt32;
  846. buffer: Ptr;
  847. reserved: SInt32;
  848. end;
  849. ExtendedSoundComponentDataPtr = ^ExtendedSoundComponentData;
  850. ExtendedSoundComponentData = record
  851. desc: SoundComponentData; { description of sound buffer }
  852. recordSize: SInt32; { size of this record in bytes }
  853. extendedFlags: SInt32; { flags for extended record }
  854. bufferSize: SInt32; { size of buffer in bytes }
  855. end;
  856. SoundParamBlockPtr = ^SoundParamBlock;
  857. {$ifc TYPED_FUNCTION_POINTERS}
  858. SoundParamProcPtr = function(var pb: SoundParamBlockPtr): boolean;
  859. {$elsec}
  860. SoundParamProcPtr = ProcPtr;
  861. {$endc}
  862. {$ifc OPAQUE_UPP_TYPES}
  863. SoundParamUPP = ^SInt32; { an opaque UPP }
  864. {$elsec}
  865. SoundParamUPP = UniversalProcPtr;
  866. {$endc}
  867. SoundParamBlock = record
  868. recordSize: SInt32; { size of this record in bytes }
  869. desc: SoundComponentData; { description of sound buffer }
  870. rateMultiplier: UnsignedFixed; { rate multiplier to apply to sound }
  871. leftVolume: SInt16; { volumes to apply to sound }
  872. rightVolume: SInt16;
  873. quality: SInt32; { quality to apply to sound }
  874. filter: ComponentInstance; { filter to apply to sound }
  875. moreRtn: SoundParamUPP; { routine to call to get more data }
  876. completionRtn: SoundParamUPP; { routine to call when buffer is complete }
  877. refCon: SInt32; { user refcon }
  878. result: SInt16; { result }
  879. end;
  880. ExtendedSoundParamBlockPtr = ^ExtendedSoundParamBlock;
  881. ExtendedSoundParamBlock = record
  882. pb: SoundParamBlock; { classic SoundParamBlock except recordSize == sizeof(ExtendedSoundParamBlock) }
  883. reserved: SInt16;
  884. extendedFlags: SInt32; { flags }
  885. bufferSize: SInt32; { size of buffer in bytes }
  886. end;
  887. CompressionInfoPtr = ^CompressionInfo;
  888. CompressionInfo = record
  889. recordSize: SInt32;
  890. format: OSType;
  891. compressionID: SInt16;
  892. samplesPerPacket: UInt16;
  893. bytesPerPacket: UInt16;
  894. bytesPerFrame: UInt16;
  895. bytesPerSample: UInt16;
  896. futureUse1: UInt16;
  897. end;
  898. CompressionInfoHandle = ^CompressionInfoPtr;
  899. { variables for floating point conversion }
  900. SoundSlopeAndInterceptRecordPtr = ^SoundSlopeAndInterceptRecord;
  901. SoundSlopeAndInterceptRecord = record
  902. slope: Float64;
  903. intercept: Float64;
  904. minClip: Float64;
  905. maxClip: Float64;
  906. end;
  907. SoundSlopeAndInterceptPtr = ^SoundSlopeAndInterceptRecord;
  908. { private thing to use as a reference to a Sound Converter }
  909. SoundConverter = ^SInt32; { an opaque 32-bit type }
  910. SoundConverterPtr = ^SoundConverter; { when a var xx:SoundConverter parameter can be nil, it is changed to xx: SoundConverterPtr }
  911. { callback routine to provide data to the Sound Converter }
  912. {$ifc TYPED_FUNCTION_POINTERS}
  913. SoundConverterFillBufferDataProcPtr = function(var data: SoundComponentDataPtr; refCon: UnivPtr): boolean;
  914. {$elsec}
  915. SoundConverterFillBufferDataProcPtr = ProcPtr;
  916. {$endc}
  917. {$ifc OPAQUE_UPP_TYPES}
  918. SoundConverterFillBufferDataUPP = ^SInt32; { an opaque UPP }
  919. {$elsec}
  920. SoundConverterFillBufferDataUPP = UniversalProcPtr;
  921. {$endc}
  922. { private thing to use as a reference to a Sound Source }
  923. SoundSource = ^SInt32; { an opaque 32-bit type }
  924. SoundSourcePtr = ^SoundSource; { when a var xx:SoundSource parameter can be nil, it is changed to xx: SoundSourcePtr }
  925. SoundComponentLinkPtr = ^SoundComponentLink;
  926. SoundComponentLink = record
  927. description: ComponentDescription; { Describes the sound component }
  928. mixerID: SoundSource; { Reserved by Apple }
  929. linkID: SoundSourcePtr; { Reserved by Apple }
  930. end;
  931. AudioInfoPtr = ^AudioInfo;
  932. AudioInfo = record
  933. capabilitiesFlags: SInt32; { Describes device capabilities }
  934. reserved: SInt32; { Reserved by Apple }
  935. numVolumeSteps: UInt16; { Number of significant increments between min and max volume }
  936. end;
  937. AudioFormatAtomPtr = ^AudioFormatAtom;
  938. AudioFormatAtom = record
  939. size: SInt32; { = sizeof(AudioFormatAtom) }
  940. atomType: OSType; { = kAudioFormatAtomType }
  941. format: OSType;
  942. end;
  943. AudioEndianAtomPtr = ^AudioEndianAtom;
  944. AudioEndianAtom = record
  945. size: SInt32; { = sizeof(AudioEndianAtom) }
  946. atomType: OSType; { = kAudioEndianAtomType }
  947. littleEndian: SInt16;
  948. end;
  949. AudioTerminatorAtomPtr = ^AudioTerminatorAtom;
  950. AudioTerminatorAtom = record
  951. size: SInt32; { = sizeof(AudioTerminatorAtom) }
  952. atomType: OSType; { = kAudioTerminatorAtomType }
  953. end;
  954. LevelMeterInfoPtr = ^LevelMeterInfo;
  955. LevelMeterInfo = record
  956. numChannels: SInt16; { mono or stereo source }
  957. leftMeter: SInt8; { 0-255 range }
  958. rightMeter: SInt8; { 0-255 range }
  959. end;
  960. EQSpectrumBandsRecordPtr = ^EQSpectrumBandsRecord;
  961. EQSpectrumBandsRecord = record
  962. count: SInt16;
  963. frequency: UnsignedFixedPtr; { pointer to array of frequencies }
  964. end;
  965. { Sound Input Structures }
  966. SPBPtr = ^SPB;
  967. { user procedures called by sound input routines }
  968. {$ifc TYPED_FUNCTION_POINTERS}
  969. SIInterruptProcPtr = procedure(inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SInt32);
  970. {$elsec}
  971. SIInterruptProcPtr = Register68kProcPtr;
  972. {$endc}
  973. {$ifc TYPED_FUNCTION_POINTERS}
  974. SICompletionProcPtr = procedure(inParamPtr: SPBPtr);
  975. {$elsec}
  976. SICompletionProcPtr = ProcPtr;
  977. {$endc}
  978. {$ifc OPAQUE_UPP_TYPES}
  979. SIInterruptUPP = ^SInt32; { an opaque UPP }
  980. {$elsec}
  981. SIInterruptUPP = UniversalProcPtr;
  982. {$endc}
  983. {$ifc OPAQUE_UPP_TYPES}
  984. SICompletionUPP = ^SInt32; { an opaque UPP }
  985. {$elsec}
  986. SICompletionUPP = UniversalProcPtr;
  987. {$endc}
  988. { Sound Input Parameter Block }
  989. SPB = record
  990. inRefNum: SInt32; { reference number of sound input device }
  991. count: UInt32; { number of bytes to record }
  992. milliseconds: UInt32; { number of milliseconds to record }
  993. bufferLength: UInt32; { length of buffer in bytes }
  994. bufferPtr: Ptr; { buffer to store sound data in }
  995. completionRoutine: SICompletionUPP; { completion routine }
  996. interruptRoutine: SIInterruptUPP; { interrupt routine }
  997. userLong: SInt32; { user-defined field }
  998. error: OSErr; { error }
  999. unused1: SInt32; { reserved - must be zero }
  1000. end;
  1001. const
  1002. uppSoundParamProcInfo = $000000D0;
  1003. uppSoundConverterFillBufferDataProcInfo = $000003D0;
  1004. uppSIInterruptProcInfo = $1C579802;
  1005. uppSICompletionProcInfo = $000000C0;
  1006. {
  1007. * NewSoundParamUPP()
  1008. *
  1009. * Availability:
  1010. * Non-Carbon CFM: available as macro/inline
  1011. * CarbonLib: in CarbonLib 1.0 and later
  1012. * Mac OS X: in version 10.0 and later
  1013. }
  1014. function NewSoundParamUPP(userRoutine: SoundParamProcPtr): SoundParamUPP; external name '_NewSoundParamUPP'; { old name was NewSoundParamProc }
  1015. {
  1016. * NewSoundConverterFillBufferDataUPP()
  1017. *
  1018. * Availability:
  1019. * Non-Carbon CFM: available as macro/inline
  1020. * CarbonLib: in CarbonLib 1.1 and later
  1021. * Mac OS X: in version 10.0 and later
  1022. }
  1023. function NewSoundConverterFillBufferDataUPP(userRoutine: SoundConverterFillBufferDataProcPtr): SoundConverterFillBufferDataUPP; external name '_NewSoundConverterFillBufferDataUPP'; { old name was NewSoundConverterFillBufferDataProc }
  1024. {
  1025. * NewSIInterruptUPP()
  1026. *
  1027. * Availability:
  1028. * Non-Carbon CFM: available as macro/inline
  1029. * CarbonLib: in CarbonLib 1.0 and later
  1030. * Mac OS X: in version 10.0 and later
  1031. }
  1032. function NewSIInterruptUPP(userRoutine: SIInterruptProcPtr): SIInterruptUPP; external name '_NewSIInterruptUPP'; { old name was NewSIInterruptProc }
  1033. {
  1034. * NewSICompletionUPP()
  1035. *
  1036. * Availability:
  1037. * Non-Carbon CFM: available as macro/inline
  1038. * CarbonLib: in CarbonLib 1.0 and later
  1039. * Mac OS X: in version 10.0 and later
  1040. }
  1041. function NewSICompletionUPP(userRoutine: SICompletionProcPtr): SICompletionUPP; external name '_NewSICompletionUPP'; { old name was NewSICompletionProc }
  1042. {
  1043. * DisposeSoundParamUPP()
  1044. *
  1045. * Availability:
  1046. * Non-Carbon CFM: available as macro/inline
  1047. * CarbonLib: in CarbonLib 1.0 and later
  1048. * Mac OS X: in version 10.0 and later
  1049. }
  1050. procedure DisposeSoundParamUPP(userUPP: SoundParamUPP); external name '_DisposeSoundParamUPP';
  1051. {
  1052. * DisposeSoundConverterFillBufferDataUPP()
  1053. *
  1054. * Availability:
  1055. * Non-Carbon CFM: available as macro/inline
  1056. * CarbonLib: in CarbonLib 1.1 and later
  1057. * Mac OS X: in version 10.0 and later
  1058. }
  1059. procedure DisposeSoundConverterFillBufferDataUPP(userUPP: SoundConverterFillBufferDataUPP); external name '_DisposeSoundConverterFillBufferDataUPP';
  1060. {
  1061. * DisposeSIInterruptUPP()
  1062. *
  1063. * Availability:
  1064. * Non-Carbon CFM: available as macro/inline
  1065. * CarbonLib: in CarbonLib 1.0 and later
  1066. * Mac OS X: in version 10.0 and later
  1067. }
  1068. procedure DisposeSIInterruptUPP(userUPP: SIInterruptUPP); external name '_DisposeSIInterruptUPP';
  1069. {
  1070. * DisposeSICompletionUPP()
  1071. *
  1072. * Availability:
  1073. * Non-Carbon CFM: available as macro/inline
  1074. * CarbonLib: in CarbonLib 1.0 and later
  1075. * Mac OS X: in version 10.0 and later
  1076. }
  1077. procedure DisposeSICompletionUPP(userUPP: SICompletionUPP); external name '_DisposeSICompletionUPP';
  1078. {
  1079. * InvokeSoundParamUPP()
  1080. *
  1081. * Availability:
  1082. * Non-Carbon CFM: available as macro/inline
  1083. * CarbonLib: in CarbonLib 1.0 and later
  1084. * Mac OS X: in version 10.0 and later
  1085. }
  1086. function InvokeSoundParamUPP(var pb: SoundParamBlockPtr; userRoutine: SoundParamUPP): boolean; external name '_InvokeSoundParamUPP'; { old name was CallSoundParamProc }
  1087. {
  1088. * InvokeSoundConverterFillBufferDataUPP()
  1089. *
  1090. * Availability:
  1091. * Non-Carbon CFM: available as macro/inline
  1092. * CarbonLib: in CarbonLib 1.1 and later
  1093. * Mac OS X: in version 10.0 and later
  1094. }
  1095. function InvokeSoundConverterFillBufferDataUPP(var data: SoundComponentDataPtr; refCon: UnivPtr; userRoutine: SoundConverterFillBufferDataUPP): boolean; external name '_InvokeSoundConverterFillBufferDataUPP'; { old name was CallSoundConverterFillBufferDataProc }
  1096. {
  1097. * InvokeSIInterruptUPP()
  1098. *
  1099. * Availability:
  1100. * Non-Carbon CFM: available as macro/inline
  1101. * CarbonLib: in CarbonLib 1.0 and later
  1102. * Mac OS X: in version 10.0 and later
  1103. }
  1104. procedure InvokeSIInterruptUPP(inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SInt32; userRoutine: SIInterruptUPP); external name '_InvokeSIInterruptUPP'; { old name was CallSIInterruptProc }
  1105. {
  1106. * InvokeSICompletionUPP()
  1107. *
  1108. * Availability:
  1109. * Non-Carbon CFM: available as macro/inline
  1110. * CarbonLib: in CarbonLib 1.0 and later
  1111. * Mac OS X: in version 10.0 and later
  1112. }
  1113. procedure InvokeSICompletionUPP(inParamPtr: SPBPtr; userRoutine: SICompletionUPP); external name '_InvokeSICompletionUPP'; { old name was CallSICompletionProc }
  1114. type
  1115. {$ifc TYPED_FUNCTION_POINTERS}
  1116. FilePlayCompletionProcPtr = procedure(chan: SndChannelPtr);
  1117. {$elsec}
  1118. FilePlayCompletionProcPtr = ProcPtr;
  1119. {$endc}
  1120. {$ifc OPAQUE_UPP_TYPES}
  1121. FilePlayCompletionUPP = ^SInt32; { an opaque UPP }
  1122. {$elsec}
  1123. FilePlayCompletionUPP = UniversalProcPtr;
  1124. {$endc}
  1125. const
  1126. uppFilePlayCompletionProcInfo = $000000C0;
  1127. {$ifc CALL_NOT_IN_CARBON}
  1128. {
  1129. * NewFilePlayCompletionUPP()
  1130. *
  1131. * Availability:
  1132. * Non-Carbon CFM: available as macro/inline
  1133. * CarbonLib: not available
  1134. * Mac OS X: not available
  1135. }
  1136. function NewFilePlayCompletionUPP(userRoutine: FilePlayCompletionProcPtr): FilePlayCompletionUPP; external name '_NewFilePlayCompletionUPP'; { old name was NewFilePlayCompletionProc }
  1137. {
  1138. * DisposeFilePlayCompletionUPP()
  1139. *
  1140. * Availability:
  1141. * Non-Carbon CFM: available as macro/inline
  1142. * CarbonLib: not available
  1143. * Mac OS X: not available
  1144. }
  1145. procedure DisposeFilePlayCompletionUPP(userUPP: FilePlayCompletionUPP); external name '_DisposeFilePlayCompletionUPP';
  1146. {
  1147. * InvokeFilePlayCompletionUPP()
  1148. *
  1149. * Availability:
  1150. * Non-Carbon CFM: available as macro/inline
  1151. * CarbonLib: not available
  1152. * Mac OS X: not available
  1153. }
  1154. procedure InvokeFilePlayCompletionUPP(chan: SndChannelPtr; userRoutine: FilePlayCompletionUPP); external name '_InvokeFilePlayCompletionUPP'; { old name was CallFilePlayCompletionProc }
  1155. {$endc} {CALL_NOT_IN_CARBON}
  1156. {
  1157. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1158. prototypes
  1159. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1160. }
  1161. { Sound Manager routines }
  1162. {
  1163. * SysBeep()
  1164. *
  1165. * Availability:
  1166. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1167. * CarbonLib: in CarbonLib 1.0 and later
  1168. * Mac OS X: in version 10.0 and later
  1169. }
  1170. procedure SysBeep(duration: SInt16); external name '_SysBeep';
  1171. {
  1172. * SndDoCommand()
  1173. *
  1174. * Availability:
  1175. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1176. * CarbonLib: in CarbonLib 1.0 and later
  1177. * Mac OS X: in version 10.0 and later
  1178. }
  1179. function SndDoCommand(chan: SndChannelPtr; const (*var*) cmd: SndCommand; noWait: boolean): OSErr; external name '_SndDoCommand';
  1180. {
  1181. * SndDoImmediate()
  1182. *
  1183. * Availability:
  1184. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1185. * CarbonLib: in CarbonLib 1.0 and later
  1186. * Mac OS X: in version 10.0 and later
  1187. }
  1188. function SndDoImmediate(chan: SndChannelPtr; const (*var*) cmd: SndCommand): OSErr; external name '_SndDoImmediate';
  1189. {
  1190. * SndNewChannel()
  1191. *
  1192. * Availability:
  1193. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1194. * CarbonLib: in CarbonLib 1.0 and later
  1195. * Mac OS X: in version 10.0 and later
  1196. }
  1197. function SndNewChannel(var chan: SndChannelPtr; synth: SInt16; init: SInt32; userRoutine: SndCallBackUPP): OSErr; external name '_SndNewChannel';
  1198. {
  1199. * SndDisposeChannel()
  1200. *
  1201. * Availability:
  1202. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1203. * CarbonLib: in CarbonLib 1.0 and later
  1204. * Mac OS X: in version 10.0 and later
  1205. }
  1206. function SndDisposeChannel(chan: SndChannelPtr; quietNow: boolean): OSErr; external name '_SndDisposeChannel';
  1207. {
  1208. * SndPlay()
  1209. *
  1210. * Availability:
  1211. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1212. * CarbonLib: in CarbonLib 1.0 and later
  1213. * Mac OS X: in version 10.0 and later
  1214. }
  1215. function SndPlay(chan: SndChannelPtr; sndHandle: SndListHandle; async: boolean): OSErr; external name '_SndPlay';
  1216. {$ifc OLDROUTINENAMES}
  1217. {$ifc CALL_NOT_IN_CARBON}
  1218. {
  1219. * SndAddModifier()
  1220. *
  1221. * Availability:
  1222. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1223. * CarbonLib: not available
  1224. * Mac OS X: not available
  1225. }
  1226. function SndAddModifier(chan: SndChannelPtr; modifier: Ptr; id: SInt16; init: SInt32): OSErr; external name '_SndAddModifier';
  1227. {$endc} {CALL_NOT_IN_CARBON}
  1228. {$endc} {OLDROUTINENAMES}
  1229. {$ifc CALL_NOT_IN_CARBON}
  1230. {
  1231. * SndControl()
  1232. *
  1233. * Availability:
  1234. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1235. * CarbonLib: not available
  1236. * Mac OS X: not available
  1237. }
  1238. function SndControl(id: SInt16; var cmd: SndCommand): OSErr; external name '_SndControl';
  1239. { Sound Manager 2.0 and later, uses _SoundDispatch }
  1240. {$endc} {CALL_NOT_IN_CARBON}
  1241. {
  1242. * SndSoundManagerVersion()
  1243. *
  1244. * Availability:
  1245. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1246. * CarbonLib: in CarbonLib 1.0 and later
  1247. * Mac OS X: in version 10.0 and later
  1248. }
  1249. function SndSoundManagerVersion: NumVersion; external name '_SndSoundManagerVersion';
  1250. {$ifc CALL_NOT_IN_CARBON}
  1251. {
  1252. * SndStartFilePlay()
  1253. *
  1254. * Availability:
  1255. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1256. * CarbonLib: not available
  1257. * Mac OS X: not available
  1258. }
  1259. function SndStartFilePlay(chan: SndChannelPtr; fRefNum: SInt16; resNum: SInt16; bufferSize: SInt32; theBuffer: UnivPtr; theSelection: AudioSelectionPtr; theCompletion: FilePlayCompletionUPP; async: boolean): OSErr; external name '_SndStartFilePlay';
  1260. {
  1261. * SndPauseFilePlay()
  1262. *
  1263. * Availability:
  1264. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1265. * CarbonLib: not available
  1266. * Mac OS X: not available
  1267. }
  1268. function SndPauseFilePlay(chan: SndChannelPtr): OSErr; external name '_SndPauseFilePlay';
  1269. {
  1270. * SndStopFilePlay()
  1271. *
  1272. * Availability:
  1273. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1274. * CarbonLib: not available
  1275. * Mac OS X: not available
  1276. }
  1277. function SndStopFilePlay(chan: SndChannelPtr; quietNow: boolean): OSErr; external name '_SndStopFilePlay';
  1278. {$endc} {CALL_NOT_IN_CARBON}
  1279. {
  1280. * SndChannelStatus()
  1281. *
  1282. * Availability:
  1283. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1284. * CarbonLib: in CarbonLib 1.0 and later
  1285. * Mac OS X: in version 10.0 and later
  1286. }
  1287. function SndChannelStatus(chan: SndChannelPtr; theLength: SInt16; theStatus: SCStatusPtr): OSErr; external name '_SndChannelStatus';
  1288. {
  1289. * SndManagerStatus()
  1290. *
  1291. * Availability:
  1292. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1293. * CarbonLib: in CarbonLib 1.0 and later
  1294. * Mac OS X: in version 10.0 and later
  1295. }
  1296. function SndManagerStatus(theLength: SInt16; theStatus: SMStatusPtr): OSErr; external name '_SndManagerStatus';
  1297. {
  1298. * SndGetSysBeepState()
  1299. *
  1300. * Availability:
  1301. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1302. * CarbonLib: in CarbonLib 1.0 and later
  1303. * Mac OS X: in version 10.0 and later
  1304. }
  1305. procedure SndGetSysBeepState(var sysBeepState: SInt16); external name '_SndGetSysBeepState';
  1306. {
  1307. * SndSetSysBeepState()
  1308. *
  1309. * Availability:
  1310. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1311. * CarbonLib: in CarbonLib 1.0 and later
  1312. * Mac OS X: in version 10.0 and later
  1313. }
  1314. function SndSetSysBeepState(sysBeepState: SInt16): OSErr; external name '_SndSetSysBeepState';
  1315. {$ifc CALL_NOT_IN_CARBON}
  1316. {
  1317. * SndPlayDoubleBuffer()
  1318. *
  1319. * Availability:
  1320. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1321. * CarbonLib: not available
  1322. * Mac OS X: not available
  1323. }
  1324. function SndPlayDoubleBuffer(chan: SndChannelPtr; theParams: SndDoubleBufferHeaderPtr): OSErr; external name '_SndPlayDoubleBuffer';
  1325. { MACE compression routines, uses _SoundDispatch }
  1326. {
  1327. * MACEVersion()
  1328. *
  1329. * Availability:
  1330. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1331. * CarbonLib: not available
  1332. * Mac OS X: not available
  1333. }
  1334. function MACEVersion: NumVersion; external name '_MACEVersion';
  1335. {
  1336. * Comp3to1()
  1337. *
  1338. * Availability:
  1339. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1340. * CarbonLib: not available
  1341. * Mac OS X: not available
  1342. }
  1343. procedure Comp3to1(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Comp3to1';
  1344. {
  1345. * Exp1to3()
  1346. *
  1347. * Availability:
  1348. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1349. * CarbonLib: not available
  1350. * Mac OS X: not available
  1351. }
  1352. procedure Exp1to3(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Exp1to3';
  1353. {
  1354. * Comp6to1()
  1355. *
  1356. * Availability:
  1357. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1358. * CarbonLib: not available
  1359. * Mac OS X: not available
  1360. }
  1361. procedure Comp6to1(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Comp6to1';
  1362. {
  1363. * Exp1to6()
  1364. *
  1365. * Availability:
  1366. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1367. * CarbonLib: not available
  1368. * Mac OS X: not available
  1369. }
  1370. procedure Exp1to6(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Exp1to6';
  1371. { Sound Manager 3.0 and later calls, uses _SoundDispatch }
  1372. {$endc} {CALL_NOT_IN_CARBON}
  1373. {
  1374. * GetSysBeepVolume()
  1375. *
  1376. * Availability:
  1377. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1378. * CarbonLib: in CarbonLib 1.0 and later
  1379. * Mac OS X: in version 10.0 and later
  1380. }
  1381. function GetSysBeepVolume(var level: SInt32): OSErr; external name '_GetSysBeepVolume';
  1382. {
  1383. * SetSysBeepVolume()
  1384. *
  1385. * Availability:
  1386. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1387. * CarbonLib: in CarbonLib 1.0 and later
  1388. * Mac OS X: in version 10.0 and later
  1389. }
  1390. function SetSysBeepVolume(level: SInt32): OSErr; external name '_SetSysBeepVolume';
  1391. {
  1392. * GetDefaultOutputVolume()
  1393. *
  1394. * Availability:
  1395. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1396. * CarbonLib: in CarbonLib 1.0 and later
  1397. * Mac OS X: in version 10.0 and later
  1398. }
  1399. function GetDefaultOutputVolume(var level: SInt32): OSErr; external name '_GetDefaultOutputVolume';
  1400. {
  1401. * SetDefaultOutputVolume()
  1402. *
  1403. * Availability:
  1404. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1405. * CarbonLib: in CarbonLib 1.0 and later
  1406. * Mac OS X: in version 10.0 and later
  1407. }
  1408. function SetDefaultOutputVolume(level: SInt32): OSErr; external name '_SetDefaultOutputVolume';
  1409. {
  1410. * GetSoundHeaderOffset()
  1411. *
  1412. * Availability:
  1413. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1414. * CarbonLib: in CarbonLib 1.0 and later
  1415. * Mac OS X: in version 10.0 and later
  1416. }
  1417. function GetSoundHeaderOffset(sndHandle: SndListHandle; var offset: SInt32): OSErr; external name '_GetSoundHeaderOffset';
  1418. {
  1419. * UnsignedFixedMulDiv()
  1420. *
  1421. * Availability:
  1422. * Non-Carbon CFM: in SoundLib 3.0 and later
  1423. * CarbonLib: in CarbonLib 1.0 and later
  1424. * Mac OS X: not available
  1425. }
  1426. function UnsignedFixedMulDiv(value: UnsignedFixed; multiplier: UnsignedFixed; divisor: UnsignedFixed): UnsignedFixed; external name '_UnsignedFixedMulDiv';
  1427. {
  1428. * GetCompressionInfo()
  1429. *
  1430. * Availability:
  1431. * Non-Carbon CFM: in SoundLib 3.0 and later
  1432. * CarbonLib: in CarbonLib 1.0 and later
  1433. * Mac OS X: in version 10.0 and later
  1434. }
  1435. function GetCompressionInfo(compressionID: SInt16; format: OSType; numChannels: SInt16; sampleSize: SInt16; cp: CompressionInfoPtr): OSErr; external name '_GetCompressionInfo';
  1436. {
  1437. * SetSoundPreference()
  1438. *
  1439. * Availability:
  1440. * Non-Carbon CFM: in SoundLib 3.0 and later
  1441. * CarbonLib: in CarbonLib 1.0 and later
  1442. * Mac OS X: in version 10.0 and later
  1443. }
  1444. function SetSoundPreference(theType: OSType; var name: Str255; settings: Handle): OSErr; external name '_SetSoundPreference';
  1445. {
  1446. * GetSoundPreference()
  1447. *
  1448. * Availability:
  1449. * Non-Carbon CFM: in SoundLib 3.0 and later
  1450. * CarbonLib: in CarbonLib 1.0 and later
  1451. * Mac OS X: in version 10.0 and later
  1452. }
  1453. function GetSoundPreference(theType: OSType; var name: Str255; settings: Handle): OSErr; external name '_GetSoundPreference';
  1454. {
  1455. * OpenMixerSoundComponent()
  1456. *
  1457. * Availability:
  1458. * Non-Carbon CFM: in SoundLib 3.0 and later
  1459. * CarbonLib: in CarbonLib 1.0 and later
  1460. * Mac OS X: in version 10.0 and later
  1461. }
  1462. function OpenMixerSoundComponent(outputDescription: SoundComponentDataPtr; outputFlags: SInt32; var mixerComponent: ComponentInstance): OSErr; external name '_OpenMixerSoundComponent';
  1463. {
  1464. * CloseMixerSoundComponent()
  1465. *
  1466. * Availability:
  1467. * Non-Carbon CFM: in SoundLib 3.0 and later
  1468. * CarbonLib: in CarbonLib 1.0 and later
  1469. * Mac OS X: in version 10.0 and later
  1470. }
  1471. function CloseMixerSoundComponent(ci: ComponentInstance): OSErr; external name '_CloseMixerSoundComponent';
  1472. { Sound Manager 3.1 and later calls, uses _SoundDispatch }
  1473. {
  1474. * SndGetInfo()
  1475. *
  1476. * Availability:
  1477. * Non-Carbon CFM: in SoundLib 3.1 and later
  1478. * CarbonLib: in CarbonLib 1.0 and later
  1479. * Mac OS X: in version 10.0 and later
  1480. }
  1481. function SndGetInfo(chan: SndChannelPtr; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SndGetInfo';
  1482. {
  1483. * SndSetInfo()
  1484. *
  1485. * Availability:
  1486. * Non-Carbon CFM: in SoundLib 3.1 and later
  1487. * CarbonLib: in CarbonLib 1.0 and later
  1488. * Mac OS X: in version 10.0 and later
  1489. }
  1490. function SndSetInfo(chan: SndChannelPtr; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SndSetInfo';
  1491. {
  1492. * GetSoundOutputInfo()
  1493. *
  1494. * Availability:
  1495. * Non-Carbon CFM: in SoundLib 3.1 and later
  1496. * CarbonLib: in CarbonLib 1.0 and later
  1497. * Mac OS X: in version 10.0 and later
  1498. }
  1499. function GetSoundOutputInfo(outputDevice: Component; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_GetSoundOutputInfo';
  1500. {
  1501. * SetSoundOutputInfo()
  1502. *
  1503. * Availability:
  1504. * Non-Carbon CFM: in SoundLib 3.1 and later
  1505. * CarbonLib: in CarbonLib 1.0 and later
  1506. * Mac OS X: in version 10.0 and later
  1507. }
  1508. function SetSoundOutputInfo(outputDevice: Component; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SetSoundOutputInfo';
  1509. { Sound Manager 3.2 and later calls, uses _SoundDispatch }
  1510. {
  1511. * GetCompressionName()
  1512. *
  1513. * Availability:
  1514. * Non-Carbon CFM: in SoundLib 3.2 and later
  1515. * CarbonLib: in CarbonLib 1.0 and later
  1516. * Mac OS X: in version 10.0 and later
  1517. }
  1518. function GetCompressionName(compressionType: OSType; var compressionName: Str255): OSErr; external name '_GetCompressionName';
  1519. {
  1520. * SoundConverterOpen()
  1521. *
  1522. * Availability:
  1523. * Non-Carbon CFM: in SoundLib 3.2 and later
  1524. * CarbonLib: in CarbonLib 1.0 and later
  1525. * Mac OS X: in version 10.0 and later
  1526. }
  1527. function SoundConverterOpen(const (*var*) inputFormat: SoundComponentData; const (*var*) outputFormat: SoundComponentData; var sc: SoundConverter): OSErr; external name '_SoundConverterOpen';
  1528. {
  1529. * SoundConverterClose()
  1530. *
  1531. * Availability:
  1532. * Non-Carbon CFM: in SoundLib 3.2 and later
  1533. * CarbonLib: in CarbonLib 1.0 and later
  1534. * Mac OS X: in version 10.0 and later
  1535. }
  1536. function SoundConverterClose(sc: SoundConverter): OSErr; external name '_SoundConverterClose';
  1537. {
  1538. * SoundConverterGetBufferSizes()
  1539. *
  1540. * Availability:
  1541. * Non-Carbon CFM: in SoundLib 3.2 and later
  1542. * CarbonLib: in CarbonLib 1.0 and later
  1543. * Mac OS X: in version 10.0 and later
  1544. }
  1545. function SoundConverterGetBufferSizes(sc: SoundConverter; inputBytesTarget: UInt32; var inputFrames: UInt32; var inputBytes: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterGetBufferSizes';
  1546. {
  1547. * SoundConverterBeginConversion()
  1548. *
  1549. * Availability:
  1550. * Non-Carbon CFM: in SoundLib 3.2 and later
  1551. * CarbonLib: in CarbonLib 1.0 and later
  1552. * Mac OS X: in version 10.0 and later
  1553. }
  1554. function SoundConverterBeginConversion(sc: SoundConverter): OSErr; external name '_SoundConverterBeginConversion';
  1555. {
  1556. * SoundConverterConvertBuffer()
  1557. *
  1558. * Availability:
  1559. * Non-Carbon CFM: in SoundLib 3.2 and later
  1560. * CarbonLib: in CarbonLib 1.0 and later
  1561. * Mac OS X: in version 10.0 and later
  1562. }
  1563. function SoundConverterConvertBuffer(sc: SoundConverter; inputPtr: UnivPtr; inputFrames: UInt32; outputPtr: UnivPtr; var outputFrames: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterConvertBuffer';
  1564. {
  1565. * SoundConverterEndConversion()
  1566. *
  1567. * Availability:
  1568. * Non-Carbon CFM: in SoundLib 3.2 and later
  1569. * CarbonLib: in CarbonLib 1.0 and later
  1570. * Mac OS X: in version 10.0 and later
  1571. }
  1572. function SoundConverterEndConversion(sc: SoundConverter; outputPtr: UnivPtr; var outputFrames: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterEndConversion';
  1573. { Sound Manager 3.3 and later calls, uses _SoundDispatch }
  1574. {
  1575. * SoundConverterGetInfo()
  1576. *
  1577. * Availability:
  1578. * Non-Carbon CFM: in SoundLib 3.3 and later
  1579. * CarbonLib: in CarbonLib 1.0 and later
  1580. * Mac OS X: in version 10.0 and later
  1581. }
  1582. function SoundConverterGetInfo(sc: SoundConverter; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundConverterGetInfo';
  1583. {
  1584. * SoundConverterSetInfo()
  1585. *
  1586. * Availability:
  1587. * Non-Carbon CFM: in SoundLib 3.3 and later
  1588. * CarbonLib: in CarbonLib 1.0 and later
  1589. * Mac OS X: in version 10.0 and later
  1590. }
  1591. function SoundConverterSetInfo(sc: SoundConverter; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundConverterSetInfo';
  1592. { Sound Manager 3.6 and later calls, uses _SoundDispatch }
  1593. {
  1594. * SoundConverterFillBuffer()
  1595. *
  1596. * Availability:
  1597. * Non-Carbon CFM: in SoundLib 3.6 and later
  1598. * CarbonLib: in CarbonLib 1.1 and later
  1599. * Mac OS X: in version 10.0 and later
  1600. }
  1601. function SoundConverterFillBuffer(sc: SoundConverter; fillBufferDataUPP: SoundConverterFillBufferDataUPP; fillBufferDataRefCon: UnivPtr; outputBuffer: UnivPtr; outputBufferByteSize: UInt32; var bytesWritten: UInt32; var framesWritten: UInt32; var outputFlags: UInt32): OSErr; external name '_SoundConverterFillBuffer';
  1602. {
  1603. * SoundManagerGetInfo()
  1604. *
  1605. * Availability:
  1606. * Non-Carbon CFM: in SoundLib 3.6 and later
  1607. * CarbonLib: in CarbonLib 1.1 and later
  1608. * Mac OS X: in version 10.0 and later
  1609. }
  1610. function SoundManagerGetInfo(selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundManagerGetInfo';
  1611. {
  1612. * SoundManagerSetInfo()
  1613. *
  1614. * Availability:
  1615. * Non-Carbon CFM: in SoundLib 3.6 and later
  1616. * CarbonLib: in CarbonLib 1.1 and later
  1617. * Mac OS X: in version 10.0 and later
  1618. }
  1619. function SoundManagerSetInfo(selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundManagerSetInfo';
  1620. {
  1621. Sound Component Functions
  1622. basic sound component functions
  1623. }
  1624. {
  1625. * SoundComponentInitOutputDevice()
  1626. *
  1627. * Availability:
  1628. * Non-Carbon CFM: in SoundLib 3.0 and later
  1629. * CarbonLib: in CarbonLib 1.0 and later
  1630. * Mac OS X: in version 10.0 and later
  1631. }
  1632. function SoundComponentInitOutputDevice(ti: ComponentInstance; actions: SInt32): ComponentResult; external name '_SoundComponentInitOutputDevice';
  1633. {
  1634. * SoundComponentSetSource()
  1635. *
  1636. * Availability:
  1637. * Non-Carbon CFM: in SoundLib 3.0 and later
  1638. * CarbonLib: in CarbonLib 1.0 and later
  1639. * Mac OS X: in version 10.0 and later
  1640. }
  1641. function SoundComponentSetSource(ti: ComponentInstance; sourceID: SoundSource; source: ComponentInstance): ComponentResult; external name '_SoundComponentSetSource';
  1642. {
  1643. * SoundComponentGetSource()
  1644. *
  1645. * Availability:
  1646. * Non-Carbon CFM: in SoundLib 3.0 and later
  1647. * CarbonLib: in CarbonLib 1.0 and later
  1648. * Mac OS X: in version 10.0 and later
  1649. }
  1650. function SoundComponentGetSource(ti: ComponentInstance; sourceID: SoundSource; var source: ComponentInstance): ComponentResult; external name '_SoundComponentGetSource';
  1651. {
  1652. * SoundComponentGetSourceData()
  1653. *
  1654. * Availability:
  1655. * Non-Carbon CFM: in SoundLib 3.0 and later
  1656. * CarbonLib: in CarbonLib 1.0 and later
  1657. * Mac OS X: in version 10.0 and later
  1658. }
  1659. function SoundComponentGetSourceData(ti: ComponentInstance; var sourceData: SoundComponentDataPtr): ComponentResult; external name '_SoundComponentGetSourceData';
  1660. {
  1661. * SoundComponentSetOutput()
  1662. *
  1663. * Availability:
  1664. * Non-Carbon CFM: in SoundLib 3.0 and later
  1665. * CarbonLib: in CarbonLib 1.0 and later
  1666. * Mac OS X: in version 10.0 and later
  1667. }
  1668. function SoundComponentSetOutput(ti: ComponentInstance; requested: SoundComponentDataPtr; var actual: SoundComponentDataPtr): ComponentResult; external name '_SoundComponentSetOutput';
  1669. { junction methods for the mixer, must be called at non-interrupt level }
  1670. {
  1671. * SoundComponentAddSource()
  1672. *
  1673. * Availability:
  1674. * Non-Carbon CFM: in SoundLib 3.0 and later
  1675. * CarbonLib: in CarbonLib 1.0 and later
  1676. * Mac OS X: in version 10.0 and later
  1677. }
  1678. function SoundComponentAddSource(ti: ComponentInstance; var sourceID: SoundSource): ComponentResult; external name '_SoundComponentAddSource';
  1679. {
  1680. * SoundComponentRemoveSource()
  1681. *
  1682. * Availability:
  1683. * Non-Carbon CFM: in SoundLib 3.0 and later
  1684. * CarbonLib: in CarbonLib 1.0 and later
  1685. * Mac OS X: in version 10.0 and later
  1686. }
  1687. function SoundComponentRemoveSource(ti: ComponentInstance; sourceID: SoundSource): ComponentResult; external name '_SoundComponentRemoveSource';
  1688. { info methods }
  1689. {
  1690. * SoundComponentGetInfo()
  1691. *
  1692. * Availability:
  1693. * Non-Carbon CFM: in SoundLib 3.0 and later
  1694. * CarbonLib: in CarbonLib 1.0 and later
  1695. * Mac OS X: in version 10.0 and later
  1696. }
  1697. function SoundComponentGetInfo(ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr): ComponentResult; external name '_SoundComponentGetInfo';
  1698. {
  1699. * SoundComponentSetInfo()
  1700. *
  1701. * Availability:
  1702. * Non-Carbon CFM: in SoundLib 3.0 and later
  1703. * CarbonLib: in CarbonLib 1.0 and later
  1704. * Mac OS X: in version 10.0 and later
  1705. }
  1706. function SoundComponentSetInfo(ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr): ComponentResult; external name '_SoundComponentSetInfo';
  1707. { control methods }
  1708. {
  1709. * SoundComponentStartSource()
  1710. *
  1711. * Availability:
  1712. * Non-Carbon CFM: in SoundLib 3.0 and later
  1713. * CarbonLib: in CarbonLib 1.0 and later
  1714. * Mac OS X: in version 10.0 and later
  1715. }
  1716. function SoundComponentStartSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentStartSource';
  1717. {
  1718. * SoundComponentStopSource()
  1719. *
  1720. * Availability:
  1721. * Non-Carbon CFM: in SoundLib 3.0 and later
  1722. * CarbonLib: in CarbonLib 1.0 and later
  1723. * Mac OS X: in version 10.0 and later
  1724. }
  1725. function SoundComponentStopSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentStopSource';
  1726. {
  1727. * SoundComponentPauseSource()
  1728. *
  1729. * Availability:
  1730. * Non-Carbon CFM: in SoundLib 3.0 and later
  1731. * CarbonLib: in CarbonLib 1.0 and later
  1732. * Mac OS X: in version 10.0 and later
  1733. }
  1734. function SoundComponentPauseSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentPauseSource';
  1735. {
  1736. * SoundComponentPlaySourceBuffer()
  1737. *
  1738. * Availability:
  1739. * Non-Carbon CFM: in SoundLib 3.0 and later
  1740. * CarbonLib: in CarbonLib 1.0 and later
  1741. * Mac OS X: in version 10.0 and later
  1742. }
  1743. function SoundComponentPlaySourceBuffer(ti: ComponentInstance; sourceID: SoundSource; pb: SoundParamBlockPtr; actions: SInt32): ComponentResult; external name '_SoundComponentPlaySourceBuffer';
  1744. { Audio Components }
  1745. {Volume is described as a value between 0 and 1, with 0 indicating minimum
  1746. volume and 1 indicating maximum volume; if the device doesn't support
  1747. software control of volume, then a value of unimpErr is returned, indicating
  1748. that these functions are not supported by the device
  1749. }
  1750. {$ifc CALL_NOT_IN_CARBON}
  1751. {
  1752. * AudioGetVolume()
  1753. *
  1754. * Availability:
  1755. * Non-Carbon CFM: in SoundLib 3.0 and later
  1756. * CarbonLib: not available
  1757. * Mac OS X: not available
  1758. }
  1759. function AudioGetVolume(ac: ComponentInstance; whichChannel: SInt16; var volume: ShortFixed): ComponentResult; external name '_AudioGetVolume';
  1760. {
  1761. * AudioSetVolume()
  1762. *
  1763. * Availability:
  1764. * Non-Carbon CFM: in SoundLib 3.0 and later
  1765. * CarbonLib: not available
  1766. * Mac OS X: not available
  1767. }
  1768. function AudioSetVolume(ac: ComponentInstance; whichChannel: SInt16; volume: ShortFixed): ComponentResult; external name '_AudioSetVolume';
  1769. {If the device doesn't support software control of mute, then a value of unimpErr is
  1770. returned, indicating that these functions are not supported by the device.}
  1771. {
  1772. * AudioGetMute()
  1773. *
  1774. * Availability:
  1775. * Non-Carbon CFM: in SoundLib 3.0 and later
  1776. * CarbonLib: not available
  1777. * Mac OS X: not available
  1778. }
  1779. function AudioGetMute(ac: ComponentInstance; whichChannel: SInt16; var mute: SInt16): ComponentResult; external name '_AudioGetMute';
  1780. {
  1781. * AudioSetMute()
  1782. *
  1783. * Availability:
  1784. * Non-Carbon CFM: in SoundLib 3.0 and later
  1785. * CarbonLib: not available
  1786. * Mac OS X: not available
  1787. }
  1788. function AudioSetMute(ac: ComponentInstance; whichChannel: SInt16; mute: SInt16): ComponentResult; external name '_AudioSetMute';
  1789. {AudioSetToDefaults causes the associated device to reset its volume and mute values
  1790. (and perhaps other characteristics, e.g. attenuation) to "factory default" settings}
  1791. {
  1792. * AudioSetToDefaults()
  1793. *
  1794. * Availability:
  1795. * Non-Carbon CFM: in SoundLib 3.0 and later
  1796. * CarbonLib: not available
  1797. * Mac OS X: not available
  1798. }
  1799. function AudioSetToDefaults(ac: ComponentInstance): ComponentResult; external name '_AudioSetToDefaults';
  1800. { This routine is required; it must be implemented by all audio components }
  1801. {
  1802. * AudioGetInfo()
  1803. *
  1804. * Availability:
  1805. * Non-Carbon CFM: in SoundLib 3.0 and later
  1806. * CarbonLib: not available
  1807. * Mac OS X: not available
  1808. }
  1809. function AudioGetInfo(ac: ComponentInstance; info: AudioInfoPtr): ComponentResult; external name '_AudioGetInfo';
  1810. {
  1811. * AudioGetBass()
  1812. *
  1813. * Availability:
  1814. * Non-Carbon CFM: in SoundLib 3.0 and later
  1815. * CarbonLib: not available
  1816. * Mac OS X: not available
  1817. }
  1818. function AudioGetBass(ac: ComponentInstance; whichChannel: SInt16; var bass: SInt16): ComponentResult; external name '_AudioGetBass';
  1819. {
  1820. * AudioSetBass()
  1821. *
  1822. * Availability:
  1823. * Non-Carbon CFM: in SoundLib 3.0 and later
  1824. * CarbonLib: not available
  1825. * Mac OS X: not available
  1826. }
  1827. function AudioSetBass(ac: ComponentInstance; whichChannel: SInt16; bass: SInt16): ComponentResult; external name '_AudioSetBass';
  1828. {
  1829. * AudioGetTreble()
  1830. *
  1831. * Availability:
  1832. * Non-Carbon CFM: in SoundLib 3.0 and later
  1833. * CarbonLib: not available
  1834. * Mac OS X: not available
  1835. }
  1836. function AudioGetTreble(ac: ComponentInstance; whichChannel: SInt16; var Treble: SInt16): ComponentResult; external name '_AudioGetTreble';
  1837. {
  1838. * AudioSetTreble()
  1839. *
  1840. * Availability:
  1841. * Non-Carbon CFM: in SoundLib 3.0 and later
  1842. * CarbonLib: not available
  1843. * Mac OS X: not available
  1844. }
  1845. function AudioSetTreble(ac: ComponentInstance; whichChannel: SInt16; Treble: SInt16): ComponentResult; external name '_AudioSetTreble';
  1846. {
  1847. * AudioGetOutputDevice()
  1848. *
  1849. * Availability:
  1850. * Non-Carbon CFM: in SoundLib 3.0 and later
  1851. * CarbonLib: not available
  1852. * Mac OS X: not available
  1853. }
  1854. function AudioGetOutputDevice(ac: ComponentInstance; var outputDevice: Component): ComponentResult; external name '_AudioGetOutputDevice';
  1855. { This is routine is private to the AudioVision component. It enables the watching of the mute key. }
  1856. {
  1857. * AudioMuteOnEvent()
  1858. *
  1859. * Availability:
  1860. * Non-Carbon CFM: in SoundLib 3.0 and later
  1861. * CarbonLib: not available
  1862. * Mac OS X: not available
  1863. }
  1864. function AudioMuteOnEvent(ac: ComponentInstance; muteOnEvent: SInt16): ComponentResult; external name '_AudioMuteOnEvent';
  1865. {$endc} {CALL_NOT_IN_CARBON}
  1866. const
  1867. kDelegatedSoundComponentSelectors = $0100;
  1868. { Sound Input Manager routines, uses _SoundDispatch }
  1869. {
  1870. * SPBVersion()
  1871. *
  1872. * Availability:
  1873. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1874. * CarbonLib: in CarbonLib 1.0 and later
  1875. * Mac OS X: in version 10.0 and later
  1876. }
  1877. function SPBVersion: NumVersion; external name '_SPBVersion';
  1878. {
  1879. * SndRecord()
  1880. *
  1881. * Availability:
  1882. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1883. * CarbonLib: in CarbonLib 1.0 and later
  1884. * Mac OS X: in version 10.0 and later
  1885. }
  1886. function SndRecord(filterProc: ModalFilterUPP; corner: Point; quality: OSType; var sndHandle: SndListHandle): OSErr; external name '_SndRecord';
  1887. {$ifc CALL_NOT_IN_CARBON}
  1888. {
  1889. * SndRecordToFile()
  1890. *
  1891. * Availability:
  1892. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1893. * CarbonLib: not available
  1894. * Mac OS X: not available
  1895. }
  1896. function SndRecordToFile(filterProc: ModalFilterUPP; corner: Point; quality: OSType; fRefNum: SInt16): OSErr; external name '_SndRecordToFile';
  1897. {$endc} {CALL_NOT_IN_CARBON}
  1898. {
  1899. * SPBSignInDevice()
  1900. *
  1901. * Availability:
  1902. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1903. * CarbonLib: in CarbonLib 1.0 and later
  1904. * Mac OS X: in version 10.0 and later
  1905. }
  1906. function SPBSignInDevice(deviceRefNum: SInt16; const (*var*) deviceName: Str255): OSErr; external name '_SPBSignInDevice';
  1907. {
  1908. * SPBSignOutDevice()
  1909. *
  1910. * Availability:
  1911. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1912. * CarbonLib: in CarbonLib 1.0 and later
  1913. * Mac OS X: in version 10.0 and later
  1914. }
  1915. function SPBSignOutDevice(deviceRefNum: SInt16): OSErr; external name '_SPBSignOutDevice';
  1916. {
  1917. * SPBGetIndexedDevice()
  1918. *
  1919. * Availability:
  1920. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1921. * CarbonLib: in CarbonLib 1.0 and later
  1922. * Mac OS X: in version 10.0 and later
  1923. }
  1924. function SPBGetIndexedDevice(count: SInt16; var deviceName: Str255; var deviceIconHandle: Handle): OSErr; external name '_SPBGetIndexedDevice';
  1925. {
  1926. * SPBOpenDevice()
  1927. *
  1928. * Availability:
  1929. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1930. * CarbonLib: in CarbonLib 1.0 and later
  1931. * Mac OS X: in version 10.0 and later
  1932. }
  1933. function SPBOpenDevice(const (*var*) deviceName: Str255; permission: SInt16; var inRefNum: SInt32): OSErr; external name '_SPBOpenDevice';
  1934. {
  1935. * SPBCloseDevice()
  1936. *
  1937. * Availability:
  1938. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1939. * CarbonLib: in CarbonLib 1.0 and later
  1940. * Mac OS X: in version 10.0 and later
  1941. }
  1942. function SPBCloseDevice(inRefNum: SInt32): OSErr; external name '_SPBCloseDevice';
  1943. {
  1944. * SPBRecord()
  1945. *
  1946. * Availability:
  1947. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1948. * CarbonLib: in CarbonLib 1.0 and later
  1949. * Mac OS X: in version 10.0 and later
  1950. }
  1951. function SPBRecord(inParamPtr: SPBPtr; asynchFlag: boolean): OSErr; external name '_SPBRecord';
  1952. {$ifc CALL_NOT_IN_CARBON}
  1953. {
  1954. * SPBRecordToFile()
  1955. *
  1956. * Availability:
  1957. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1958. * CarbonLib: not available
  1959. * Mac OS X: not available
  1960. }
  1961. function SPBRecordToFile(fRefNum: SInt16; inParamPtr: SPBPtr; asynchFlag: boolean): OSErr; external name '_SPBRecordToFile';
  1962. {$endc} {CALL_NOT_IN_CARBON}
  1963. {
  1964. * SPBPauseRecording()
  1965. *
  1966. * Availability:
  1967. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1968. * CarbonLib: in CarbonLib 1.0 and later
  1969. * Mac OS X: in version 10.0 and later
  1970. }
  1971. function SPBPauseRecording(inRefNum: SInt32): OSErr; external name '_SPBPauseRecording';
  1972. {
  1973. * SPBResumeRecording()
  1974. *
  1975. * Availability:
  1976. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1977. * CarbonLib: in CarbonLib 1.0 and later
  1978. * Mac OS X: in version 10.0 and later
  1979. }
  1980. function SPBResumeRecording(inRefNum: SInt32): OSErr; external name '_SPBResumeRecording';
  1981. {
  1982. * SPBStopRecording()
  1983. *
  1984. * Availability:
  1985. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1986. * CarbonLib: in CarbonLib 1.0 and later
  1987. * Mac OS X: in version 10.0 and later
  1988. }
  1989. function SPBStopRecording(inRefNum: SInt32): OSErr; external name '_SPBStopRecording';
  1990. {
  1991. * SPBGetRecordingStatus()
  1992. *
  1993. * Availability:
  1994. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1995. * CarbonLib: in CarbonLib 1.0 and later
  1996. * Mac OS X: in version 10.0 and later
  1997. }
  1998. function SPBGetRecordingStatus(inRefNum: SInt32; var recordingStatus: SInt16; var meterLevel: SInt16; var totalSamplesToRecord: UInt32; var numberOfSamplesRecorded: UInt32; var totalMsecsToRecord: UInt32; var numberOfMsecsRecorded: UInt32): OSErr; external name '_SPBGetRecordingStatus';
  1999. {
  2000. * SPBGetDeviceInfo()
  2001. *
  2002. * Availability:
  2003. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2004. * CarbonLib: in CarbonLib 1.0 and later
  2005. * Mac OS X: in version 10.0 and later
  2006. }
  2007. function SPBGetDeviceInfo(inRefNum: SInt32; infoType: OSType; infoData: UnivPtr): OSErr; external name '_SPBGetDeviceInfo';
  2008. {
  2009. * SPBSetDeviceInfo()
  2010. *
  2011. * Availability:
  2012. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2013. * CarbonLib: in CarbonLib 1.0 and later
  2014. * Mac OS X: in version 10.0 and later
  2015. }
  2016. function SPBSetDeviceInfo(inRefNum: SInt32; infoType: OSType; infoData: UnivPtr): OSErr; external name '_SPBSetDeviceInfo';
  2017. {
  2018. * SPBMillisecondsToBytes()
  2019. *
  2020. * Availability:
  2021. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2022. * CarbonLib: in CarbonLib 1.0 and later
  2023. * Mac OS X: in version 10.0 and later
  2024. }
  2025. function SPBMillisecondsToBytes(inRefNum: SInt32; var milliseconds: SInt32): OSErr; external name '_SPBMillisecondsToBytes';
  2026. {
  2027. * SPBBytesToMilliseconds()
  2028. *
  2029. * Availability:
  2030. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2031. * CarbonLib: in CarbonLib 1.0 and later
  2032. * Mac OS X: in version 10.0 and later
  2033. }
  2034. function SPBBytesToMilliseconds(inRefNum: SInt32; var byteCount: SInt32): OSErr; external name '_SPBBytesToMilliseconds';
  2035. {
  2036. * SetupSndHeader()
  2037. *
  2038. * Availability:
  2039. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2040. * CarbonLib: in CarbonLib 1.0 and later
  2041. * Mac OS X: in version 10.0 and later
  2042. }
  2043. function SetupSndHeader(sndHandle: SndListHandle; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; baseNote: SInt16; numBytes: UInt32; var headerLen: SInt16): OSErr; external name '_SetupSndHeader';
  2044. {
  2045. * SetupAIFFHeader()
  2046. *
  2047. * Availability:
  2048. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  2049. * CarbonLib: in CarbonLib 1.0 and later
  2050. * Mac OS X: in version 10.0 and later
  2051. }
  2052. function SetupAIFFHeader(fRefNum: SInt16; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; numBytes: UInt32; numFrames: UInt32): OSErr; external name '_SetupAIFFHeader';
  2053. { Sound Input Manager 1.1 and later calls, uses _SoundDispatch }
  2054. {
  2055. * ParseAIFFHeader()
  2056. *
  2057. * Availability:
  2058. * Non-Carbon CFM: in SoundLib 3.0 and later
  2059. * CarbonLib: in CarbonLib 1.0 and later
  2060. * Mac OS X: in version 10.0 and later
  2061. }
  2062. function ParseAIFFHeader(fRefNum: SInt16; var sndInfo: SoundComponentData; var numFrames: UInt32; var dataOffset: UInt32): OSErr; external name '_ParseAIFFHeader';
  2063. {
  2064. * ParseSndHeader()
  2065. *
  2066. * Availability:
  2067. * Non-Carbon CFM: in SoundLib 3.0 and later
  2068. * CarbonLib: in CarbonLib 1.0 and later
  2069. * Mac OS X: in version 10.0 and later
  2070. }
  2071. function ParseSndHeader(sndHandle: SndListHandle; var sndInfo: SoundComponentData; var numFrames: UInt32; var dataOffset: UInt32): OSErr; external name '_ParseSndHeader';
  2072. {$ifc NOT TARGET_OS_MAC OR TARGET_API_MAC_CARBON}
  2073. { Only to be used if you are writing a sound input component; this }
  2074. { is the param block for a read request from the SoundMgr to the }
  2075. { sound input component. Not to be confused with the SPB struct }
  2076. { above, which is the param block for a read request from an app }
  2077. { to the SoundMgr. }
  2078. type
  2079. SndInputCmpParamPtr = ^SndInputCmpParam;
  2080. {$ifc TYPED_FUNCTION_POINTERS}
  2081. SICCompletionProcPtr = procedure(SICParmPtr: SndInputCmpParamPtr);
  2082. {$elsec}
  2083. SICCompletionProcPtr = ProcPtr;
  2084. {$endc}
  2085. SndInputCmpParam = record
  2086. ioCompletion: SICCompletionProcPtr; { completion routine [pointer] }
  2087. ioInterrupt: SIInterruptProcPtr; { interrupt routine [pointer] }
  2088. ioResult: OSErr; { I/O result code [word] }
  2089. pad: SInt16;
  2090. ioReqCount: UInt32;
  2091. ioActCount: UInt32;
  2092. ioBuffer: Ptr;
  2093. ioMisc: Ptr;
  2094. end;
  2095. {
  2096. * SndInputReadAsync()
  2097. *
  2098. * Availability:
  2099. * Non-Carbon CFM: not available
  2100. * CarbonLib: not available
  2101. * Mac OS X: in version 10.0 and later
  2102. }
  2103. function SndInputReadAsync(self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr): ComponentResult; external name '_SndInputReadAsync';
  2104. {
  2105. * SndInputReadSync()
  2106. *
  2107. * Availability:
  2108. * Non-Carbon CFM: not available
  2109. * CarbonLib: not available
  2110. * Mac OS X: in version 10.0 and later
  2111. }
  2112. function SndInputReadSync(self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr): ComponentResult; external name '_SndInputReadSync';
  2113. {
  2114. * SndInputPauseRecording()
  2115. *
  2116. * Availability:
  2117. * Non-Carbon CFM: not available
  2118. * CarbonLib: not available
  2119. * Mac OS X: in version 10.0 and later
  2120. }
  2121. function SndInputPauseRecording(self: ComponentInstance): ComponentResult; external name '_SndInputPauseRecording';
  2122. {
  2123. * SndInputResumeRecording()
  2124. *
  2125. * Availability:
  2126. * Non-Carbon CFM: not available
  2127. * CarbonLib: not available
  2128. * Mac OS X: in version 10.0 and later
  2129. }
  2130. function SndInputResumeRecording(self: ComponentInstance): ComponentResult; external name '_SndInputResumeRecording';
  2131. {
  2132. * SndInputStopRecording()
  2133. *
  2134. * Availability:
  2135. * Non-Carbon CFM: not available
  2136. * CarbonLib: not available
  2137. * Mac OS X: in version 10.0 and later
  2138. }
  2139. function SndInputStopRecording(self: ComponentInstance): ComponentResult; external name '_SndInputStopRecording';
  2140. {
  2141. * SndInputGetStatus()
  2142. *
  2143. * Availability:
  2144. * Non-Carbon CFM: not available
  2145. * CarbonLib: not available
  2146. * Mac OS X: in version 10.0 and later
  2147. }
  2148. function SndInputGetStatus(self: ComponentInstance; var recordingStatus: SInt16; var totalSamplesToRecord: UInt32; var numberOfSamplesRecorded: UInt32): ComponentResult; external name '_SndInputGetStatus';
  2149. {
  2150. * SndInputGetDeviceInfo()
  2151. *
  2152. * Availability:
  2153. * Non-Carbon CFM: not available
  2154. * CarbonLib: not available
  2155. * Mac OS X: in version 10.0 and later
  2156. }
  2157. function SndInputGetDeviceInfo(self: ComponentInstance; infoType: OSType; infoData: UnivPtr): ComponentResult; external name '_SndInputGetDeviceInfo';
  2158. {
  2159. * SndInputSetDeviceInfo()
  2160. *
  2161. * Availability:
  2162. * Non-Carbon CFM: not available
  2163. * CarbonLib: not available
  2164. * Mac OS X: in version 10.0 and later
  2165. }
  2166. function SndInputSetDeviceInfo(self: ComponentInstance; infoType: OSType; infoData: UnivPtr): ComponentResult; external name '_SndInputSetDeviceInfo';
  2167. {
  2168. * SndInputInitHardware()
  2169. *
  2170. * Availability:
  2171. * Non-Carbon CFM: not available
  2172. * CarbonLib: not available
  2173. * Mac OS X: in version 10.0 and later
  2174. }
  2175. function SndInputInitHardware(self: ComponentInstance): ComponentResult; external name '_SndInputInitHardware';
  2176. {$endc}
  2177. {$ALIGN MAC68K}
  2178. end.