home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / PInterfaces / Sound.p < prev    next >
Encoding:
Text File  |  1994-11-11  |  19.7 KB  |  583 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Sound.p
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. }
  16.  
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Sound;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __SOUND__}
  27. {$SETC __SOUND__ := 1}
  28.  
  29. {$I+}
  30. {$SETC SoundIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {    ConditionalMacros.p                                            }
  38.  
  39. {$IFC UNDEFINED __MIXEDMODE__}
  40. {$I MixedMode.p}
  41. {$ENDC}
  42.  
  43. {$PUSH}
  44. {$ALIGN MAC68K}
  45. {$LibExport+}
  46. {
  47. Interface for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
  48.  
  49. These items are no longer defined, but appear here so that someone
  50. searching the interfaces might find them. If you are using one of these
  51. items, you must change your code to support the Sound Manager.
  52.  
  53.     swMode, ftMode, ffMode
  54.     FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
  55.     SndCompletionProcPtr
  56.     StartSound, StopSound, SoundDone
  57. }
  58. CONST
  59.     twelfthRootTwo                = 1.05946309434;
  60.     soundListRsrc                = 'snd ';                        {Resource type used by Sound Manager}
  61.     rate44khz                    = $AC440000;                    {44100.00000 in fixed-point}
  62.     rate22050hz                    = $56220000;                    {22050.00000 in fixed-point}
  63.     rate22khz                    = $56EE8BA3;                    {22254.54545 in fixed-point}
  64.     rate11khz                    = $2B7745D1;                    {11127.27273 in fixed-point}
  65.     rate11025hz                    = $2B110000;                    {11025.00000 in fixed-point}
  66. {synthesizer numbers for SndNewChannel}
  67.     squareWaveSynth                = 1;                            {square wave synthesizer}
  68.     waveTableSynth                = 3;                            {wave table synthesizer}
  69.     sampledSynth                = 5;                            {sampled sound synthesizer}
  70. {old Sound Manager MACE synthesizer numbers}
  71.     MACE3snthID                    = 11;
  72.     MACE6snthID                    = 13;
  73.     kMiddleC                    = 60;                            {MIDI note value for middle C}
  74.     kSimpleBeepID                = 1;                            {reserved resource ID for Simple Beep}
  75.     kFullVolume                    = $0100;                        {1.0, setting for full hardware output volume}
  76.     kNoVolume                    = 0;                            {setting for no sound volume}
  77. {command numbers for SndDoCommand and SndDoImmediate}
  78.     nullCmd                        = 0;
  79.     initCmd                        = 1;
  80.     freeCmd                        = 2;
  81.     quietCmd                    = 3;
  82.     flushCmd                    = 4;
  83.     reInitCmd                    = 5;
  84.     waitCmd                        = 10;
  85.     pauseCmd                    = 11;
  86.     resumeCmd                    = 12;
  87.     callBackCmd                    = 13;
  88.  
  89.     syncCmd                        = 14;
  90.     availableCmd                = 24;
  91.     versionCmd                    = 25;
  92.     totalLoadCmd                = 26;
  93.     loadCmd                        = 27;
  94.     freqDurationCmd                = 40;
  95.     restCmd                        = 41;
  96.     freqCmd                        = 42;
  97.     ampCmd                        = 43;
  98.     timbreCmd                    = 44;
  99.     getAmpCmd                    = 45;
  100.     volumeCmd                    = 46;                            {sound manager 3.0 or later only}
  101.     getVolumeCmd                = 47;                            {sound manager 3.0 or later only}
  102.     waveTableCmd                = 60;
  103.     phaseCmd                    = 61;
  104.  
  105.     soundCmd                    = 80;
  106.     bufferCmd                    = 81;
  107.     rateCmd                        = 82;
  108.     continueCmd                    = 83;
  109.     doubleBufferCmd                = 84;
  110.     getRateCmd                    = 85;
  111.     rateMultiplierCmd            = 86;
  112.     getRateMultiplierCmd        = 87;
  113.     sizeCmd                        = 90;
  114.     convertCmd                    = 91;
  115.     stdQLength                    = 128;
  116.     dataOffsetFlag                = $8000;
  117.  
  118. {channel initialization parameters}
  119. {$IFC OLDROUTINENAMES }
  120.     waveInitChannelMask            = $07;
  121.     waveInitChannel0            = $04;                            {wave table only, Sound Manager 2.0 and earlier}
  122.     waveInitChannel1            = $05;                            {wave table only, Sound Manager 2.0 and earlier}
  123.     waveInitChannel2            = $06;                            {wave table only, Sound Manager 2.0 and earlier}
  124.     waveInitChannel3            = $07;                            {wave table only, Sound Manager 2.0 and earlier}
  125.     initChan0                    = waveInitChannel0;                {obsolete spelling}
  126.     initChan1                    = waveInitChannel1;                {obsolete spelling}
  127.     initChan2                    = waveInitChannel2;                {obsolete spelling}
  128.     initChan3                    = waveInitChannel3;                {obsolete spelling}
  129.  
  130. {$ENDC}
  131.     initChanLeft                = $0002;                        {left stereo channel}
  132.     initChanRight                = $0003;                        {right stereo channel}
  133.     initNoInterp                = $0004;                        {no linear interpolation}
  134.     initNoDrop                    = $0008;                        {no drop-sample conversion}
  135.     initMono                    = $0080;                        {monophonic channel}
  136.     initStereo                    = $00C0;                        {stereo channel}
  137.     initMACE3                    = $0300;                        {MACE 3:1}
  138.     initMACE6                    = $0400;                        {MACE 6:1}
  139.     initPanMask                    = $0003;                        {mask for right/left pan values}
  140.     initSRateMask                = $0030;                        {mask for sample rate values}
  141.     initStereoMask                = $00C0;                        {mask for mono/stereo values}
  142.     initCompMask                = $FF00;                        {mask for compression IDs}
  143.     kUseOptionalOutputDevice    = -1;                            {only for Sound Manager 3.0 or later}
  144.     notCompressed                = 0;                            {compression ID's}
  145.     fixedCompression            = -1;                            {compression ID for fixed-sized compression}
  146.     variableCompression            = -2;                            {compression ID for variable-sized compression}
  147.     twoToOne                    = 1;
  148.     eightToThree                = 2;
  149.     threeToOne                    = 3;
  150.     sixToOne                    = 4;
  151.  
  152.     stdSH                        = $00;                            {Standard sound header encode value}
  153.     extSH                        = $FF;                            {Extended sound header encode value}
  154.     cmpSH                        = $FE;                            {Compressed sound header encode value}
  155.  
  156.     outsideCmpSH                = 0;                            {MACE constants}
  157.     insideCmpSH                    = 1;
  158.     aceSuccess                    = 0;
  159.     aceMemFull                    = 1;
  160.     aceNilBlock                    = 2;
  161.     aceBadComp                    = 3;
  162.     aceBadEncode                = 4;
  163.     aceBadDest                    = 5;
  164.     aceBadCmd                    = 6;
  165.     sixToOnePacketSize            = 8;
  166.     threeToOnePacketSize        = 16;
  167.     stateBlockSize                = 64;
  168.     leftOverBlockSize            = 32;
  169.     firstSoundFormat            = $0001;                        {general sound format}
  170.     secondSoundFormat            = $0002;                        {special sampled sound format (HyperCard)}
  171.     dbBufferReady                = $00000001;                    {double buffer is filled}
  172.     dbLastBuffer                = $00000004;                    {last double buffer to play}
  173.     sysBeepDisable                = $0000;                        {SysBeep() enable flags}
  174.     sysBeepEnable                = $0001;
  175.     unitTypeNoSelection            = $FFFF;                        {unitTypes for AudioSelection.unitType}
  176.     unitTypeSeconds                = $0000;
  177.  
  178. { unsigned fixed-point number }
  179.     
  180. TYPE
  181.     UnsignedFixed = LONGINT;
  182.  
  183.     SndCommand = PACKED RECORD
  184.         cmd:                    INTEGER;
  185.         param1:                    INTEGER;
  186.         param2:                    LONGINT;
  187.     END;
  188.     SndChannelPtr = ^SndChannel;
  189.  
  190.     SndCallBackProcPtr = ProcPtr;  { PROCEDURE SndCallBack(chan: SndChannelPtr; VAR cmd: SndCommand); }
  191.     SndCallBackUPP = UniversalProcPtr;
  192.  
  193.     SndChannel = PACKED RECORD
  194.         nextChan:                ^SndChannel;
  195.         firstMod:                Ptr;                                    { reserved for the Sound Manager }
  196.         callBack:                SndCallBackUPP;
  197.         userInfo:                LONGINT;
  198.         wait:                    LONGINT;                                { The following is for internal Sound Manager use only.}
  199.         cmdInProgress:            SndCommand;
  200.         flags:                    INTEGER;
  201.         qLength:                INTEGER;
  202.         qHead:                    INTEGER;
  203.         qTail:                    INTEGER;
  204.         queue:                    ARRAY [0..stdQLength-1] OF SndCommand;
  205.     END;
  206. {MACE structures}
  207.     StateBlock = RECORD
  208.         stateVar:                ARRAY [0..stateBlockSize-1] OF INTEGER;
  209.     END;
  210.     StateBlockPtr = ^StateBlock;
  211.  
  212.     LeftOverBlock = RECORD
  213.         count:                    LONGINT;
  214.         sampleArea:                PACKED ARRAY [0..leftOverBlockSize-1] OF CHAR;
  215.     END;
  216.     LeftOverBlockPtr = ^LeftOverBlock;
  217.  
  218.     ModRef = RECORD
  219.         modNumber:                INTEGER;
  220.         modInit:                LONGINT;
  221.     END;
  222.     SndListResource = RECORD
  223.         format:                    INTEGER;
  224.         numModifiers:            INTEGER;
  225.         modifierPart:            ARRAY [0..0] OF ModRef;                    {This is a variable length array}
  226.         numCommands:            INTEGER;
  227.         commandPart:            ARRAY [0..0] OF SndCommand;                {This is a variable length array}
  228.         dataPart:                PACKED ARRAY [0..0] OF CHAR;            {This is a variable length array}
  229.     END;
  230.     SndListPtr = ^SndListResource;
  231.  
  232.     SndListHndl = ^SndListPtr;
  233.     SndListHandle = ^SndListPtr;
  234.  
  235. {HyperCard sound resource format}
  236.     Snd2ListResource = RECORD
  237.         format:                    INTEGER;
  238.         refCount:                INTEGER;
  239.         numCommands:            INTEGER;
  240.         commandPart:            ARRAY [0..0] OF SndCommand;                {This is a variable length array}
  241.         dataPart:                PACKED ARRAY [0..0] OF CHAR;            {This is a variable length array}
  242.     END;
  243.     Snd2ListPtr = ^Snd2ListResource;
  244.  
  245.     Snd2ListHndl = ^Snd2ListPtr;
  246.     Snd2ListHandle = ^Snd2ListPtr;
  247.  
  248.     SoundHeader = PACKED RECORD
  249.         samplePtr:                Ptr;                                    {if NIL then samples are in sampleArea}
  250.         length:                    LONGINT;                                {length of sound in bytes}
  251.         sampleRate:                UnsignedFixed;                            {sample rate for this sound}
  252.         loopStart:                LONGINT;                                {start of looping portion}
  253.         loopEnd:                LONGINT;                                {end of looping portion}
  254.         encode:                    CHAR;                                    {header encoding}
  255.         baseFrequency:            CHAR;                                    {baseFrequency value}
  256.         sampleArea:                PACKED ARRAY [0..0] OF CHAR;            {space for when samples follow directly}
  257.     END;
  258.     SoundHeaderPtr = ^SoundHeader;
  259.  
  260.     CmpSoundHeader = PACKED RECORD
  261.         samplePtr:                Ptr;                                    {if nil then samples are in sample area}
  262.         numChannels:            LONGINT;                                {number of channels i.e. mono = 1}
  263.         sampleRate:                UnsignedFixed;                            {sample rate in Apples Fixed point representation}
  264.         loopStart:                LONGINT;                                {loopStart of sound before compression}
  265.         loopEnd:                LONGINT;                                {loopEnd of sound before compression}
  266.         encode:                    CHAR;                                    {data structure used , stdSH, extSH, or cmpSH}
  267.         baseFrequency:            CHAR;                                    {same meaning as regular SoundHeader}
  268.         numFrames:                LONGINT;                                {length in frames ( packetFrames or sampleFrames )}
  269.         AIFFSampleRate:            extended80;                                {IEEE sample rate}
  270.         markerChunk:            Ptr;                                    {sync track}
  271.         format:                    OSType;                                    {data format type, was futureUse1}
  272.         futureUse2:                LONGINT;                                {reserved by Apple}
  273.         stateVars:                StateBlockPtr;                            {pointer to State Block}
  274.         leftOverSamples:        LeftOverBlockPtr;                        {used to save truncated samples between compression calls}
  275.         compressionID:            INTEGER;                                {0 means no compression, non zero means compressionID}
  276.         packetSize:                INTEGER;                                {number of bits in compressed sample packet}
  277.         snthID:                    INTEGER;                                {resource ID of Sound Manager snth that contains NRT C/E}
  278.         sampleSize:                INTEGER;                                {number of bits in non-compressed sample}
  279.         sampleArea:                PACKED ARRAY [0..0] OF CHAR;            {space for when samples follow directly}
  280.     END;
  281.     CmpSoundHeaderPtr = ^CmpSoundHeader;
  282.  
  283.     ExtSoundHeader = PACKED RECORD
  284.         samplePtr:                Ptr;                                    {if nil then samples are in sample area}
  285.         numChannels:            LONGINT;                                {number of channels,  ie mono = 1}
  286.         sampleRate:                UnsignedFixed;                            {sample rate in Apples Fixed point representation}
  287.         loopStart:                LONGINT;                                {same meaning as regular SoundHeader}
  288.         loopEnd:                LONGINT;                                {same meaning as regular SoundHeader}
  289.         encode:                    CHAR;                                    {data structure used , stdSH, extSH, or cmpSH}
  290.         baseFrequency:            CHAR;                                    {same meaning as regular SoundHeader}
  291.         numFrames:                LONGINT;                                {length in total number of frames}
  292.         AIFFSampleRate:            extended80;                                {IEEE sample rate}
  293.         markerChunk:            Ptr;                                    {sync track}
  294.         instrumentChunks:        Ptr;                                    {AIFF instrument chunks}
  295.         AESRecording:            Ptr;
  296.         sampleSize:                INTEGER;                                {number of bits in sample}
  297.         futureUse1:                INTEGER;                                {reserved by Apple}
  298.         futureUse2:                LONGINT;                                {reserved by Apple}
  299.         futureUse3:                LONGINT;                                {reserved by Apple}
  300.         futureUse4:                LONGINT;                                {reserved by Apple}
  301.         sampleArea:                PACKED ARRAY [0..0] OF CHAR;            {space for when samples follow directly}
  302.     END;
  303.     ExtSoundHeaderPtr = ^ExtSoundHeader;
  304.  
  305.     ConversionBlock = RECORD
  306.         destination:            INTEGER;
  307.         unused:                    INTEGER;
  308.         inputPtr:                CmpSoundHeaderPtr;
  309.         outputPtr:                CmpSoundHeaderPtr;
  310.     END;
  311.     ConversionBlockPtr = ^ConversionBlock;
  312.  
  313.     SMStatus = PACKED RECORD
  314.         smMaxCPULoad:            INTEGER;
  315.         smNumChannels:            INTEGER;
  316.         smCurCPULoad:            INTEGER;
  317.     END;
  318.     SMStatusPtr = ^SMStatus;
  319.  
  320.     SCStatus = RECORD
  321.         scStartTime:            UnsignedFixed;
  322.         scEndTime:                UnsignedFixed;
  323.         scCurrentTime:            UnsignedFixed;
  324.         scChannelBusy:            BOOLEAN;
  325.         scChannelDisposed:        BOOLEAN;
  326.         scChannelPaused:        BOOLEAN;
  327.         scUnused:                BOOLEAN;
  328.         scChannelAttributes:    LONGINT;
  329.         scCPULoad:                LONGINT;
  330.     END;
  331.     SCStatusPtr = ^SCStatus;
  332.  
  333.     AudioSelection = PACKED RECORD
  334.         unitType:                LONGINT;
  335.         selStart:                UnsignedFixed;
  336.         selEnd:                    UnsignedFixed;
  337.     END;
  338.     FilePlayCompletionProcPtr = ProcPtr;  { PROCEDURE FilePlayCompletion(chan: SndChannelPtr); }
  339.     FilePlayCompletionUPP = UniversalProcPtr;
  340.  
  341. CONST
  342.     uppFilePlayCompletionProcInfo = $000000C0; { PROCEDURE (4 byte param); }
  343.  
  344. FUNCTION NewFilePlayCompletionProc(userRoutine: FilePlayCompletionProcPtr): FilePlayCompletionUPP;
  345.     {$IFC NOT GENERATINGCFM }
  346.     INLINE $2E9F;
  347.     {$ENDC}
  348.  
  349. PROCEDURE CallFilePlayCompletionProc(chan: SndChannelPtr; userRoutine: FilePlayCompletionUPP);
  350.     {$IFC NOT GENERATINGCFM}
  351.     INLINE $205F, $4E90;
  352.     {$ENDC}
  353.     
  354. TYPE
  355.     AudioSelectionPtr = ^AudioSelection;
  356.  
  357.     SndDoubleBuffer = PACKED RECORD
  358.         dbNumFrames:            LONGINT;
  359.         dbFlags:                LONGINT;
  360.         dbUserInfo:                ARRAY [0..1] OF LONGINT;
  361.         dbSoundData:            PACKED ARRAY [0..0] OF CHAR;
  362.     END;
  363.     SndDoubleBufferPtr = ^SndDoubleBuffer;
  364.  
  365.     SndDoubleBackProcPtr = ProcPtr;  { PROCEDURE SndDoubleBack(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr); }
  366.     SndDoubleBackUPP = UniversalProcPtr;
  367.  
  368. CONST
  369.     uppSndDoubleBackProcInfo = $000003C0; { PROCEDURE (4 byte param, 4 byte param); }
  370.  
  371. FUNCTION NewSndDoubleBackProc(userRoutine: SndDoubleBackProcPtr): SndDoubleBackUPP;
  372.     {$IFC NOT GENERATINGCFM }
  373.     INLINE $2E9F;
  374.     {$ENDC}
  375.  
  376. PROCEDURE CallSndDoubleBackProc(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr; userRoutine: SndDoubleBackUPP);
  377.     {$IFC NOT GENERATINGCFM}
  378.     INLINE $205F, $4E90;
  379.     {$ENDC}
  380.  
  381. TYPE
  382.     SndDoubleBufferHeader = PACKED RECORD
  383.         dbhNumChannels:            INTEGER;
  384.         dbhSampleSize:            INTEGER;
  385.         dbhCompressionID:        INTEGER;
  386.         dbhPacketSize:            INTEGER;
  387.         dbhSampleRate:            UnsignedFixed;
  388.         dbhBufferPtr:            ARRAY [0..1] OF SndDoubleBufferPtr;
  389.         dbhDoubleBack:            SndDoubleBackUPP;
  390.     END;
  391.     SndDoubleBufferHeaderPtr = ^SndDoubleBufferHeader;
  392.  
  393.     SndDoubleBufferHeader2 = PACKED RECORD
  394.         dbhNumChannels:            INTEGER;
  395.         dbhSampleSize:            INTEGER;
  396.         dbhCompressionID:        INTEGER;
  397.         dbhPacketSize:            INTEGER;
  398.         dbhSampleRate:            UnsignedFixed;
  399.         dbhBufferPtr:            ARRAY [0..1] OF SndDoubleBufferPtr;
  400.         dbhDoubleBack:            SndDoubleBackUPP;
  401.         dbhFormat:                OSType;
  402.     END;
  403.     SndDoubleBufferHeader2Ptr = ^SndDoubleBufferHeader2;
  404.  
  405.     SoundInfoList = PACKED RECORD
  406.         count:                    INTEGER;
  407.         infoHandle:                Handle;
  408.     END;
  409.     SoundInfoListPtr = ^SoundInfoList;
  410.  
  411.     CompressionInfo = RECORD
  412.         recordSize:                LONGINT;
  413.         format:                    OSType;
  414.         compressionID:            INTEGER;
  415.         samplesPerPacket:        INTEGER;
  416.         bytesPerPacket:            INTEGER;
  417.         bytesPerFrame:            INTEGER;
  418.         bytesPerSample:            INTEGER;
  419.         futureUse1:                INTEGER;
  420.     END;
  421.     CompressionInfoPtr = ^CompressionInfo;
  422.  
  423.     CompressionInfoHandle = ^CompressionInfoPtr;
  424.  
  425. { These two routines for Get/SetSoundVol should no longer be used.}
  426. { They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.}
  427. { Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.}
  428. {$IFC OLDROUTINENAMES  & NOT GENERATINGCFM }
  429.  
  430. PROCEDURE SetSoundVol(level: INTEGER);
  431. PROCEDURE GetSoundVol(VAR level: INTEGER);
  432.     {$IFC NOT GENERATINGCFM}
  433.     INLINE $205F, $4218, $10B8, $0260;
  434.     {$ENDC}
  435. {$ENDC}
  436.  
  437. FUNCTION SndDoCommand(chan: SndChannelPtr; {CONST}VAR cmd: SndCommand; noWait: BOOLEAN): OSErr;
  438.     {$IFC NOT GENERATINGCFM}
  439.     INLINE $A803;
  440.     {$ENDC}
  441. FUNCTION SndDoImmediate(chan: SndChannelPtr; {CONST}VAR cmd: SndCommand): OSErr;
  442.     {$IFC NOT GENERATINGCFM}
  443.     INLINE $A804;
  444.     {$ENDC}
  445. FUNCTION SndNewChannel(VAR chan: SndChannelPtr; synth: INTEGER; init: LONGINT; userRoutine: SndCallBackUPP): OSErr;
  446.     {$IFC NOT GENERATINGCFM}
  447.     INLINE $A807;
  448.     {$ENDC}
  449. FUNCTION SndDisposeChannel(chan: SndChannelPtr; quietNow: BOOLEAN): OSErr;
  450.     {$IFC NOT GENERATINGCFM}
  451.     INLINE $A801;
  452.     {$ENDC}
  453. FUNCTION SndPlay(chan: SndChannelPtr; sndHdl: SndListHandle; async: BOOLEAN): OSErr;
  454.     {$IFC NOT GENERATINGCFM}
  455.     INLINE $A805;
  456.     {$ENDC}
  457. FUNCTION SndAddModifier(chan: SndChannelPtr; modifier: Ptr; id: INTEGER; init: LONGINT): OSErr;
  458.     {$IFC NOT GENERATINGCFM}
  459.     INLINE $A802;
  460.     {$ENDC}
  461. FUNCTION SndControl(id: INTEGER; VAR cmd: SndCommand): OSErr;
  462.     {$IFC NOT GENERATINGCFM}
  463.     INLINE $A806;
  464.     {$ENDC}
  465. { Sound Manager 2.0 and later, uses _SoundDispatch }
  466. FUNCTION SndSoundManagerVersion: NumVersion;
  467.     {$IFC NOT GENERATINGCFM}
  468.     INLINE $203C, $000C, $0008, $A800;
  469.     {$ENDC}
  470. FUNCTION SndStartFilePlay(chan: SndChannelPtr; fRefNum: INTEGER; resNum: INTEGER; bufferSize: LONGINT; theBuffer: UNIV Ptr; theSelection: AudioSelectionPtr; theCompletion: FilePlayCompletionUPP; async: BOOLEAN): OSErr;
  471.     {$IFC NOT GENERATINGCFM}
  472.     INLINE $203C, $0D00, $0008, $A800;
  473.     {$ENDC}
  474. FUNCTION SndPauseFilePlay(chan: SndChannelPtr): OSErr;
  475.     {$IFC NOT GENERATINGCFM}
  476.     INLINE $203C, $0204, $0008, $A800;
  477.     {$ENDC}
  478. FUNCTION SndStopFilePlay(chan: SndChannelPtr; quietNow: BOOLEAN): OSErr;
  479.     {$IFC NOT GENERATINGCFM}
  480.     INLINE $203C, $0308, $0008, $A800;
  481.     {$ENDC}
  482. FUNCTION SndChannelStatus(chan: SndChannelPtr; theLength: INTEGER; theStatus: SCStatusPtr): OSErr;
  483.     {$IFC NOT GENERATINGCFM}
  484.     INLINE $203C, $0010, $0008, $A800;
  485.     {$ENDC}
  486. FUNCTION SndManagerStatus(theLength: INTEGER; theStatus: SMStatusPtr): OSErr;
  487.     {$IFC NOT GENERATINGCFM}
  488.     INLINE $203C, $0014, $0008, $A800;
  489.     {$ENDC}
  490. PROCEDURE SndGetSysBeepState(VAR sysBeepState: INTEGER);
  491.     {$IFC NOT GENERATINGCFM}
  492.     INLINE $203C, $0018, $0008, $A800;
  493.     {$ENDC}
  494. FUNCTION SndSetSysBeepState(sysBeepState: INTEGER): OSErr;
  495.     {$IFC NOT GENERATINGCFM}
  496.     INLINE $203C, $001C, $0008, $A800;
  497.     {$ENDC}
  498. FUNCTION SndPlayDoubleBuffer(chan: SndChannelPtr; theParams: SndDoubleBufferHeaderPtr): OSErr;
  499.     {$IFC NOT GENERATINGCFM}
  500.     INLINE $203C, $0020, $0008, $A800;
  501.     {$ENDC}
  502. { MACE compression routines }
  503. FUNCTION MACEVersion: NumVersion;
  504.     {$IFC NOT GENERATINGCFM}
  505.     INLINE $203C, $0000, $0010, $A800;
  506.     {$ENDC}
  507. PROCEDURE Comp3to1(inBuffer: UNIV Ptr; outBuffer: UNIV Ptr; cnt: LONGINT; inState: UNIV Ptr; outState: UNIV Ptr; numChannels: LONGINT; whichChannel: LONGINT);
  508.     {$IFC NOT GENERATINGCFM}
  509.     INLINE $203C, $0004, $0010, $A800;
  510.     {$ENDC}
  511. PROCEDURE Exp1to3(inBuffer: UNIV Ptr; outBuffer: UNIV Ptr; cnt: LONGINT; inState: UNIV Ptr; outState: UNIV Ptr; numChannels: LONGINT; whichChannel: LONGINT);
  512.     {$IFC NOT GENERATINGCFM}
  513.     INLINE $203C, $0008, $0010, $A800;
  514.     {$ENDC}
  515. PROCEDURE Comp6to1(inBuffer: UNIV Ptr; outBuffer: UNIV Ptr; cnt: LONGINT; inState: UNIV Ptr; outState: UNIV Ptr; numChannels: LONGINT; whichChannel: LONGINT);
  516.     {$IFC NOT GENERATINGCFM}
  517.     INLINE $203C, $000C, $0010, $A800;
  518.     {$ENDC}
  519. PROCEDURE Exp1to6(inBuffer: UNIV Ptr; outBuffer: UNIV Ptr; cnt: LONGINT; inState: UNIV Ptr; outState: UNIV Ptr; numChannels: LONGINT; whichChannel: LONGINT);
  520.     {$IFC NOT GENERATINGCFM}
  521.     INLINE $203C, $0010, $0010, $A800;
  522.     {$ENDC}
  523. { Sound Manager 3.0 and later calls }
  524. FUNCTION GetSysBeepVolume(VAR level: LONGINT): OSErr;
  525.     {$IFC NOT GENERATINGCFM}
  526.     INLINE $203C, $0224, $0018, $A800;
  527.     {$ENDC}
  528. FUNCTION SetSysBeepVolume(level: LONGINT): OSErr;
  529.     {$IFC NOT GENERATINGCFM}
  530.     INLINE $203C, $0228, $0018, $A800;
  531.     {$ENDC}
  532. FUNCTION GetDefaultOutputVolume(VAR level: LONGINT): OSErr;
  533.     {$IFC NOT GENERATINGCFM}
  534.     INLINE $203C, $022C, $0018, $A800;
  535.     {$ENDC}
  536. FUNCTION SetDefaultOutputVolume(level: LONGINT): OSErr;
  537.     {$IFC NOT GENERATINGCFM}
  538.     INLINE $203C, $0230, $0018, $A800;
  539.     {$ENDC}
  540. FUNCTION GetSoundHeaderOffset(sndHandle: SndListHandle; VAR offset: LONGINT): OSErr;
  541.     {$IFC NOT GENERATINGCFM}
  542.     INLINE $203C, $0404, $0018, $A800;
  543.     {$ENDC}
  544. FUNCTION UnsignedFixedMulDiv(value: UnsignedFixed; multiplier: UnsignedFixed; divisor: UnsignedFixed): UnsignedFixed;
  545.     {$IFC NOT GENERATINGCFM}
  546.     INLINE $203C, $060C, $0018, $A800;
  547.     {$ENDC}
  548. FUNCTION GetCompressionInfo(compressionID: INTEGER; format: OSType; numChannels: INTEGER; sampleSize: INTEGER; cp: CompressionInfoPtr): OSErr;
  549.     {$IFC NOT GENERATINGCFM}
  550.     INLINE $203C, $0710, $0018, $A800;
  551.     {$ENDC}
  552. FUNCTION SetSoundPreference(theType: OSType; VAR name: Str255; settings: Handle): OSErr;
  553.     {$IFC NOT GENERATINGCFM}
  554.     INLINE $203C, $0634, $0018, $A800;
  555.     {$ENDC}
  556. FUNCTION GetSoundPreference(theType: OSType; VAR name: Str255; settings: Handle): OSErr;
  557.     {$IFC NOT GENERATINGCFM}
  558.     INLINE $203C, $0638, $0018, $A800;
  559.     {$ENDC}
  560. CONST
  561.     uppSndCallBackProcInfo = $000003C0; { PROCEDURE (4 byte param, 4 byte param); }
  562.  
  563. FUNCTION NewSndCallBackProc(userRoutine: SndCallBackProcPtr): SndCallBackUPP;
  564.     {$IFC NOT GENERATINGCFM }
  565.     INLINE $2E9F;
  566.     {$ENDC}
  567.  
  568. PROCEDURE CallSndCallBackProc(chan: SndChannelPtr; VAR cmd: SndCommand; userRoutine: SndCallBackUPP);
  569.     {$IFC NOT GENERATINGCFM}
  570.     INLINE $205F, $4E90;
  571.     {$ENDC}
  572.  
  573. {$ALIGN RESET}
  574. {$POP}
  575.  
  576. {$SETC UsingIncludes := SoundIncludes}
  577.  
  578. {$ENDC} {__SOUND__}
  579.  
  580. {$IFC NOT UsingIncludes}
  581.  END.
  582. {$ENDC}
  583.