Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 1 - SoundSprocket / SoundSprocket Reference
SoundSprocket Functions / Creating and Managing 3D Sound Sources


SSpSource_SetReferenceDistance

You can use the SSpSource_SetReferenceDistance function to set the reference distance of a sound source.

OSStatus SSpSource_SetReferenceDistance (
SSpSourceReference inSourceReference,
float inReferenceDistance);
inSourceReference
A source reference.
inReferenceDistance
The distance, in listener units, from a listener to the point at which a sound source was recorded.
function result
A result code.
DESCRIPTION
The SSpSource_SetReferenceDistance function sets the reference distance of the sound source specified by the inSourceReference parameter to the value specified by the inReferenceDistance parameter. The default reference distance is one meter.

SPECIAL CONSIDERATIONS
You should use the SSpSource_SetReferenceDistance function instead of the Sound Manager sound commands ampCmd or volumeCmd to change a sound's volume.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996