![]() |
SoundParamBlock |
Header: Sound.h |
struct SoundParamBlock { SInt32 recordSize; SoundComponentData desc; UnsignedFixed rateMultiplier; SInt16 leftVolume; SInt16 rightVolume; SInt32 quality; ComponentInstance filter; SoundParamUPP moreRtn; SoundParamUPP completionRtn; SInt32 refCon; SInt16 result; }; typedef SoundParamBlock SoundParamBlockPtr;
The length, in bytes, of the sound parameter block.
A sound component data structure that describes the format, size, and location of the sound data. See
A multiplier to be applied to the playback rate of the sound. This field contains an unsigned fixed-point number. If, for example, this field has the value 2.0, the sound is played back at twice the rate specified in the sampleRate field of the sound component data structure contained in the desc field.
The playback volume for the left channel. You specify a volume with 16-bit value, where 0 (hexadecimal 0x0000) represents no volume and 256 (hexadecimal 0x0100) represents full volume. You can overdrive a channels volume by passing volume levels greater than 0x0100.
The playback volume for the right channel. You specify a volume with 16-bit value, where 0 (hexadecimal 0x0000) represents no volume and 256 (hexadecimal 0x0100) represents full volume. You can overdrive a channels volume by passing volume levels greater than 0x0100.
The level of quality for the sound. This value usually determines how much processing should be applied during audio data processing (such as rate conversion and decompression) to increase the output quality of the sound.
Reserved for future use. You should set this field to NULL.
A pointer to a callback function that is called to retrieve another buffer of audio data. This field is used internally by the Sound Manager.
A pointer to a callback function that is called when the sound has finished playing. This field is used internally by the Sound Manager.
A value that is to be passed to the callback functions specified in the moreRtn and completionRtn fields. You can use this field to pass information (for example, the address of a structure) to a callback function.
The status of the sound that is playing. The value 1 indicates that the sound is currently playing. The value 0 indicates that the sound has finished playing. Any negative value indicates that some error has occurred.
The Sound Manager passes a components SoundComponentPlaySourceBuffer function a sound parameter block that describes the source data to be modified or sent to a sound output device. A sound parameter block is defined by the SoundParamBlock data type.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)