Controlling audio volume

Apr 23, 2010 at 3:39 AM


Is it possible to control the volume on the playback? I'd like to mute the video.

Otherwise, great stuff!


Aug 3, 2010 at 6:01 AM
Edited Aug 3, 2010 at 6:02 AM

Just wanted to let you know, I found a solution to this problem.

Yes its possible to control the volume. You need a reference to IBasicAudio interface.
// create a refernce to IBasicAudio and store it as a member variable
// Add this line to InitInterfaces() 
ba = (IBasicAudio)fg;

// Now you can change the video volume through IBasicAudio reference
// Add this function to VideoPlayer class
        /// <summary>
        /// Get or set volume of video
        /// </summary>
        public int Volume
                int volume =0;
                if (ba != null) 
                       DsError.ThrowExceptionForHR(ba.get_Volume(out volume));
                return volume;
                if (ba == null) return;
Hope this helps.