Sound.pas 106 KB

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