コード例 #1
0
        protected override int GetAudioBalance()
        {
            int val = 0;

            if (isAudioAvailable)
            {
                int hr = basicAudio.get_Balance(out val);
                DsError.ThrowExceptionForHR(hr);
            }

            return(val);
        }
コード例 #2
0
 internal void trackBarBalance_ValueChanged(object sender, EventArgs e)
 {
     MainForm.Settings.Balance = this.trackBarBalance.Value;
     if (this.MainForm.GraphBuilder != null)
     {
         IBasicAudio basicAudio = this.MainForm.GraphBuilder.FilterGraph as IBasicAudio;
         if (basicAudio != null)
         {
             basicAudio.put_Balance(this.trackBarBalance.Value);
             int balance = 0;
             basicAudio.get_Balance(out balance);
             this.labelBalanceLevel.Text = balance.ToString();
             return;
         }
     }
     this.labelBalanceLevel.Text = this.trackBarBalance.Value.ToString();
 }