private void SetAudioGain(MItemClass mItem, int gain) { string empty = string.Empty; IMAudioTrack iMAudioTrack = null; mItem.AudioTrackGetByIndex(0, out empty, out iMAudioTrack); if (iMAudioTrack != null) { iMAudioTrack.TrackGainSet(-1, (double)gain, 0.1); } }
private void SetAudioGain(MItemClass mItem, int gain) { int audioTracks = -1; ((MItemClass)mItem).AudioTracksGetCount(out audioTracks); if (audioTracks > 0) { string empty = string.Empty; IMAudioTrack iMAudioTrack = null; mItem.AudioTrackGetByIndex(0, out empty, out iMAudioTrack); if (iMAudioTrack != null) { iMAudioTrack.TrackGainSet(-1, (double)gain, 0.1); } } }