Sound Cones

A sound with a position but no orientation is a point source; the farther the listener is from the sound, in any direction, the quieter the sound. A sound with a position and an orientation is a sound cone.

In DirectSound, sound cones include an inside cone and an outside cone. Within the inside cone, the volume is at the maximum level for that sound source. (Because DirectSound does not support amplification, the maximum volume level is zero; all other volume levels are negative values that represent an attenuation of the maximum volume.) Outside the outside cone, the volume is the specified outside volume added to the inside volume. If an application sets the outside volume to DSBVOLUME_MIN, for example, the sound source will be inaudible outside the outside cone. Between the outside and inside cones, the volume changes gradually from one level to the other.

The concept of sound cones is shown in the following illustration:

Technically, every sound buffer represented by the IDirectSound3DBuffer interface is a sound cone, but often these sound cones behave like omnidirectional sound sources. For example, the default value for the volume outside the sound cone is zero; unless the application changes this value, the volume will be the same inside and outside the cone, and sound will not have any apparent orientation. You could also make the sound-cone angles as wide as you want, effectively making the sound cone a sphere.

Designing sound cones properly can add dramatic effects to your application. For example, you could position the sound source in the center of a room, setting its orientation toward a door. Then set the angle of the outside cone so that it extends to the width of the doorway and set the outside cone volume to inaudible. The user, when passing the open door, will suddenly hear the voice emanating from the room.