Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 1 - SoundSprocket / SoundSprocket Reference
Constants


Sound Channel Information Selectors

You can manipulate SoundSprocket's spatial filters using the Sound Manager's SndGetInfo and SndSetInfo functions. The second parameter of those functions is a sound channel information selector which determines the type of information you want to get or set. SoundSprocket defines these constants for sound channel information selectors:

enum {
   siPreMixerSoundComponent            = 'prmx',
   siSSpCPULoadLimit                   = '3dll',
   siSSpSetup                          = '3dst',
   siSSpLocalization                   = '3dif',
   siSSpFilterVersion                  = '3dfv'
};
Constant descriptions

siPreMixerSoundComponent
For SndSetInfo, install the sound component specified by the third parameter into the sound channel specified by the first parameter, before the Apple Mixer. The third parameter is a pointer to a sound component link structure; see (page 1-27) for details. For SndGetInfo, this message has no effect.
siSSpCPULoadLimit
For SndGetInfo, return (in the 4-byte area of memory pointed to by the third parameter of SndGetInfo) the number of CPU load levels supported by the 3D sound component and its associated filters. The value returned is the maximum value that you can specify for the cpuLoad field of the SSpLocalizationData data structure; see (page 1-30) for complete details. For SndSetInfo, this message has no effect.
siSSpSetup
For SndSetInfo, change the current speaker configuration to that specified by the SSpSetupData data structure pointed to by the third parameter of SndGetInfo. (See (page 1-28) for a description of the SSpSetupData data structure.) The 3D sound component and filters must already have been installed on the specified sound channel. For SndGetInfo, return the current speaker configuration in the SSpSetupData data structure pointed to by the third parameter. Changing the speaker configuration of a channel that has the 3D sound component installed also changes the speaker configuration of all installed 3D sound components. In addition, the speaker configuration is stored across subsequent reboots of the computer.
siSSpLocalization
For SndSetInfo, change the characteristics of the 3D filtering for a specific sound channel to those specified by the SSpLocalizationData data structure pointed to by the third parameter of SndSetInfo. (See (page 1-30) for a description of the SSpLocalizationData data structure.) The 3D sound component and filters must already have been installed on the specified sound channel. Some characteristics might affect all sound channels, depending on the implementation of the filters. In particular, the values specified in the medium, humidity, roomSize, roomReflectivity, and reverbAttenuation fields might be applied to all sound channels, not only the one specified in the call to SndSetInfo. To be safe, you should not assign different values of these fields to different sound channels. For SndGetInfo, return the current 3D filter characteristics in the SSpLocalizationData data structure pointed to by the third parameter. For most fields of that structure, the values returned are simply those most recently set for the specified sound channel. For fields that are shared between channels, however, the values returned are those most recently set for any sound channel.
siSSpFilterVersion
To identify the sound localization filter currently installed, call SndGetInfo with siSSpFilterVersion as the message, along with the address of a SSpFilterVersionData record. You should use SndGetInfo after you install a sound filter to determine if it was installed successfully. You can determine this by testing if the manufacturer field (or other field) was changed. It may also be appropriate to test version numbers, if available.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996