Microsoft DirectX 8.0 |
The IBasicAudio Automation interface is implemented on the Audio Renderer and Default DirectSound Device filters but is exposed through the Filter Graph Manager by means of a plug-in distributor. Applications should always retrieve this interface from the Filter Graph Manager. The interface enables C++ and Microsoft® Visual Basic® applications to control the basic volume and balance properties of the audio stream.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IDispatch methods Description GetTypeInfoCount Determines whether there is type information available for this dispinterface. GetTypeInfo Retrieves the type information for this dispinterface if GetTypeInfoCount returned successfully. GetIDsOfNames Converts text names of properties and methods (including arguments) to their corresponding DISPIDs. Invoke Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters. IBasicAudio methods Description put_Volume Sets the volume (amplitude) of the audio signal. get_Volume Retrieves the volume (amplitude) of the audio signal. put_Balance Sets the balance for the audio signal. get_Balance Retrieves the balance for the audio signal.
Retrieves the balance for the audio signal.
Syntax
HRESULT get_Balance(
long *plBalance
);
Parameters
- plBalance
- [out] Pointer to the returned value of the Balance property.
Return Value
Returns an HRESULT value.
Remarks
The Balance property is a value between 10,000 and 10,000. A value of 10,000 indicates that the right speaker has been disabled and only the left speaker is receiving an audio signal. A value of 0 indicates that both speakers are receiving equivalent audio signals. A value of 10,000 indicates that the left speaker has been disabled and only the right speaker is receiving an audio signal.
As with the Volume property, units correspond to .01 decibels (multiplied by 1 when plBalance is a positive value). For example, a value of 1000 indicates 10 dB on the right channel and 90 dB on the left channel.
Retrieves the volume (amplitude) of the audio signal.
Syntax
HRESULT get_Volume(
long *plVolume
);
Parameters
- plVolume
- [out] Pointer to the returned value of the Volume property. Divide by 100 to get equivalent decibel value (for example 10,000 = 100 dB).
Return Value
Returns an HRESULT value.
Remarks
Sets the balance of the audio signal.
Syntax
HRESULT put_Balance(
long lBalance
);
Parameters
- lBalance
- [in] Value to which to set the Balance property. The allowable input range is 10,000 to 10,000. A value of 0 sets a neutral balanceboth left and right speakers will be given the same amplitude audio signal.
Return Value
Returns an HRESULT value. E_INVALIDARG is returned for values outside the allowable input range and E_FAIL is returned if the underlying device returns an error.
Remarks
As with the Volume property, units correspond to .01 decibels (multiplied by 1 when lBalance is a positive value). For example, a value of 1000 indicates 10 dB on the right channel and 90 dB on the left channel.
Sets the volume (amplitude) of the audio signal.
Syntax
HRESULT put_Volume(
long lVolume
);
Parameters
- lVolume
- [in] Value to which to set the Volume property. The allowable input range is 10,000 to 0.
Return Value
Returns an HRESULT value. E_INVALIDARG is returned for values outside the allowable input range and E_FAIL is returned if the underlying device returns an error.
Remarks
Full volume is 0, and 10,000 is silence; the scale is logarithmic. Multiply the desired decibel level by 100 (for example 10,000 = 100 dB).