Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 5 - Sound Components / Sound Components Reference
Constants


Legacy Documentclose button

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.

Data Format Flags

You can use constants to set or clear flag bits in the outputFlags parameter passed to the OpenMixerSoundComponent routine. These flags specify the format of the data your sound output device component expects to receive. See page 5-33 for information about the OpenMixerSoundComponent function.

IMPORTANT
Most of these flags are ignored unless the kNoMixing flag is set, because a sound output device component cannot perform data modifications such as sample rate conversion or sample size conversion unless it is also able to mix sound sources.
#define kNoMixing                (1 << 0)    /*don't mix sources*/
#define kNoSampleRateConversion  (1 << 1)    /*don't convert sample rate*/
#define kNoSampleSizeConversion  (1 << 2)    /*don't convert sample size*/
#define kNoSampleFormatConversion         \
                                 (1 << 3)    /*don't convert sample format*/
#define kNoChannelConversion     (1 << 4)    /*don't convert stereo/mono*/
#define kNoDecompression         (1 << 5)    /*don't decompress*/
#define kNoVolumeConversion      (1 << 6)    /*don't apply volume*/
#define kNoRealtimeProcessing    (1 << 7)    /*don't run at interrupt time*/
Constant descriptions

kNoMixing
If this bit is set, the Apple Mixer does not mix audio data sources.
kNoSampleRateConversion
If this bit is set, the sound component chain does not perform sample rate conversion (for example, converting 11 kHz data to 22 kHz data).
kNoSampleSizeConversion
If this bit is set, the sound component chain does not perform sample size conversion (for example, converting 8-bit data to 16-bit data).
kNoSampleFormatConversion
If this bit is set, the sound component chain does not convert between sample formats (for example, converting from two's complement data to offset binary data). Most sound output devices on Macintosh computers accept only 8-bit offset binary data, which is therefore the default type of data produced by the Apple Mixer. If your output device can handle either offset binary or two's complement data, you should set this flag. Note that 16-bit data is always in two's complement format.
kNoChannelConversion
If this bit is set, the sound component chain does not convert channels (for example, converting monophonic channels to stereo or stereo channels to monophonic).
kNoDecompression
If this bit is set, the sound component chain does not decompress audio data. If your output device can decompress data, you should set this flag.
kNoVolumeConversion
If this bit is set, the sound component chain does not convert volumes.
kNoRealtimeProcessing
If this bit is set, the sound component chain does not do any processing at interrupt time.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996