Sound Projection Cones

A 3D sound buffer has two sound cones: an inside cone and an outside cone. An application can set and retrieve the cone angles, maximum and minimum distances, and position and orientation of a buffer's sound projection cones by using various IDirectSound3DBuffer methods. For more information about the behavior and characteristics of sound projection cones, see Sound Cones.

Designing sound cones properly can add dramatic effects to your application. For example, imagine that you want to use the sound of a ghostly voice. Instead of simply playing the sound, you could create additional suspense in your application by using IDirectSound3DBuffer methods. Position the sound source in the center of a room, setting its orientation toward a door. Then, focus the sound cones to the width of the door and set the outside cone volume to -10,000 (inaudible). These characteristics, when combined, make it seem that the voice is emanating from a room that the user passes by.

This section describes how to set the following sound characteristics:

·Cone Angles and Cone Orientation

·Inside and Outside Cone Volumes

Cone Angles and Cone Orientation

An application sets or retrieves the angles that define cones by using the IDirectSound3DBuffer::SetConeAngles and IDirectSound3DBuffer::GetConeAngles methods. To set or retrieve the orientation of sound cones, an application can use the IDirectSound3DBuffer::SetConeOrientation and IDirectSound3DBuffer::GetConeOrientation methods.

By default, cone angles are 360 degrees, meaning the object projects sound at the same volume in all directions. A smaller value means that the object projects sound at a lower volume outside the defined cone. The outside cone angle must always be equal to or greater than the inside cone angle.

Inside and Outside Cone Volumes

The outside cone volume represents the additional volume attenuation of the sound when the listener is outside the buffer's sound cone. This factor is expressed in hundredths of decibels. By default the outside volume is zero, meaning the sound cone will have no perceptible effect until this parameter is changed.

An application sets and retrieves the outside cone volume by using the IDirectSound3DBuffer::SetConeOutsideVolume and IDirectSound3DBuffer::GetConeOutsideVolume methods. Keep in mind that an audible outside cone volume is still subject to attenuation, due to distance from the sound source.

When the listener is within the sound cone, the normal buffer volume (returned by the IDirectSoundBuffer::GetVolume method) is used. When the listener is outside the sound cone, the cone outside volume is applied as well, making the actual volume the sum of the two. Near the boundary of the cone, the volume fades smoothly between the two levels to avoid perceptual artifacts.