增大和减小音量 [英] Increasing and decreasing volume

查看:75
本文介绍了增大和减小音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用 Interop.QuartzTypeLib dll 创建视频播放器.

在那如何增加和减少音量.

IBasicAudio在那里,但是如何使用它来改变音量.

如果有人知道,请告诉我.

Hi,

I am Creating a Video Player using Interop.QuartzTypeLib dll.

In that How to increase and decrease volume.

IBasicAudio is there but how to use that to change the volume.

If any one knows tell me.

推荐答案

您好,

Daniel Strigl早在2003年就写过一篇关于它的文章...
C#中的DirectShow MediaPlayer [
Hello,

Daniel Strigl wrote an article about it back in 2003...
DirectShow MediaPlayer in C#[^]

It will probably need a bit of updating, but otherwise it answers your question.

As reported by ssyuvaraja the article does not tell you how to adjust the sound. Thankfully this is really easy.

Look at the code of the article and use this object:
m_objBasicAudio = m_objFilterGraph as IBasicAudio;



并修改声音:



And to modify the sound:

m_objBasicAudio.Volume = volume; // from -10 to 0



可以在MSDN上找到更多详细信息:
http://msdn.microsoft.com/en-us/site/ms782294#controllingaudio [ ^ ]

瓦莱里.



More details can be found on MSDN:
http://msdn.microsoft.com/en-us/site/ms782294#controllingaudio[^]

Valery.


这篇关于增大和减小音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆