Hi, i'm trying to set volume on an audio track programatically.
if i do this
foreach (Track track in vegas.Project.Tracks)
{
if (track.MediaType == MediaType.Audio)
{
MessageBox.Show("I found an audio track");
AudioTrack mycool;
mycool = (AudioTrack)track;
MessageBox.Show("My cool volume is " + mycool.Volume);
mycool.Volume = 2;
MessageBox.Show("My cool volume is " + mycool.Volume);
}
}
when i run this. it opens up and the first messagebox says the volume is 1.
then the second messagebox says the volume is 2.
while it's printing these the volume slider on the track itself says 0.
then it breaks out of that loop and the slider jumps to 6.0DB.
if i tell it
mycool.Volume = 3;
the slider jumps up to 9.5 DB
if i tell it
mycool.Volume =4;
the slider jumps up to 12DB
if i say
mycool.Volume = -2
the slider jumps to -inf.
i had assumed it being a "Single Volume Get or set the volume gain value for the audio track."
that i could merely set it equal to what i want. that apparently isn't the case :-) anyone know what i'm missing?
thanks!
if i do this
foreach (Track track in vegas.Project.Tracks)
{
if (track.MediaType == MediaType.Audio)
{
MessageBox.Show("I found an audio track");
AudioTrack mycool;
mycool = (AudioTrack)track;
MessageBox.Show("My cool volume is " + mycool.Volume);
mycool.Volume = 2;
MessageBox.Show("My cool volume is " + mycool.Volume);
}
}
when i run this. it opens up and the first messagebox says the volume is 1.
then the second messagebox says the volume is 2.
while it's printing these the volume slider on the track itself says 0.
then it breaks out of that loop and the slider jumps to 6.0DB.
if i tell it
mycool.Volume = 3;
the slider jumps up to 9.5 DB
if i tell it
mycool.Volume =4;
the slider jumps up to 12DB
if i say
mycool.Volume = -2
the slider jumps to -inf.
i had assumed it being a "Single Volume Get or set the volume gain value for the audio track."
that i could merely set it equal to what i want. that apparently isn't the case :-) anyone know what i'm missing?
thanks!