| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815 |
- {
- File: CarbonSound/Sound.h
-
- Contains: Sound Manager Interfaces.
-
- Version: CarbonSound-115~164
-
- Copyright: © 1986-2008 by Apple Computer, Inc., all rights reserved
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://bugs.freepascal.org
-
- }
- { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
- { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
- {
- Modified for use with Free Pascal
- Version 308
- Please report any bugs to <[email protected]>
- }
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- {$mode macpas}
- {$modeswitch cblocks}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$calling mwpascal}
- unit Sound;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
- {$setc GAP_INTERFACES_VERSION := $0308}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC32}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
- {$setc __ppc64__ := 1}
- {$elsec}
- {$setc __ppc64__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc not defined __x86_64__ and defined CPUX86_64}
- {$setc __x86_64__ := 1}
- {$elsec}
- {$setc __x86_64__ := 0}
- {$endc}
- {$ifc not defined __arm__ and defined CPUARM}
- {$setc __arm__ := 1}
- {$elsec}
- {$setc __arm__ := 0}
- {$endc}
- {$ifc not defined __arm64__ and defined CPUAARCH64}
- {$setc __arm64__ := 1}
- {$elsec}
- {$setc __arm64__ := 0}
- {$endc}
- {$ifc defined cpu64}
- {$setc __LP64__ := 1}
- {$elsec}
- {$setc __LP64__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __ppc64__ and __ppc64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined(iphonesim)}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __x86_64__ and __x86_64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := TRUE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined(iphonesim)}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __arm__ and __arm__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := TRUE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- { will require compiler define when/if other Apple devices with ARM cpus ship }
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elifc defined __arm64__ and __arm64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := TRUE}
- { will require compiler define when/if other Apple devices with ARM cpus ship }
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elsec}
- {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
- {$endc}
- {$ifc defined __LP64__ and __LP64__ }
- {$setc TARGET_CPU_64 := TRUE}
- {$elsec}
- {$setc TARGET_CPU_64 := FALSE}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,Components,MixedMode,Dialogs;
- {$endc} {not MACOSALLINCLUDE}
- {$ifc TARGET_OS_MAC}
- {$ALIGN MAC68K}
- {$ifc not TARGET_CPU_64}
- {
- * * * N O T E * * *
- This file has been updated to include Sound Manager 3.3 interfaces.
- Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
- that originally shipped with the PowerMacs. These missing functions and the
- new 3.3 interfaces have been released in the SoundLib library for PowerPC
- developers to link with. The runtime library for these functions are
- installed by the Sound Manager. The following functions are found in SoundLib.
- GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
- UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
- SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
- SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
- SoundConverterConvertBuffer(), SoundConverterEndConversion(),
- AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
- AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
- AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
- OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
- SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
- SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
- SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
- SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
- SoundComponentStartSource(), SoundComponentStopSource(),
- ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
- }
- {
- Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
- These items are no longer defined, but appear here so that someone
- searching the interfaces might find them. If you are using one of these
- items, you must change your code to support the Sound Manager.
- swMode, ftMode, ffMode
- FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
- SndCompletionProcPtr
- StartSound, StopSound, SoundDone
- SetSoundVol, GetSoundVol
- }
- {
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- constants
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- }
- const
- twelfthRootTwo = 1.05946309435;
- const
- soundListRsrc = FourCharCode('snd '); {Resource type used by Sound Manager}
- kSoundCodecInfoResourceType = FourCharCode('snfo'); {Resource type holding codec information (optional public component resource)}
- const
- kSimpleBeepID = 1; {reserved resource ID for Simple Beep}
- const
- rate48khz = $BB800000; {48000.00000 in fixed-point}
- rate44khz = $AC440000; {44100.00000 in fixed-point}
- rate32khz = $7D000000; {32000.00000 in fixed-point}
- rate22050hz = $56220000; {22050.00000 in fixed-point}
- rate22khz = $56EE8BA3; {22254.54545 in fixed-point}
- rate16khz = $3E800000; {16000.00000 in fixed-point}
- rate11khz = $2B7745D1; {11127.27273 in fixed-point}
- rate11025hz = $2B110000; {11025.00000 in fixed-point}
- rate8khz = $1F400000; { 8000.00000 in fixed-point}
- {synthesizer numbers for SndNewChannel}
- const
- sampledSynth = 5; {sampled sound synthesizer}
- {$ifc CALL_NOT_IN_CARBON}
- const
- squareWaveSynth = 1; {square wave synthesizer}
- waveTableSynth = 3; {wave table synthesizer}
- {old Sound Manager MACE synthesizer numbers}
- MACE3snthID = 11;
- MACE6snthID = 13;
- {$endc} {CALL_NOT_IN_CARBON}
- const
- kMiddleC = 60; {MIDI note value for middle C}
- const
- kNoVolume = 0; {setting for no sound volume}
- kFullVolume = $0100; {1.0, setting for full hardware output volume}
- const
- stdQLength = 128;
- const
- dataOffsetFlag = $8000;
- const
- kUseOptionalOutputDevice = -1; {only for Sound Manager 3.0 or later}
- const
- notCompressed = 0; {compression ID's}
- fixedCompression = -1; {compression ID for fixed-sized compression}
- variableCompression = -2; {compression ID for variable-sized compression}
- const
- twoToOne = 1;
- eightToThree = 2;
- threeToOne = 3;
- sixToOne = 4;
- sixToOnePacketSize = 8;
- threeToOnePacketSize = 16;
- const
- stateBlockSize = 64;
- leftOverBlockSize = 32;
- const
- firstSoundFormat = $0001; {general sound format}
- secondSoundFormat = $0002; {special sampled sound format (HyperCard)}
- {$ifc CALL_NOT_IN_CARBON}
- const
- dbBufferReady = $00000001; {double buffer is filled}
- dbLastBuffer = $00000004; {last double buffer to play}
- {$endc} {CALL_NOT_IN_CARBON}
- const
- sysBeepDisable = $0000; {SysBeep() enable flags}
- sysBeepEnable = 1 shl 0;
- sysBeepSynchronous = 1 shl 1; {if bit set, make alert sounds synchronous}
- const
- unitTypeNoSelection = $FFFF; {unitTypes for AudioSelection.unitType}
- unitTypeSeconds = $0000;
- const
- stdSH = $00; {Standard sound header encode value}
- extSH = $FF; {Extended sound header encode value}
- cmpSH = $FE; {Compressed sound header encode value}
- {command numbers for SndDoCommand and SndDoImmediate}
- const
- nullCmd = 0;
- quietCmd = 3;
- flushCmd = 4;
- reInitCmd = 5;
- waitCmd = 10;
- pauseCmd = 11;
- resumeCmd = 12;
- callBackCmd = 13;
- syncCmd = 14;
- availableCmd = 24;
- versionCmd = 25;
- volumeCmd = 46; {sound manager 3.0 or later only}
- getVolumeCmd = 47; {sound manager 3.0 or later only}
- clockComponentCmd = 50; {sound manager 3.2.1 or later only}
- getClockComponentCmd = 51; {sound manager 3.2.1 or later only}
- scheduledSoundCmd = 52; {sound manager 3.3 or later only}
- linkSoundComponentsCmd = 53; {sound manager 3.3 or later only}
- soundCmd = 80;
- bufferCmd = 81;
- rateMultiplierCmd = 86;
- getRateMultiplierCmd = 87;
- {$ifc CALL_NOT_IN_CARBON}
- {command numbers for SndDoCommand and SndDoImmediate that are not available for use in Carbon }
- const
- initCmd = 1;
- freeCmd = 2;
- totalLoadCmd = 26;
- loadCmd = 27;
- freqDurationCmd = 40;
- restCmd = 41;
- freqCmd = 42;
- ampCmd = 43;
- timbreCmd = 44;
- getAmpCmd = 45;
- waveTableCmd = 60;
- phaseCmd = 61;
- rateCmd = 82;
- continueCmd = 83;
- doubleBufferCmd = 84;
- getRateCmd = 85;
- sizeCmd = 90; {obsolete command}
- convertCmd = 91; {obsolete MACE command}
- {$endc} {CALL_NOT_IN_CARBON}
- {$ifc OLDROUTINENAMES}
- {channel initialization parameters}
- const
- waveInitChannelMask = $07;
- waveInitChannel0 = $04; {wave table only, Sound Manager 2.0 and earlier}
- waveInitChannel1 = $05; {wave table only, Sound Manager 2.0 and earlier}
- waveInitChannel2 = $06; {wave table only, Sound Manager 2.0 and earlier}
- waveInitChannel3 = $07; {wave table only, Sound Manager 2.0 and earlier}
- initChan0 = waveInitChannel0; {obsolete spelling}
- initChan1 = waveInitChannel1; {obsolete spelling}
- initChan2 = waveInitChannel2; {obsolete spelling}
- initChan3 = waveInitChannel3; {obsolete spelling}
- const
- outsideCmpSH = 0; {obsolete MACE constant}
- insideCmpSH = 1; {obsolete MACE constant}
- aceSuccess = 0; {obsolete MACE constant}
- aceMemFull = 1; {obsolete MACE constant}
- aceNilBlock = 2; {obsolete MACE constant}
- aceBadComp = 3; {obsolete MACE constant}
- aceBadEncode = 4; {obsolete MACE constant}
- aceBadDest = 5; {obsolete MACE constant}
- aceBadCmd = 6; {obsolete MACE constant}
- {$endc} {OLDROUTINENAMES}
- const
- initChanLeft = $0002; {left stereo channel}
- initChanRight = $0003; {right stereo channel}
- initNoInterp = $0004; {no linear interpolation}
- initNoDrop = $0008; {no drop-sample conversion}
- initMono = $0080; {monophonic channel}
- initStereo = $00C0; {stereo channel}
- initMACE3 = $0300; {MACE 3:1}
- initMACE6 = $0400; {MACE 6:1}
- initPanMask = $0003; {mask for right/left pan values}
- initSRateMask = $0030; {mask for sample rate values}
- initStereoMask = $00C0; {mask for mono/stereo values}
- initCompMask = $FF00; {mask for compression IDs}
- {Get&Set Sound Information Selectors}
- const
- siActiveChannels = FourCharCode('chac'); {active channels}
- siActiveLevels = FourCharCode('lmac'); {active meter levels}
- siAGCOnOff = FourCharCode('agc '); {automatic gain control state}
- siAsync = FourCharCode('asyn'); {asynchronous capability}
- siAVDisplayBehavior = FourCharCode('avdb');
- siChannelAvailable = FourCharCode('chav'); {number of channels available}
- siCompressionAvailable = FourCharCode('cmav'); {compression types available}
- siCompressionFactor = FourCharCode('cmfa'); {current compression factor}
- siCompressionHeader = FourCharCode('cmhd'); {return compression header}
- siCompressionNames = FourCharCode('cnam'); {compression type names available}
- siCompressionParams = FourCharCode('evaw'); {compression parameters}
- siCompressionSampleRate = FourCharCode('cprt'); { SetInfo only: compressor's sample rate}
- siCompressionChannels = FourCharCode('cpct'); { SetInfo only: compressor's number of channels}
- siCompressionOutputSampleRate = FourCharCode('cort'); { GetInfo only: only implemented by compressors that have differing in and out rates }
- siCompressionInputRateList = FourCharCode('crtl'); { GetInfo only: only implemented by compressors that only take certain input rates }
- siCompressionType = FourCharCode('comp'); {current compression type}
- siCompressionConfiguration = FourCharCode('ccfg'); {compression extensions}
- siContinuous = FourCharCode('cont'); {continous recording}
- siDecompressionParams = FourCharCode('wave'); {decompression parameters}
- siDecompressionConfiguration = FourCharCode('dcfg'); {decompression extensions}
- siDeviceBufferInfo = FourCharCode('dbin'); {size of interrupt buffer}
- siDeviceConnected = FourCharCode('dcon'); {input device connection status}
- siDeviceIcon = FourCharCode('icon'); {input device icon}
- siDeviceName = FourCharCode('name'); {input device name}
- siEQSpectrumBands = FourCharCode('eqsb'); { number of spectrum bands}
- siEQSpectrumLevels = FourCharCode('eqlv'); { gets spectum meter levels}
- siEQSpectrumOnOff = FourCharCode('eqlo'); { turn on/off spectum meter levels}
- siEQSpectrumResolution = FourCharCode('eqrs'); { set the resolution of the FFT, 0 = low res (<=16 bands), 1 = high res (16-64 bands)}
- siEQToneControlGain = FourCharCode('eqtg'); { set the bass and treble gain}
- siEQToneControlOnOff = FourCharCode('eqtc'); { turn on equalizer attenuation}
- siHardwareBalance = FourCharCode('hbal');
- siHardwareBalanceSteps = FourCharCode('hbls');
- siHardwareBass = FourCharCode('hbas');
- siHardwareBassSteps = FourCharCode('hbst');
- siHardwareBusy = FourCharCode('hwbs'); {sound hardware is in use}
- siHardwareFormat = FourCharCode('hwfm'); {get hardware format}
- siHardwareMute = FourCharCode('hmut'); {mute state of all hardware}
- siHardwareMuteNoPrefs = FourCharCode('hmnp'); {mute state of all hardware, but don't store in prefs }
- siHardwareTreble = FourCharCode('htrb');
- siHardwareTrebleSteps = FourCharCode('hwts');
- siHardwareVolume = FourCharCode('hvol'); {volume level of all hardware}
- siHardwareVolumeSteps = FourCharCode('hstp'); {number of volume steps for hardware}
- siHeadphoneMute = FourCharCode('pmut'); {mute state of headphones}
- siHeadphoneVolume = FourCharCode('pvol'); {volume level of headphones}
- siHeadphoneVolumeSteps = FourCharCode('hdst'); {number of volume steps for headphones}
- siInputAvailable = FourCharCode('inav'); {input sources available}
- siInputGain = FourCharCode('gain'); {input gain}
- siInputSource = FourCharCode('sour'); {input source selector}
- siInputSourceNames = FourCharCode('snam'); {input source names}
- siLevelMeterOnOff = FourCharCode('lmet'); {level meter state}
- siModemGain = FourCharCode('mgai'); {modem input gain}
- siMonitorAvailable = FourCharCode('mnav');
- siMonitorSource = FourCharCode('mons');
- siNumberChannels = FourCharCode('chan'); {current number of channels}
- siOptionsDialog = FourCharCode('optd'); {display options dialog}
- siOSTypeInputSource = FourCharCode('inpt'); {input source by OSType}
- siOSTypeInputAvailable = FourCharCode('inav'); {list of available input source OSTypes}
- siOutputDeviceName = FourCharCode('onam'); {output device name}
- siPlayThruOnOff = FourCharCode('plth'); {playthrough state}
- siPostMixerSoundComponent = FourCharCode('psmx'); {install post-mixer effect}
- siPreMixerSoundComponent = FourCharCode('prmx'); {install pre-mixer effect}
- siQuality = FourCharCode('qual'); {quality setting}
- siRateMultiplier = FourCharCode('rmul'); {throttle rate setting}
- siRecordingQuality = FourCharCode('qual'); {recording quality}
- siSampleRate = FourCharCode('srat'); {current sample rate}
- siSampleRateAvailable = FourCharCode('srav'); {sample rates available}
- siSampleSize = FourCharCode('ssiz'); {current sample size}
- siSampleSizeAvailable = FourCharCode('ssav'); {sample sizes available}
- siSetupCDAudio = FourCharCode('sucd'); {setup sound hardware for CD audio}
- siSetupModemAudio = FourCharCode('sumd'); {setup sound hardware for modem audio}
- siSlopeAndIntercept = FourCharCode('flap'); {floating point variables for conversion}
- siSoundClock = FourCharCode('sclk');
- siUseThisSoundClock = FourCharCode('sclc'); {sdev uses this to tell the mixer to use his sound clock}
- siSpeakerMute = FourCharCode('smut'); {mute state of all built-in speaker}
- siSpeakerVolume = FourCharCode('svol'); {volume level of built-in speaker}
- siSSpCPULoadLimit = FourCharCode('3dll');
- siSSpLocalization = FourCharCode('3dif');
- siSSpSpeakerSetup = FourCharCode('3dst');
- siStereoInputGain = FourCharCode('sgai'); {stereo input gain}
- siSubwooferMute = FourCharCode('bmut'); {mute state of sub-woofer}
- siTerminalType = FourCharCode('ttyp'); { usb terminal type }
- siTwosComplementOnOff = FourCharCode('twos'); {two's complement state}
- siVendorProduct = FourCharCode('vpro'); { vendor and product ID }
- siVolume = FourCharCode('volu'); {volume level of source}
- siVoxRecordInfo = FourCharCode('voxr'); {VOX record parameters}
- siVoxStopInfo = FourCharCode('voxs'); {VOX stop parameters}
- siWideStereo = FourCharCode('wide'); {wide stereo setting}
- siSupportedExtendedFlags = FourCharCode('exfl'); {which flags are supported in Extended sound data structures}
- 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)}
- siOutputLatency = FourCharCode('olte'); {latency of sound output component}
- siHALAudioDeviceID = FourCharCode('hlid'); {audio device id}
- siHALAudioDeviceUniqueID = FourCharCode('huid'); {audio device unique id}
- siClientAcceptsVBR = FourCharCode('cvbr'); {client handles VBR}
- siSourceIsExhausted = FourCharCode('srcx'); {the ultimate source of data has run out (keep asking, but when you get nothing, that's it)}
- siMediaContextID = FourCharCode('uuid'); {media context id -- UUID }
- siCompressionMaxPacketSize = FourCharCode('cmxp'); {maximum compressed packet size for current configuration -- unsigned long }
- siAudioCodecPropertyValue = FourCharCode('spva'); {audio codec property value -- SoundAudioCodecPropertyRequestParams* }
- siAudioCodecPropertyInfo = FourCharCode('spin'); {audio codec property info -- SoundAudioCodecPropertyRequestParams* }
- const
- siCloseDriver = FourCharCode('clos'); {reserved for internal use only}
- siInitializeDriver = FourCharCode('init'); {reserved for internal use only}
- siPauseRecording = FourCharCode('paus'); {reserved for internal use only}
- siUserInterruptProc = FourCharCode('user'); {reserved for internal use only}
- { input source Types}
- const
- kInvalidSource = -1; {this source may be returned from GetInfo if no other source is the monitored source}
- kNoSource = FourCharCode('none'); {no source selection}
- kCDSource = FourCharCode('cd '); {internal CD player input}
- kExtMicSource = FourCharCode('emic'); {external mic input}
- kSoundInSource = FourCharCode('sinj'); {sound input jack}
- kRCAInSource = FourCharCode('irca'); {RCA jack input}
- kTVFMTunerSource = FourCharCode('tvfm');
- kDAVInSource = FourCharCode('idav'); {DAV analog input}
- kIntMicSource = FourCharCode('imic'); {internal mic input}
- kMediaBaySource = FourCharCode('mbay'); {media bay input}
- kModemSource = FourCharCode('modm'); {modem input (internal modem on desktops, PCI input on PowerBooks)}
- kPCCardSource = FourCharCode('pcm '); {PC Card pwm input}
- kZoomVideoSource = FourCharCode('zvpc'); {zoom video input}
- kDVDSource = FourCharCode('dvda'); { DVD audio input}
- kMicrophoneArray = FourCharCode('mica'); { microphone array}
- {Sound Component Types and Subtypes}
- const
- kNoSoundComponentType = FourCharCode('****');
- kSoundComponentType = FourCharCode('sift'); {component type}
- kSoundComponentPPCType = FourCharCode('nift'); {component type for PowerPC code}
- kRate8SubType = FourCharCode('ratb'); {8-bit rate converter}
- kRate16SubType = FourCharCode('ratw'); {16-bit rate converter}
- kConverterSubType = FourCharCode('conv'); {sample format converter}
- kSndSourceSubType = FourCharCode('sour'); {generic source component}
- kMixerType = FourCharCode('mixr');
- kMixer8SubType = FourCharCode('mixb'); {8-bit mixer}
- kMixer16SubType = FourCharCode('mixw'); {16-bit mixer}
- kSoundInputDeviceType = FourCharCode('sinp'); {sound input component}
- kWaveInSubType = FourCharCode('wavi'); {Windows waveIn}
- kWaveInSnifferSubType = FourCharCode('wisn'); {Windows waveIn sniffer}
- kSoundOutputDeviceType = FourCharCode('sdev'); {sound output component}
- kClassicSubType = FourCharCode('clas'); {classic hardware, i.e. Mac Plus}
- kASCSubType = FourCharCode('asc '); {Apple Sound Chip device}
- kDSPSubType = FourCharCode('dsp '); {DSP device}
- kAwacsSubType = FourCharCode('awac'); {Another of Will's Audio Chips device}
- kGCAwacsSubType = FourCharCode('awgc'); {Awacs audio with Grand Central DMA}
- kSingerSubType = FourCharCode('sing'); {Singer (via Whitney) based sound}
- kSinger2SubType = FourCharCode('sng2'); {Singer 2 (via Whitney) for Acme}
- kWhitSubType = FourCharCode('whit'); {Whit sound component for PrimeTime 3}
- kSoundBlasterSubType = FourCharCode('sbls'); {Sound Blaster for CHRP}
- kWaveOutSubType = FourCharCode('wavo'); {Windows waveOut}
- kWaveOutSnifferSubType = FourCharCode('wosn'); {Windows waveOut sniffer}
- kDirectSoundSubType = FourCharCode('dsnd'); {Windows DirectSound}
- kDirectSoundSnifferSubType = FourCharCode('dssn'); {Windows DirectSound sniffer}
- kUNIXsdevSubType = FourCharCode('un1x'); {UNIX base sdev}
- kUSBSubType = FourCharCode('usb '); {USB device}
- kBlueBoxSubType = FourCharCode('bsnd'); {Blue Box sound component}
- kHALCustomComponentSubType = FourCharCode('halx'); {Registered by the HAL output component ('hal!') for each HAL output device}
- kSoundCompressor = FourCharCode('scom');
- kSoundDecompressor = FourCharCode('sdec');
- kAudioComponentType = FourCharCode('adio'); {Audio components and sub-types}
- kAwacsPhoneSubType = FourCharCode('hphn');
- kAudioVisionSpeakerSubType = FourCharCode('telc');
- kAudioVisionHeadphoneSubType = FourCharCode('telh');
- kPhilipsFaderSubType = FourCharCode('tvav');
- kSGSToneSubType = FourCharCode('sgs0');
- kSoundEffectsType = FourCharCode('snfx'); {sound effects type}
- kEqualizerSubType = FourCharCode('eqal'); {frequency equalizer}
- kSSpLocalizationSubType = FourCharCode('snd3');
- {Format Types}
- const
- kSoundNotCompressed = FourCharCode('NONE'); {sound is not compressed}
- k8BitOffsetBinaryFormat = FourCharCode('raw '); {8-bit offset binary}
- k16BitBigEndianFormat = FourCharCode('twos'); {16-bit big endian}
- k16BitLittleEndianFormat = FourCharCode('sowt'); {16-bit little endian}
- kFloat32Format = FourCharCode('fl32'); {32-bit floating point}
- kFloat64Format = FourCharCode('fl64'); {64-bit floating point}
- k24BitFormat = FourCharCode('in24'); {24-bit integer}
- k32BitFormat = FourCharCode('in32'); {32-bit integer}
- k32BitLittleEndianFormat = FourCharCode('23ni'); {32-bit little endian integer }
- kMACE3Compression = FourCharCode('MAC3'); {MACE 3:1}
- kMACE6Compression = FourCharCode('MAC6'); {MACE 6:1}
- kCDXA4Compression = FourCharCode('cdx4'); {CD/XA 4:1}
- kCDXA2Compression = FourCharCode('cdx2'); {CD/XA 2:1}
- kIMACompression = FourCharCode('ima4'); {IMA 4:1}
- kULawCompression = FourCharCode('ulaw'); {µLaw 2:1}
- kALawCompression = FourCharCode('alaw'); {aLaw 2:1}
- kMicrosoftADPCMFormat = $6D730002; {Microsoft ADPCM - ACM code 2}
- kDVIIntelIMAFormat = $6D730011; {DVI/Intel IMA ADPCM - ACM code 17}
- kMicrosoftGSMCompression = $6D730031; {Microsoft GSM 6.10 - ACM code 49}
- kDVAudioFormat = FourCharCode('dvca'); {DV Audio}
- kQDesignCompression = FourCharCode('QDMC'); {QDesign music}
- kQDesign2Compression = FourCharCode('QDM2'); {QDesign2 music}
- kQUALCOMMCompression = FourCharCode('Qclp'); {QUALCOMM PureVoice}
- kOffsetBinary = k8BitOffsetBinaryFormat; {for compatibility}
- kTwosComplement = k16BitBigEndianFormat; {for compatibility}
- kLittleEndianFormat = k16BitLittleEndianFormat; {for compatibility}
- kMPEGLayer3Format = $6D730055; {MPEG Layer 3, CBR only (pre QT4.1)}
- kFullMPEGLay3Format = FourCharCode('.mp3'); {MPEG Layer 3, CBR & VBR (QT4.1 and later)}
- kVariableDurationDVAudioFormat = FourCharCode('vdva'); {Variable Duration DV Audio}
- kMPEG4AudioFormat = FourCharCode('mp4a');
- {$ifc TARGET_RT_LITTLE_ENDIAN}
- const
- k16BitNativeEndianFormat = k16BitLittleEndianFormat;
- k16BitNonNativeEndianFormat = k16BitBigEndianFormat;
- {$elsec}
- const
- k16BitNativeEndianFormat = k16BitBigEndianFormat;
- k16BitNonNativeEndianFormat = k16BitLittleEndianFormat;
- {$endc} {TARGET_RT_LITTLE_ENDIAN}
- {Features Flags}
- const
- k8BitRawIn = 1 shl 0; {data description}
- k8BitTwosIn = 1 shl 1;
- k16BitIn = 1 shl 2;
- kStereoIn = 1 shl 3;
- k8BitRawOut = 1 shl 8;
- k8BitTwosOut = 1 shl 9;
- k16BitOut = 1 shl 10;
- kStereoOut = 1 shl 11;
- kReverse = 1 shl 16; { function description}
- kRateConvert = 1 shl 17;
- kCreateSoundSource = 1 shl 18;
- kVMAwareness = 1 shl 21; { component will hold its memory}
- kHighQuality = 1 shl 22; { performance description}
- kNonRealTime = 1 shl 23;
- {'snfo' Resource Feature Flags}
- const
- kSoundCodecInfoFixedCompression = 1 shl 0; { has fixed compression format}
- kSoundCodecInfoVariableCompression = 1 shl 1; { has variable compression format}
- kSoundCodecInfoHasRestrictedInputRates = 1 shl 2; { compressor has restricted set of input sample rates}
- kSoundCodecInfoCanChangeOutputRate = 1 shl 3; { compressor may output a different sample rate than it receives}
- kSoundCodecInfoRequiresExternalFraming = 1 shl 4; { format requires external framing information during decode/encode}
- kSoundCodecInfoVariableDuration = 1 shl 5; { audio packets can vary in duration}
- {SoundComponentPlaySourceBuffer action flags}
- const
- kSourcePaused = 1 shl 0;
- kPassThrough = 1 shl 16;
- kNoSoundComponentChain = 1 shl 17;
- {SoundParamBlock flags, usefull for OpenMixerSoundComponent}
- const
- kNoMixing = 1 shl 0; {don't mix source}
- kNoSampleRateConversion = 1 shl 1; {don't convert sample rate (i.e. 11 kHz -> 22 kHz)}
- kNoSampleSizeConversion = 1 shl 2; {don't convert sample size (i.e. 16 -> 8)}
- kNoSampleFormatConversion = 1 shl 3; {don't convert sample format (i.e. 'twos' -> 'raw ')}
- kNoChannelConversion = 1 shl 4; {don't convert stereo/mono}
- kNoDecompression = 1 shl 5; {don't decompress (i.e. 'MAC3' -> 'raw ')}
- kNoVolumeConversion = 1 shl 6; {don't apply volume}
- kNoRealtimeProcessing = 1 shl 7; {won't run at interrupt time}
- kScheduledSource = 1 shl 8; {source is scheduled}
- kNonInterleavedBuffer = 1 shl 9; {buffer is not interleaved samples}
- kNonPagingMixer = 1 shl 10; {if VM is on, use the non-paging mixer}
- kSoundConverterMixer = 1 shl 11; {the mixer is to be used by the SoundConverter}
- kPagingMixer = 1 shl 12; {the mixer is to be used as a paging mixer when VM is on}
- kVMAwareMixer = 1 shl 13; {passed to the output device when the SM is going to deal with VM safety}
- kExtendedSoundData = 1 shl 14; {SoundComponentData record is actually an ExtendedSoundComponentData}
- {SoundParamBlock quality settings}
- const
- kBestQuality = 1 shl 0; {use interpolation in rate conversion}
- {useful bit masks}
- const
- kInputMask = $000000FF; {masks off input bits}
- kOutputMask = $0000FF00; {masks off output bits}
- kOutputShift = 8; {amount output bits are shifted}
- kActionMask = $00FF0000; {masks off action bits}
- kSoundComponentBits = $00FFFFFF;
- {audio atom types}
- const
- kAudioFormatAtomType = FourCharCode('frma');
- kAudioEndianAtomType = FourCharCode('enda');
- kAudioVBRAtomType = FourCharCode('vbra');
- kAudioTerminatorAtomType = 0;
- {siAVDisplayBehavior types}
- const
- kAVDisplayHeadphoneRemove = 0; { monitor does not have a headphone attached}
- kAVDisplayHeadphoneInsert = 1; { monitor has a headphone attached}
- kAVDisplayPlainTalkRemove = 2; { monitor either sending no input through CPU input port or unable to tell if input is coming in}
- kAVDisplayPlainTalkInsert = 3; { monitor sending PlainTalk level microphone source input through sound input port}
- {Audio Component constants}
- const
- {Values for whichChannel parameter}
- audioAllChannels = 0; {All channels (usually interpreted as both left and right)}
- audioLeftChannel = 1; {Left channel}
- audioRightChannel = 2; {Right channel}
- {Values for mute parameter}
- audioUnmuted = 0; {Device is unmuted}
- audioMuted = 1; {Device is muted}
- {Capabilities flags definitions}
- audioDoesMono = 1 shl 0; {Device supports mono output}
- audioDoesStereo = 1 shl 1; {Device supports stereo output}
- audioDoesIndependentChannels = 1 shl 2; {Device supports independent software control of each channel}
- {Sound Input Qualities}
- const
- siCDQuality = FourCharCode('cd '); {44.1kHz, stereo, 16 bit}
- siBestQuality = FourCharCode('best'); {22kHz, mono, 8 bit}
- siBetterQuality = FourCharCode('betr'); {22kHz, mono, MACE 3:1}
- siGoodQuality = FourCharCode('good'); {22kHz, mono, MACE 6:1}
- siNoneQuality = FourCharCode('none'); {settings don't match any quality for a get call}
- const
- siDeviceIsConnected = 1; {input device is connected and ready for input}
- siDeviceNotConnected = 0; {input device is not connected}
- siDontKnowIfConnected = -1; {can't tell if input device is connected}
- siReadPermission = 0; {permission passed to SPBOpenDevice}
- siWritePermission = 1; {permission passed to SPBOpenDevice}
- {flags that SoundConverterFillBuffer will return}
- const
- kSoundConverterDidntFillBuffer = 1 shl 0; {set if the converter couldn't completely satisfy a SoundConverterFillBuffer request}
- kSoundConverterHasLeftOverData = 1 shl 1; {set if the converter had left over data after completely satisfying a SoundConverterFillBuffer call}
- { flags for extendedFlags fields of ExtendedSoundComponentData, ExtendedSoundParamBlock, and ExtendedScheduledSoundHeader}
- const
- kExtendedSoundSampleCountNotValid = 1 shl 0; { set if sampleCount of SoundComponentData isn't meaningful; use buffer size instead}
- kExtendedSoundBufferSizeValid = 1 shl 1; { set if bufferSize field is valid}
- kExtendedSoundFrameSizesValid = 1 shl 2; { set if frameSizesArray is valid (will be nil if all sizes are common and kExtendedSoundCommonFrameSizeValid is set}
- kExtendedSoundCommonFrameSizeValid = 1 shl 3; { set if all audio frames have the same size and the commonFrameSize field is valid}
- kExtendedSoundExtensionsValid = 1 shl 4; { set if pointer to extensions array is valid}
- kExtendedSoundBufferFlagsValid = 1 shl 5; { set if buffer flags field is valid}
- { flags passed in bufferFlags/bufferFlagsMask extended fields if kExtendedSoundBufferFlagsValid extended flag is set}
- const
- kExtendedSoundBufferIsDiscontinuous = 1 shl 0; { buffer is discontinuous with previous buffer}
- kExtendedSoundBufferIsFirstBuffer = 1 shl 1; { buffer is first buffer}
- {
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- typedefs
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- }
- type
- SndCommandPtr = ^SndCommand;
- SndCommand = record
- cmd: UInt16;
- param1: SInt16;
- param2: SIGNEDLONG;
- end;
- type
- SndChannelPtr = ^SndChannel;
- SndCallBackProcPtr = procedure( chan: SndChannelPtr; var cmd: SndCommand );
- SndCallBackUPP = SndCallBackProcPtr;
- SndChannel = record
- nextChan: SndChannelPtr;
- firstMod: Ptr; { reserved for the Sound Manager }
- callBack: SndCallBackUPP;
- userInfo: SIGNEDLONG;
- wait: SIGNEDLONG; { The following is for internal Sound Manager use only.}
- cmdInProgress: SndCommand;
- flags: SInt16;
- qLength: SInt16;
- qHead: SInt16;
- qTail: SInt16;
- queue: array [0..127] of SndCommand;
- end;
- {
- * NewSndCallBackUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewSndCallBackUPP( userRoutine: SndCallBackProcPtr ): SndCallBackUPP; external name '_NewSndCallBackUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * DisposeSndCallBackUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeSndCallBackUPP( userUPP: SndCallBackUPP ); external name '_DisposeSndCallBackUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * InvokeSndCallBackUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokeSndCallBackUPP( chan: SndChannelPtr; var cmd: SndCommand; userUPP: SndCallBackUPP ); external name '_InvokeSndCallBackUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {MACE structures}
- type
- StateBlock = record
- stateVar: array [0..63] of SInt16;
- end;
- StateBlockPtr = ^StateBlock;
- type
- LeftOverBlock = record
- count: UNSIGNEDLONG;
- sampleArea: array [0..31] of SInt8;
- end;
- LeftOverBlockPtr = ^LeftOverBlock;
- type
- ModRef = record
- modNumber: UInt16;
- modInit: SIGNEDLONG;
- end;
- type
- SndListResourcePtr = ^SndListResource;
- SndListResource = record
- format: SInt16;
- numModifiers: SInt16;
- modifierPart: array [0..0] of ModRef;
- numCommands: SInt16;
- commandPart: array [0..0] of SndCommand;
- dataPart: UInt8;
- end;
- type
- SndListPtr = SndListResourcePtr;
- SndListHandle = ^SndListPtr;
- SndListHndl = SndListHandle;
- {HyperCard sound resource format}
- type
- Snd2ListResourcePtr = ^Snd2ListResource;
- Snd2ListResource = record
- format: SInt16;
- refCount: SInt16;
- numCommands: SInt16;
- commandPart: array [0..0] of SndCommand;
- dataPart: UInt8;
- end;
- type
- Snd2ListPtr = Snd2ListResourcePtr;
- Snd2ListHandle = ^Snd2ListPtr;
- Snd2ListHndl = Snd2ListHandle;
- SoundHeader = record
- samplePtr: Ptr; {if NIL then samples are in sampleArea}
- length: UNSIGNEDLONG; {length of sound in bytes}
- sampleRate: UnsignedFixed; {sample rate for this sound}
- loopStart: UNSIGNEDLONG; {start of looping portion}
- loopEnd: UNSIGNEDLONG; {end of looping portion}
- encode: UInt8; {header encoding}
- baseFrequency: UInt8; {baseFrequency value}
- sampleArea: array [0..0] of UInt8; {space for when samples follow directly}
- pad: UInt8;
- end;
- SoundHeaderPtr = ^SoundHeader;
- type
- CmpSoundHeader = record
- samplePtr: Ptr; {if nil then samples are in sample area}
- numChannels: UNSIGNEDLONG; {number of channels i.e. mono = 1}
- sampleRate: UnsignedFixed; {sample rate in Apples Fixed point representation}
- loopStart: UNSIGNEDLONG; {loopStart of sound before compression}
- loopEnd: UNSIGNEDLONG; {loopEnd of sound before compression}
- encode: UInt8; {data structure used , stdSH, extSH, or cmpSH}
- baseFrequency: UInt8; {same meaning as regular SoundHeader}
- numFrames: UNSIGNEDLONG; {length in frames ( packetFrames or sampleFrames )}
- AIFFSampleRate: extended80; {IEEE sample rate}
- markerChunk: Ptr; {sync track}
- format: OSType; {data format type, was futureUse1}
- futureUse2: UNSIGNEDLONG; {reserved by Apple}
- stateVars: StateBlockPtr; {pointer to State Block}
- leftOverSamples: LeftOverBlockPtr; {used to save truncated samples between compression calls}
- compressionID: SInt16; {0 means no compression, non zero means compressionID}
- packetSize: UInt16; {number of bits in compressed sample packet}
- snthID: UInt16; {resource ID of Sound Manager snth that contains NRT C/E}
- sampleSize: UInt16; {number of bits in non-compressed sample}
- sampleArea: array [0..0] of UInt8; {space for when samples follow directly}
- pad: UInt8;
- end;
- CmpSoundHeaderPtr = ^CmpSoundHeader;
- type
- ExtSoundHeader = record
- samplePtr: Ptr; {if nil then samples are in sample area}
- numChannels: UNSIGNEDLONG; {number of channels, ie mono = 1}
- sampleRate: UnsignedFixed; {sample rate in Apples Fixed point representation}
- loopStart: UNSIGNEDLONG; {same meaning as regular SoundHeader}
- loopEnd: UNSIGNEDLONG; {same meaning as regular SoundHeader}
- encode: UInt8; {data structure used , stdSH, extSH, or cmpSH}
- baseFrequency: UInt8; {same meaning as regular SoundHeader}
- numFrames: UNSIGNEDLONG; {length in total number of frames}
- AIFFSampleRate: extended80; {IEEE sample rate}
- markerChunk: Ptr; {sync track}
- instrumentChunks: Ptr; {AIFF instrument chunks}
- AESRecording: Ptr;
- sampleSize: UInt16; {number of bits in sample}
- futureUse1: UInt16; {reserved by Apple}
- futureUse2: UNSIGNEDLONG; {reserved by Apple}
- futureUse3: UNSIGNEDLONG; {reserved by Apple}
- futureUse4: UNSIGNEDLONG; {reserved by Apple}
- sampleArea: array [0..0] of UInt8; {space for when samples follow directly}
- pad: UInt8;
- end;
- ExtSoundHeaderPtr = ^ExtSoundHeader;
- type
- SoundHeaderUnionPtr = ^SoundHeaderUnion;
- SoundHeaderUnion = record
- case SInt16 of
- 0: (
- stdHeader: SoundHeader;
- );
- 1: (
- cmpHeader: CmpSoundHeader;
- );
- 2: (
- extHeader: ExtSoundHeader;
- );
- end;
- ConversionBlock = record
- destination: SInt16;
- unused: SInt16;
- inputPtr: CmpSoundHeaderPtr;
- outputPtr: CmpSoundHeaderPtr;
- end;
- ConversionBlockPtr = ^ConversionBlock;
- { ScheduledSoundHeader flags}
- const
- kScheduledSoundDoScheduled = 1 shl 0;
- kScheduledSoundDoCallBack = 1 shl 1;
- kScheduledSoundExtendedHdr = 1 shl 2;
- type
- ScheduledSoundHeader = record
- u: SoundHeaderUnion;
- flags: SIGNEDLONG;
- reserved: SInt16;
- callBackParam1: SInt16;
- callBackParam2: SIGNEDLONG;
- startTime: TimeRecord;
- end;
- ScheduledSoundHeaderPtr = ^ScheduledSoundHeader;
- type
- ExtendedScheduledSoundHeader = record
- u: SoundHeaderUnion;
- flags: SIGNEDLONG;
- reserved: SInt16;
- callBackParam1: SInt16;
- callBackParam2: SIGNEDLONG;
- startTime: TimeRecord;
- recordSize: SIGNEDLONG;
- extendedFlags: SIGNEDLONG;
- bufferSize: SIGNEDLONG;
- frameCount: SIGNEDLONG; { number of audio frames}
- frameSizesArray: SIGNEDLONGPtr; { pointer to array of longs with frame sizes in bytes}
- commonFrameSize: SIGNEDLONG; { size of each frame if common}
- extensionsPtr: UnivPtr; {pointer to set of classic atoms (size,type,data,...)}
- extensionsSize: SIGNEDLONG; {size of extensions data (extensionsPtr)}
- bufferFlags: UNSIGNEDLONG; {set or cleared flags}
- bufferFlagsMask: UNSIGNEDLONG; {which flags are valid}
- end;
- ExtendedScheduledSoundHeaderPtr = ^ExtendedScheduledSoundHeader;
- type
- SMStatus = record
- smMaxCPULoad: SInt16;
- smNumChannels: SInt16;
- smCurCPULoad: SInt16;
- end;
- SMStatusPtr = ^SMStatus;
- type
- SCStatus = record
- scStartTime: UnsignedFixed;
- scEndTime: UnsignedFixed;
- scCurrentTime: UnsignedFixed;
- scChannelBusy: Boolean;
- scChannelDisposed: Boolean;
- scChannelPaused: Boolean;
- scUnused: Boolean;
- scChannelAttributes: UNSIGNEDLONG;
- scCPULoad: SIGNEDLONG;
- end;
- SCStatusPtr = ^SCStatus;
- type
- AudioSelection = record
- unitType: SIGNEDLONG;
- selStart: UnsignedFixed;
- selEnd: UnsignedFixed;
- end;
- AudioSelectionPtr = ^AudioSelection;
- {$ifc CALL_NOT_IN_CARBON}
- type
- SndDoubleBuffer = record
- dbNumFrames: SIGNEDLONG;
- dbFlags: SIGNEDLONG;
- dbUserInfo: array [0..1] of SInt32;
- dbSoundData: array [0..0] of SInt8;
- end;
- SndDoubleBufferPtr = ^SndDoubleBuffer;
- type
- SndDoubleBackProcPtr = procedure( channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr );
- SndDoubleBackUPP = SndDoubleBackProcPtr;
- {
- * NewSndDoubleBackUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- {
- * DisposeSndDoubleBackUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- {
- * InvokeSndDoubleBackUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- type
- SndDoubleBufferHeader = record
- dbhNumChannels: SInt16;
- dbhSampleSize: SInt16;
- dbhCompressionID: SInt16;
- dbhPacketSize: SInt16;
- dbhSampleRate: UnsignedFixed;
- dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
- dbhDoubleBack: SndDoubleBackUPP;
- end;
- SndDoubleBufferHeaderPtr = ^SndDoubleBufferHeader;
- type
- SndDoubleBufferHeader2 = record
- dbhNumChannels: SInt16;
- dbhSampleSize: SInt16;
- dbhCompressionID: SInt16;
- dbhPacketSize: SInt16;
- dbhSampleRate: UnsignedFixed;
- dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
- dbhDoubleBack: SndDoubleBackUPP;
- dbhFormat: OSType;
- end;
- SndDoubleBufferHeader2Ptr = ^SndDoubleBufferHeader2;
- {$endc} {CALL_NOT_IN_CARBON}
- type
- SoundInfoList = record
- count: SInt16;
- infoHandle: Handle;
- end;
- SoundInfoListPtr = ^SoundInfoList;
- type
- SoundComponentData = record
- flags: SIGNEDLONG;
- format: OSType;
- numChannels: SInt16;
- sampleSize: SInt16;
- sampleRate: UnsignedFixed;
- sampleCount: SIGNEDLONG;
- buffer: BytePtr;
- reserved: SIGNEDLONG;
- end;
- SoundComponentDataPtr = ^SoundComponentData;
- type
- ExtendedSoundComponentData = record
- desc: SoundComponentData; {description of sound buffer}
- recordSize: SIGNEDLONG; {size of this record in bytes}
- extendedFlags: SIGNEDLONG; {flags for extended record}
- bufferSize: SIGNEDLONG; {size of buffer in bytes}
- frameCount: SIGNEDLONG; {number of audio frames}
- frameSizesArray: SIGNEDLONGPtr; {pointer to array of longs with frame sizes in bytes}
- commonFrameSize: SIGNEDLONG; {size of each frame if common}
- extensionsPtr: UnivPtr; {pointer to set of classic atoms (size,type,data,...)}
- extensionsSize: SIGNEDLONG; {size of extensions data (extensionsPtr)}
- bufferFlags: UNSIGNEDLONG; {set or cleared flags}
- bufferFlagsMask: UNSIGNEDLONG; {which flags are valid}
- end;
- ExtendedSoundComponentDataPtr = ^ExtendedSoundComponentData;
- type
- SoundParamBlockPtr = ^SoundParamBlock;
- SoundParamProcPtr = function( var pb: SoundParamBlockPtr ): Boolean;
- SoundParamUPP = SoundParamProcPtr;
- SoundParamBlock = record
- recordSize: SIGNEDLONG; {size of this record in bytes}
- desc: SoundComponentData; {description of sound buffer}
- rateMultiplier: UnsignedFixed; {rate multiplier to apply to sound}
- leftVolume: SInt16; {volumes to apply to sound}
- rightVolume: SInt16;
- quality: SIGNEDLONG; {quality to apply to sound}
- filter: ComponentInstance; {filter to apply to sound}
- moreRtn: SoundParamUPP; {routine to call to get more data}
- completionRtn: SoundParamUPP; {routine to call when buffer is complete}
- refCon: SIGNEDLONG; {user refcon}
- result: SInt16; {result}
- end;
- type
- ExtendedSoundParamBlock = record
- pb: SoundParamBlock; {classic SoundParamBlock except recordSize == sizeof(ExtendedSoundParamBlock)}
- reserved: SInt16;
- extendedFlags: SIGNEDLONG; {flags}
- bufferSize: SIGNEDLONG; {size of buffer in bytes}
- frameCount: SIGNEDLONG; {number of audio frames}
- frameSizesArray: SIGNEDLONGPtr; {pointer to array of longs with frame sizes in bytes}
- commonFrameSize: SIGNEDLONG; {size of each frame if common}
- extensionsPtr: UnivPtr; {pointer to set of classic atoms (size,type,data,...)}
- extensionsSize: SIGNEDLONG; {size of extensions data (extensionsPtr)}
- bufferFlags: UNSIGNEDLONG; {set or cleared flags}
- bufferFlagsMask: UNSIGNEDLONG; {which flags are valid}
- end;
- ExtendedSoundParamBlockPtr = ^ExtendedSoundParamBlock;
- type
- CompressionInfo = record
- recordSize: SIGNEDLONG;
- format: OSType;
- compressionID: SInt16;
- samplesPerPacket: UInt16;
- bytesPerPacket: UInt16;
- bytesPerFrame: UInt16;
- bytesPerSample: UInt16;
- futureUse1: UInt16;
- end;
- CompressionInfoPtr = ^CompressionInfo;
- type
- CompressionInfoHandle = ^CompressionInfoPtr;
- {variables for floating point conversion}
- type
- SoundSlopeAndInterceptRecordPtr = ^SoundSlopeAndInterceptRecord;
- SoundSlopeAndInterceptRecord = record
- slope: Float64;
- intercept: Float64;
- minClip: Float64;
- maxClip: Float64;
- end;
- type
- SoundSlopeAndInterceptPtr = SoundSlopeAndInterceptRecordPtr;
- {private thing to use as a reference to a Sound Converter}
- type
- SoundConverter = ^OpaqueSoundConverter; { an opaque type }
- OpaqueSoundConverter = record end;
- SoundConverterPtr = ^SoundConverter; { when a var xx:SoundConverter parameter can be nil, it is changed to xx: SoundConverterPtr }
- {callback routine to provide data to the Sound Converter}
- type
- SoundConverterFillBufferDataProcPtr = function( var data: SoundComponentDataPtr; refCon: UnivPtr ): Boolean;
- SoundConverterFillBufferDataUPP = SoundConverterFillBufferDataProcPtr;
- {private thing to use as a reference to a Sound Source}
- type
- SoundSource = ^OpaqueSoundSource; { an opaque type }
- OpaqueSoundSource = record end;
- SoundSourcePtr = ^SoundSource;
- type
- SoundComponentLink = record
- description: ComponentDescription; {Describes the sound component}
- mixerID: SoundSource; {Reserved by Apple}
- linkID: SoundSourcePtr; {Reserved by Apple}
- end;
- SoundComponentLinkPtr = ^SoundComponentLink;
- type
- AudioInfo = record
- capabilitiesFlags: SIGNEDLONG; {Describes device capabilities}
- reserved: SIGNEDLONG; {Reserved by Apple}
- numVolumeSteps: UInt16; {Number of significant increments between min and max volume}
- end;
- AudioInfoPtr = ^AudioInfo;
- type
- AudioFormatAtom = record
- size: SIGNEDLONG; { = sizeof(AudioFormatAtom)}
- atomType: OSType; { = kAudioFormatAtomType}
- format: OSType;
- end;
- AudioFormatAtomPtr = ^AudioFormatAtom;
- type
- AudioEndianAtom = record
- size: SIGNEDLONG; { = sizeof(AudioEndianAtom)}
- atomType: OSType; { = kAudioEndianAtomType}
- littleEndian: SInt16;
- end;
- AudioEndianAtomPtr = ^AudioEndianAtom;
- type
- AudioTerminatorAtom = record
- size: SIGNEDLONG; { = sizeof(AudioTerminatorAtom)}
- atomType: OSType; { = kAudioTerminatorAtomType}
- end;
- AudioTerminatorAtomPtr = ^AudioTerminatorAtom;
- type
- LevelMeterInfo = record
- numChannels: SInt16; { mono or stereo source}
- leftMeter: UInt8; { 0-255 range}
- rightMeter: UInt8; { 0-255 range}
- end;
- LevelMeterInfoPtr = ^LevelMeterInfo;
- type
- EQSpectrumBandsRecord = record
- count: SInt16;
- frequency: UnsignedFixedPtr; { pointer to array of frequencies}
- end;
- EQSpectrumBandsRecordPtr = ^EQSpectrumBandsRecord;
- const
- kSoundAudioCodecPropertyWritableFlag = 1 shl 0;
- type
- SoundAudioCodecPropertyRequestParams = record
- propertyClass: UInt32;
- propertyID: UInt32;
- propertyDataSize: UInt32; { out -- GetPropertyInfo, in/out -- GetProperty, in -- SetProperty}
- propertyData: UnivPtr; { in -- GetPropertyInfo, GetProperty, SetProperty}
- propertyRequestFlags: UInt32; { out -- GetPropertyInfo}
- propertyDataType: UInt32; { out -- GetPropertyInfo, often 0}
- propertyRequestResult: ComponentResult; { out -- GetPropertyInfo, GetProperty, SetProperty}
- end;
- { Sound Input Structures}
- type
- SPBPtr = ^SPB;
- {user procedures called by sound input routines}
- SIInterruptProcPtr = procedure( inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SIGNEDLONG );
- SICompletionProcPtr = procedure( inParamPtr: SPBPtr );
- SIInterruptUPP = SIInterruptProcPtr;
- SICompletionUPP = SICompletionProcPtr;
- {Sound Input Parameter Block}
- SPB = record
- inRefNum: SIGNEDLONG; {reference number of sound input device}
- count: UNSIGNEDLONG; {number of bytes to record}
- milliseconds: UNSIGNEDLONG; {number of milliseconds to record}
- bufferLength: UNSIGNEDLONG; {length of buffer in bytes}
- bufferPtr: Ptr; {buffer to store sound data in}
- completionRoutine: SICompletionUPP; {completion routine}
- interruptRoutine: SIInterruptUPP; {interrupt routine}
- userLong: SIGNEDLONG; {user-defined field}
- error: OSErr; {error}
- unused1: SIGNEDLONG; {reserved - must be zero}
- end;
- {
- * NewSoundParamUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewSoundParamUPP( userRoutine: SoundParamProcPtr ): SoundParamUPP; external name '_NewSoundParamUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * NewSoundConverterFillBufferDataUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewSoundConverterFillBufferDataUPP( userRoutine: SoundConverterFillBufferDataProcPtr ): SoundConverterFillBufferDataUPP; external name '_NewSoundConverterFillBufferDataUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * NewSIInterruptUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewSIInterruptUPP( userRoutine: SIInterruptProcPtr ): SIInterruptUPP; external name '_NewSIInterruptUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * NewSICompletionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewSICompletionUPP( userRoutine: SICompletionProcPtr ): SICompletionUPP; external name '_NewSICompletionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * DisposeSoundParamUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeSoundParamUPP( userUPP: SoundParamUPP ); external name '_DisposeSoundParamUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * DisposeSoundConverterFillBufferDataUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeSoundConverterFillBufferDataUPP( userUPP: SoundConverterFillBufferDataUPP ); external name '_DisposeSoundConverterFillBufferDataUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * DisposeSIInterruptUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeSIInterruptUPP( userUPP: SIInterruptUPP ); external name '_DisposeSIInterruptUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * DisposeSICompletionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeSICompletionUPP( userUPP: SICompletionUPP ); external name '_DisposeSICompletionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * InvokeSoundParamUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeSoundParamUPP( var pb: SoundParamBlockPtr; userUPP: SoundParamUPP ): Boolean; external name '_InvokeSoundParamUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * InvokeSoundConverterFillBufferDataUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeSoundConverterFillBufferDataUPP( var data: SoundComponentDataPtr; refCon: UnivPtr; userUPP: SoundConverterFillBufferDataUPP ): Boolean; external name '_InvokeSoundConverterFillBufferDataUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * InvokeSIInterruptUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokeSIInterruptUPP( inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SIGNEDLONG; userUPP: SIInterruptUPP ); external name '_InvokeSIInterruptUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * InvokeSICompletionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokeSICompletionUPP( inParamPtr: SPBPtr; userUPP: SICompletionUPP ); external name '_InvokeSICompletionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- type
- FilePlayCompletionProcPtr = procedure( chan: SndChannelPtr );
- FilePlayCompletionUPP = FilePlayCompletionProcPtr;
- {
- * NewFilePlayCompletionUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- {
- * DisposeFilePlayCompletionUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- {
- * InvokeFilePlayCompletionUPP()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: available as macro/inline
- }
- {
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- prototypes
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- }
- { Sound Manager routines }
- {$ifc not TARGET_CPU_64}
- {
- * SysBeep() *** DEPRECATED ***
- *
- * Deprecated:
- * Use AudioServicesPlayAlertSound(). Found in
- * AudioToolbox/AudioServices.h
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SysBeep( duration: SInt16 ); external name '_SysBeep';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndDoCommand() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndDoCommand( chan: SndChannelPtr; const (*var*) cmd: SndCommand; noWait: Boolean ): OSErr; external name '_SndDoCommand';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndDoImmediate() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndDoImmediate( chan: SndChannelPtr; const (*var*) cmd: SndCommand ): OSErr; external name '_SndDoImmediate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndNewChannel() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndNewChannel( var chan: SndChannelPtr; synth: SInt16; init: SIGNEDLONG; userRoutine: SndCallBackUPP ): OSErr; external name '_SndNewChannel';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndDisposeChannel() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndDisposeChannel( chan: SndChannelPtr; quietNow: Boolean ): OSErr; external name '_SndDisposeChannel';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndPlay() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndPlay( chan: SndChannelPtr; sndHandle: SndListHandle; async: Boolean ): OSErr; external name '_SndPlay';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {$ifc OLDROUTINENAMES}
- {
- * SndAddModifier()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {$endc} {OLDROUTINENAMES}
- {
- * SndControl()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- { Sound Manager 2.0 and later, uses _SoundDispatch }
- {$ifc not TARGET_CPU_64}
- {
- * SndSoundManagerVersion() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndSoundManagerVersion: NumVersion; external name '_SndSoundManagerVersion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {
- * SndStartFilePlay()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * SndPauseFilePlay()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * SndStopFilePlay()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {$ifc not TARGET_CPU_64}
- {
- * SndChannelStatus() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndChannelStatus( chan: SndChannelPtr; theLength: SInt16; theStatus: SCStatusPtr ): OSErr; external name '_SndChannelStatus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndManagerStatus() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndManagerStatus( theLength: SInt16; theStatus: SMStatusPtr ): OSErr; external name '_SndManagerStatus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndGetSysBeepState() *** DEPRECATED ***
- *
- * Deprecated:
- * SysBeep related APIs have been replaced by AudioServices. Found
- * in AudioToolbox/AudioServices.h
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SndGetSysBeepState( var sysBeepState: SInt16 ); external name '_SndGetSysBeepState';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndSetSysBeepState() *** DEPRECATED ***
- *
- * Deprecated:
- * SysBeep related APIs have been replaced by AudioServices. Found
- * in AudioToolbox/AudioServices.h
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndSetSysBeepState( sysBeepState: SInt16 ): OSErr; external name '_SndSetSysBeepState';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {
- * SndPlayDoubleBuffer()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- { MACE compression routines, uses _SoundDispatch }
- {
- * MACEVersion()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * Comp3to1()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * Exp1to3()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * Comp6to1()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * Exp1to6()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- { Sound Manager 3.0 and later calls, uses _SoundDispatch }
- {$ifc not TARGET_CPU_64}
- {
- * GetSysBeepVolume() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetSysBeepVolume( var level: SIGNEDLONG ): OSErr; external name '_GetSysBeepVolume';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetSysBeepVolume() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SetSysBeepVolume( level: SIGNEDLONG ): OSErr; external name '_SetSysBeepVolume';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * GetDefaultOutputVolume() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetDefaultOutputVolume( var level: SIGNEDLONG ): OSErr; external name '_GetDefaultOutputVolume';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetDefaultOutputVolume() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SetDefaultOutputVolume( level: SIGNEDLONG ): OSErr; external name '_SetDefaultOutputVolume';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * GetSoundHeaderOffset() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetSoundHeaderOffset( sndHandle: SndListHandle; var offset: SIGNEDLONG ): OSErr; external name '_GetSoundHeaderOffset';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {
- * UnsignedFixedMulDiv()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- (*
- function UnsignedFixedMulDiv( value: UnsignedFixed; multiplier: UnsignedFixed; divisor: UnsignedFixed ): UnsignedFixed; external name '_UnsignedFixedMulDiv';
- Duplicated in FixMath.h, also strange that it's included here without availability info.
- *)
- {$ifc not TARGET_CPU_64}
- {
- * GetCompressionInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function GetCompressionInfo( compressionID: SInt16; format: OSType; numChannels: SInt16; sampleSize: SInt16; cp: CompressionInfoPtr ): OSErr; external name '_GetCompressionInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetSoundPreference() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SetSoundPreference( theType: OSType; var name: Str255; settings: Handle ): OSErr; external name '_SetSoundPreference';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * GetSoundPreference() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function GetSoundPreference( theType: OSType; var name: Str255; settings: Handle ): OSErr; external name '_GetSoundPreference';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * OpenMixerSoundComponent() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function OpenMixerSoundComponent( outputDescription: SoundComponentDataPtr; outputFlags: SIGNEDLONG; var mixerComponent: ComponentInstance ): OSErr; external name '_OpenMixerSoundComponent';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * CloseMixerSoundComponent() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function CloseMixerSoundComponent( ci: ComponentInstance ): OSErr; external name '_CloseMixerSoundComponent';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { Sound Manager 3.1 and later calls, uses _SoundDispatch }
- {
- * SndGetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.1 and later
- }
- function SndGetInfo( chan: SndChannelPtr; selector: OSType; infoPtr: UnivPtr ): OSErr; external name '_SndGetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndSetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.1 and later
- }
- function SndSetInfo( chan: SndChannelPtr; selector: OSType; infoPtr: {const} UnivPtr ): OSErr; external name '_SndSetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * GetSoundOutputInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.1 and later
- }
- function GetSoundOutputInfo( outputDevice: Component; selector: OSType; infoPtr: UnivPtr ): OSErr; external name '_GetSoundOutputInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetSoundOutputInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.1 and later
- }
- function SetSoundOutputInfo( outputDevice: Component; selector: OSType; infoPtr: {const} UnivPtr ): OSErr; external name '_SetSoundOutputInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { Sound Manager 3.2 and later calls, uses _SoundDispatch }
- {
- * GetCompressionName() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function GetCompressionName( compressionType: OSType; var compressionName: Str255 ): OSErr; external name '_GetCompressionName';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterOpen() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterOpen( const (*var*) inputFormat: SoundComponentData; const (*var*) outputFormat: SoundComponentData; var sc: SoundConverter ): OSErr; external name '_SoundConverterOpen';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterClose() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterClose( sc: SoundConverter ): OSErr; external name '_SoundConverterClose';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterGetBufferSizes() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterGetBufferSizes( sc: SoundConverter; inputBytesTarget: UNSIGNEDLONG; var inputFrames: UNSIGNEDLONG; var inputBytes: UNSIGNEDLONG; var outputBytes: UNSIGNEDLONG ): OSErr; external name '_SoundConverterGetBufferSizes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterBeginConversion() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterBeginConversion( sc: SoundConverter ): OSErr; external name '_SoundConverterBeginConversion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterConvertBuffer() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterConvertBuffer( sc: SoundConverter; inputPtr: {const} UnivPtr; inputFrames: UNSIGNEDLONG; outputPtr: UnivPtr; var outputFrames: UNSIGNEDLONG; var outputBytes: UNSIGNEDLONG ): OSErr; external name '_SoundConverterConvertBuffer';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterEndConversion() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.2 and later
- }
- function SoundConverterEndConversion( sc: SoundConverter; outputPtr: UnivPtr; var outputFrames: UNSIGNEDLONG; var outputBytes: UNSIGNEDLONG ): OSErr; external name '_SoundConverterEndConversion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { Sound Manager 3.3 and later calls, uses _SoundDispatch }
- {
- * SoundConverterGetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.3 and later
- }
- function SoundConverterGetInfo( sc: SoundConverter; selector: OSType; infoPtr: UnivPtr ): OSErr; external name '_SoundConverterGetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundConverterSetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.3 and later
- }
- function SoundConverterSetInfo( sc: SoundConverter; selector: OSType; infoPtr: UnivPtr ): OSErr; external name '_SoundConverterSetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { Sound Manager 3.6 and later calls, uses _SoundDispatch }
- {
- * SoundConverterFillBuffer() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in SoundLib 3.6 and later
- }
- 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';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundManagerGetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in SoundLib 3.6 and later
- }
- function SoundManagerGetInfo( selector: OSType; infoPtr: UnivPtr ): OSErr; external name '_SoundManagerGetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundManagerSetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in SoundLib 3.6 and later
- }
- function SoundManagerSetInfo( selector: OSType; infoPtr: {const} UnivPtr ): OSErr; external name '_SoundManagerSetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- Sound Component Functions
- basic sound component functions
- }
- {
- * SoundComponentInitOutputDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentInitOutputDevice( ti: ComponentInstance; actions: SIGNEDLONG ): ComponentResult; external name '_SoundComponentInitOutputDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentSetSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentSetSource( ti: ComponentInstance; sourceID: SoundSource; source: ComponentInstance ): ComponentResult; external name '_SoundComponentSetSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentGetSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentGetSource( ti: ComponentInstance; sourceID: SoundSource; var source: ComponentInstance ): ComponentResult; external name '_SoundComponentGetSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentGetSourceData() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentGetSourceData( ti: ComponentInstance; var sourceData: SoundComponentDataPtr ): ComponentResult; external name '_SoundComponentGetSourceData';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentSetOutput() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentSetOutput( ti: ComponentInstance; requested: SoundComponentDataPtr; var actual: SoundComponentDataPtr ): ComponentResult; external name '_SoundComponentSetOutput';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { junction methods for the mixer, must be called at non-interrupt level}
- {
- * SoundComponentAddSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentAddSource( ti: ComponentInstance; var sourceID: SoundSource ): ComponentResult; external name '_SoundComponentAddSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentRemoveSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentRemoveSource( ti: ComponentInstance; sourceID: SoundSource ): ComponentResult; external name '_SoundComponentRemoveSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { info methods}
- {
- * SoundComponentGetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentGetInfo( ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr ): ComponentResult; external name '_SoundComponentGetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentSetInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentSetInfo( ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr ): ComponentResult; external name '_SoundComponentSetInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { control methods}
- {
- * SoundComponentStartSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentStartSource( ti: ComponentInstance; count: SInt16; var sources: SoundSource ): ComponentResult; external name '_SoundComponentStartSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentStopSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentStopSource( ti: ComponentInstance; count: SInt16; var sources: SoundSource ): ComponentResult; external name '_SoundComponentStopSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentPauseSource() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentPauseSource( ti: ComponentInstance; count: SInt16; var sources: SoundSource ): ComponentResult; external name '_SoundComponentPauseSource';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SoundComponentPlaySourceBuffer() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function SoundComponentPlaySourceBuffer( ti: ComponentInstance; sourceID: SoundSource; pb: SoundParamBlockPtr; actions: SIGNEDLONG ): ComponentResult; external name '_SoundComponentPlaySourceBuffer';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- { selectors for component calls }
- const
- kSoundComponentInitOutputDeviceSelect = $0001;
- kSoundComponentSetSourceSelect = $0002;
- kSoundComponentGetSourceSelect = $0003;
- kSoundComponentGetSourceDataSelect = $0004;
- kSoundComponentSetOutputSelect = $0005;
- kSoundComponentAddSourceSelect = $0101;
- kSoundComponentRemoveSourceSelect = $0102;
- kSoundComponentGetInfoSelect = $0103;
- kSoundComponentSetInfoSelect = $0104;
- kSoundComponentStartSourceSelect = $0105;
- kSoundComponentStopSourceSelect = $0106;
- kSoundComponentPauseSourceSelect = $0107;
- kSoundComponentPlaySourceBufferSelect = $0108;
- {Audio Components}
- {Volume is described as a value between 0 and 1, with 0 indicating minimum
- volume and 1 indicating maximum volume; if the device doesn't support
- software control of volume, then a value of unimpErr is returned, indicating
- that these functions are not supported by the device
- }
- {
- * AudioGetVolume()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioSetVolume()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {If the device doesn't support software control of mute, then a value of unimpErr is
- returned, indicating that these functions are not supported by the device.}
- {
- * AudioGetMute()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioSetMute()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {AudioSetToDefaults causes the associated device to reset its volume and mute values
- (and perhaps other characteristics, e.g. attenuation) to "factory default" settings}
- {
- * AudioSetToDefaults()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {This routine is required; it must be implemented by all audio components}
- {
- * AudioGetInfo()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioGetBass()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioSetBass()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioGetTreble()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioSetTreble()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {
- * AudioGetOutputDevice()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- {This is routine is private to the AudioVision component. It enables the watching of the mute key.}
- {
- * AudioMuteOnEvent()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- const
- kDelegatedSoundComponentSelectors = $0100;
- { Sound Input Manager routines, uses _SoundDispatch }
- {$ifc not TARGET_CPU_64}
- {
- * SPBVersion() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBVersion: NumVersion; external name '_SPBVersion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndRecord() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SndRecord( filterProc: ModalFilterUPP; corner: Point; quality: OSType; var sndHandle: SndListHandle ): OSErr; external name '_SndRecord';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {
- * SndRecordToFile()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {$ifc not TARGET_CPU_64}
- {
- * SPBSignInDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBSignInDevice( deviceRefNum: SInt16; const (*var*) deviceName: Str255 ): OSErr; external name '_SPBSignInDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBSignOutDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBSignOutDevice( deviceRefNum: SInt16 ): OSErr; external name '_SPBSignOutDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBGetIndexedDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBGetIndexedDevice( count: SInt16; var deviceName: Str255; var deviceIconHandle: Handle ): OSErr; external name '_SPBGetIndexedDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBOpenDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBOpenDevice( const (*var*) deviceName: Str255; permission: SInt16; var inRefNum: SIGNEDLONG ): OSErr; external name '_SPBOpenDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBCloseDevice() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBCloseDevice( inRefNum: SIGNEDLONG ): OSErr; external name '_SPBCloseDevice';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBRecord() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBRecord( inParamPtr: SPBPtr; asynchFlag: Boolean ): OSErr; external name '_SPBRecord';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {
- * SPBRecordToFile()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {$ifc not TARGET_CPU_64}
- {
- * SPBPauseRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBPauseRecording( inRefNum: SIGNEDLONG ): OSErr; external name '_SPBPauseRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBResumeRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBResumeRecording( inRefNum: SIGNEDLONG ): OSErr; external name '_SPBResumeRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBStopRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBStopRecording( inRefNum: SIGNEDLONG ): OSErr; external name '_SPBStopRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBGetRecordingStatus() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- 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';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBGetDeviceInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBGetDeviceInfo( inRefNum: SIGNEDLONG; infoType: OSType; infoData: UnivPtr ): OSErr; external name '_SPBGetDeviceInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBSetDeviceInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBSetDeviceInfo( inRefNum: SIGNEDLONG; infoType: OSType; infoData: UnivPtr ): OSErr; external name '_SPBSetDeviceInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBMillisecondsToBytes() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBMillisecondsToBytes( inRefNum: SIGNEDLONG; var milliseconds: SIGNEDLONG ): OSErr; external name '_SPBMillisecondsToBytes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SPBBytesToMilliseconds() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SPBBytesToMilliseconds( inRefNum: SIGNEDLONG; var byteCount: SIGNEDLONG ): OSErr; external name '_SPBBytesToMilliseconds';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetupSndHeader() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SetupSndHeader( sndHandle: SndListHandle; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; baseNote: SInt16; numBytes: UNSIGNEDLONG; var headerLen: SInt16 ): OSErr; external name '_SetupSndHeader';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SetupAIFFHeader() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function SetupAIFFHeader( fRefNum: SInt16; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; numBytes: UNSIGNEDLONG; numFrames: UNSIGNEDLONG ): OSErr; external name '_SetupAIFFHeader';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- { Sound Input Manager 1.1 and later calls, uses _SoundDispatch }
- {
- * ParseAIFFHeader() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function ParseAIFFHeader( fRefNum: SInt16; var sndInfo: SoundComponentData; var numFrames: UNSIGNEDLONG; var dataOffset: UNSIGNEDLONG ): OSErr; external name '_ParseAIFFHeader';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * ParseSndHeader() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in SoundLib 3.0 and later
- }
- function ParseSndHeader( sndHandle: SndListHandle; var sndInfo: SoundComponentData; var numFrames: UNSIGNEDLONG; var dataOffset: UNSIGNEDLONG ): OSErr; external name '_ParseSndHeader';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- {$ifc TARGET_API_MAC_CARBON}
- { Only to be used if you are writing a sound input component; this }
- { is the param block for a read request from the SoundMgr to the }
- { sound input component. Not to be confused with the SPB struct }
- { above, which is the param block for a read request from an app }
- { to the SoundMgr. }
- type
- SndInputCmpParamPtr = ^SndInputCmpParam;
- SICCompletionProcPtr = procedure( SICParmPtr: SndInputCmpParamPtr );
- SndInputCmpParam = record
- ioCompletion: SICCompletionProcPtr; { completion routine [pointer]}
- ioInterrupt: SIInterruptProcPtr; { interrupt routine [pointer]}
- ioResult: OSErr; { I/O result code [word]}
- pad: SInt16;
- ioReqCount: UNSIGNEDLONG;
- ioActCount: UNSIGNEDLONG;
- ioBuffer: Ptr;
- ioMisc: Ptr;
- end;
- {$ifc not TARGET_CPU_64}
- {
- * SndInputReadAsync() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputReadAsync( self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr ): ComponentResult; external name '_SndInputReadAsync';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputReadSync() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputReadSync( self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr ): ComponentResult; external name '_SndInputReadSync';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputPauseRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputPauseRecording( self: ComponentInstance ): ComponentResult; external name '_SndInputPauseRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputResumeRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputResumeRecording( self: ComponentInstance ): ComponentResult; external name '_SndInputResumeRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputStopRecording() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputStopRecording( self: ComponentInstance ): ComponentResult; external name '_SndInputStopRecording';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputGetStatus() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputGetStatus( self: ComponentInstance; var recordingStatus: SInt16; var totalSamplesToRecord: UNSIGNEDLONG; var numberOfSamplesRecorded: UNSIGNEDLONG ): ComponentResult; external name '_SndInputGetStatus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputGetDeviceInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputGetDeviceInfo( self: ComponentInstance; infoType: OSType; infoData: UnivPtr ): ComponentResult; external name '_SndInputGetDeviceInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputSetDeviceInfo() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputSetDeviceInfo( self: ComponentInstance; infoType: OSType; infoData: UnivPtr ): ComponentResult; external name '_SndInputSetDeviceInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {
- * SndInputInitHardware() *** DEPRECATED ***
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function SndInputInitHardware( self: ComponentInstance ): ComponentResult; external name '_SndInputInitHardware';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
- {$endc} {not TARGET_CPU_64}
- { selectors for component calls }
- const
- kSndInputReadAsyncSelect = $0001;
- kSndInputReadSyncSelect = $0002;
- kSndInputPauseRecordingSelect = $0003;
- kSndInputResumeRecordingSelect = $0004;
- kSndInputStopRecordingSelect = $0005;
- kSndInputGetStatusSelect = $0006;
- kSndInputGetDeviceInfoSelect = $0007;
- kSndInputSetDeviceInfoSelect = $0008;
- kSndInputInitHardwareSelect = $0009;
- {$endc} {TARGET_API_MAC_CARBON}
- {$endc} {not TARGET_CPU_64}
- {$endc} {TARGET_OS_MAC}
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- end.
- {$endc} {not MACOSALLINCLUDE}
|