VideoEdit Gold ActiveX Control

AdjustAudioVolume

Description

Adjust the audio volume or add crossfade effect on specific audio track.

Syntax

Public Function AdjustAudioVolume ( _
   ByVal iAudioTrack as Integer, _
   ByVal iStartTime as double, _
   ByVal iStopTime as double, _
   ByVal iVolumeStart as double, _
   ByVal iVolumeStop as double
) As Boolean

 

Parameter

iAudioTrack
    the index of audio track. The first audio track is 0. If you set =-1, it mean it will apply this effect for all audio track.

iStartTime
    the start time of effect

iStopTime
    the end time of effect

iVolumeStart
    the value of volume. By default is 1. The range from 0-10,  0.5 = 50% of original volume. You can produce audio fades if the iVolumeStart and iVolumeStop is different value

iVolumeStop
    the value of volume. By default is 1. The range from 0-10,  0.5 = 50% of original volume. You can produce audio fades if the iVolumeStart and iVolumeStop is different value
 

Return Value

Return true - successful
Return false - Failed

 

Example

Visual Basic Syntax

VideoEdit1.OutputFileWidth = 720
VideoEdit1.OutputFileHeight = 480

VideoEdit1.VideoSampleSize = 24
VideoEdit1.InitControl

VideoEdit1.MultiTrackAddFirstVideo 0, "c:\test1.mpg", 0, 60, 0, 255
VideoEdit1.MultiTrackAddFirstAudio 0, "c:\test1.mpg", 0, 60

VideoEdit1.MultiTrackAddFirstVideo 1, "c:\test3.mpg", 0, 60, 0, 128
VideoEdit1.MultiTrackAddFirstAudio 1, "c:\test3.mpg", 0, 60
VideoEdit1.AdjustAudioVolume 0, 0, 9999,5,5

VideoEdit1.Preview