Microsoft SDK for Java

setPan

This method of the DirectSoundBuffer Class specifies the relative volume between the left and right channels.

Syntax

public void setPan(int pan);

Parameters

pan Relative volume between the left and right channels. This value has a range of -10,000 to 10,000 and is measured in hundredths of a decibel.

Remarks

0 is the neutral value for pan and indicates that both channels are at full volume (attenuated by 0 decibels). At any other setting, one of the channels is at full volume and the other is attenuated. For example, a pan of -2173 means that the left channel is at full volume and the right channel is attenuated by 21.73 dB. Similarly, a pan of 870 means that the left channel is attenuated by 8.7 dB and the right channel is at full volume.

A pan of -10,000 means that the right channel is silent and the sound is "all the way to the left," while a pan of 10,000 means that the left channel is silent and the sound is "all the way to the right."

The pan control is cumulative with the volume control.

See Also

getPan, getVolume, setVolume

© 1999 Microsoft Corporation. All rights reserved. Terms of use.