Sound Channel Information Selectors
You can manipulate SoundSprocket's spatial filters using the Sound Manager'sSndGetInfo
andSndSetInfo
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. ForSndGetInfo
, this message has no effect.siSSpCPULoadLimit
- For
SndGetInfo
, return (in the 4-byte area of memory pointed to by the third parameter ofSndGetInfo
) 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 thecpuLoad
field of theSSpLocalizationData
data structure; see (page 1-30) for complete details. ForSndSetInfo
, this message has no effect.siSSpSetup
- For
SndSetInfo
, change the current speaker configuration to that specified by theSSpSetupData
data structure pointed to by the third parameter ofSndGetInfo
. (See (page 1-28) for a description of theSSpSetupData
data structure.) The 3D sound component and filters must already have been installed on the specified sound channel. ForSndGetInfo
, return the current speaker configuration in theSSpSetupData
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 theSSpLocalizationData
data structure pointed to by the third parameter ofSndSetInfo
. (See (page 1-30) for a description of theSSpLocalizationData
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 themedium
,humidity
,roomSize
,roomReflectivity
, andreverbAttenuation
fields might be applied to all sound channels, not only the one specified in the call toSndSetInfo
. To be safe, you should not assign different values of these fields to different sound channels. ForSndGetInfo
, return the current 3D filter characteristics in theSSpLocalizationData
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
withsiSSpFilterVersion
as the message, along with the address of aSSpFilterVersionData
record. You should useSndGetInfo
after you install a sound filter to determine if it was installed successfully. You can determine this by testing if themanufacturer
field (or other field) was changed. It may also be appropriate to test version numbers, if available.