Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
Comp6to1
You can use theComp6to1
procedure to compress sound data at a ratio of 6:1.
PROCEDURE Comp6to1 (inBuffer: Ptr; outBuffer: Ptr; cnt: LongInt; inState: Ptr; outState: Ptr; numChannels: LongInt; whichChannel: LongInt);
inBuffer
- A pointer to a buffer of samples to be compressed.
outBuffer
- A pointer to a buffer where the samples are to be written.
cnt
- The number of samples to compress.
inState
- A pointer to a 128-byte buffer from which the input state of the algorithm is read, or
NIL
. To initialize the algorithm, this buffer should be filled with zeros.outState
- A pointer to a 128-byte buffer to which the output state of the algorithm is written, or
NIL
. This buffer might be the same as that specified by theinState
parameter.numChannels
- The number of channels in the buffer pointed to by the
inBuffer
parameter.whichChannel
- The channel to compress, when
numChannels
is greater than 1. This parameter must be in the range of 1 tonumChannels
.DESCRIPTION
TheComp6to1
procedure compressescnt
samples of sound stored in the buffer specified byinBuffer
and places the result in the buffer specified byoutBuffer
, which must be at leastcnt/6
bytes in size. TheComp6to1
procedure works much like theComp3to1
procedure, but compresses every 48 bytes of sound data to exactly 8 bytes of compressed sound data and compresses remaining bytes to no more than one-sixth the original size.SPECIAL CONSIDERATIONS
Because theComp6to1
procedure might allocate and dispose of memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theComp6to1
procedure are
Trap macro Selector _SoundDispatch $000C0010