Buffer.Volume Property (Microsoft.DirectX.DirectSound)

Retrieves or sets the attenuation of the sound.

Definition

Visual Basic Public Property Volume As Integer
C# public int Volume { get; set; }
C++ public:
property int Volume {
        int get();
        void set(int value);
}
JScript public function get Volume() : int
public function set Volume(int);

Property Value

System.Int32
Value that represents the attenuation, in hundredths of a decibel (dB).

This property is read/write. 

Remarks

The return value is between Volume.Min and Volume.Max. These values are defined as 0 and -10,000, respectively. The value Volume.Max represents the original, unadjusted volume of the sound. The value Volume.Min indicates an audio volume attenuated by 100 dB, which, for practical purposes, is silence.

Exceptions

ArgumentExceptionLeave Site An invalid parameter was passed to the called method.
ControlUnavailableException The buffer control (volume, pan, and so on) requested by the caller is not available. Controls must be specified when the buffer is created.
PriorityLevelNeededException A cooperative level of Priority or higher is required.

Applies To

SecondaryBuffer