PreviewAudioVolumeSet Method (MFPreviewClass)
channel ID. By default use empty string
number of audio channel. To set volume for all channels use "-1"
volume in dB
Sets preview's audio volume for specified audio channel.
Syntax
Public Overridable Sub PreviewAudioVolumeSet( _
   ByVal _bsChannelID As String, _
   ByVal _nChannel As Integer, _
   ByVal _dblAttenuationdB As Double _
) 
public virtual void PreviewAudioVolumeSet( 
   string _bsChannelID,
   int _nChannel,
   double _dblAttenuationdB
)
public procedure PreviewAudioVolumeSet( 
    _bsChannelID: String;
    _nChannel: Integer;
    _dblAttenuationdB: Double
); virtual; 
public: virtual void PreviewAudioVolumeSet( 
   BSTR* _bsChannelID,
   int _nChannel,
   double _dblAttenuationdB
) 

Parameters

_bsChannelID
channel ID. By default use empty string
_nChannel
number of audio channel. To set volume for all channels use "-1"
_dblAttenuationdB
volume in dB
Example

Here is example of how to set audio volume for preview for all channels:

// Volume in dB
// 0 - full volume, -100 silence
double dblPos = (double)trackBarVolume.Value / trackBarVolume.Maximum;
m_objPreview.PreviewAudioVolumeSet("", -1, -60 * (1 - dblPos));
See Also

Reference

MFPreviewClass Class
MFPreviewClass Members