各位大虾帮帮忙

dearplumlxh 2002-12-08 01:28:47
在利用MediaPlayer播放文件时,如何调整声音的大小(在程序中实现),以及如何实现亮度、灰度的控制。各位大虾帮帮忙。
...全文
31 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dearplumlxh 2002-12-29
  • 打赏
  • 举报
回复
高手们帮帮忙吧
fwwxxjingling 2002-12-24
  • 打赏
  • 举报
回复
呵呵,学习永无止境...
dearplumlxh 2002-12-24
  • 打赏
  • 举报
回复
多谢老兄:)那如何实现亮度和灰度的控制呢,多谢?
请问一下音量的值是不是先附给了,变量t,并且还要用到一个TrackBar控件
在界面中用这个控件来调整音量的大小??
Billy_Chen28 2002-12-19
  • 打赏
  • 举报
回复
1、调整声音的大小
****************
左声道:
var
v,t:LOngint;
beging:
t:=55-TrackBar1.Positinon;
auxGetVolume(MediaPlayer.DeviceID-1,@v);
v:=((t shl 8)or(v and $ffff0000));
auxSetVolume(MediaPlayer.DeviceID-1,v);
end;
****************
右声道:
var
v,t:LOngint;
beging:
t:=55-TrackBar2.Positinon;
auxGetVolume(MediaPlayer.DeviceID-1,@v);
v:=((t shl 24)or(v and $0000ffff));
auxSetVolume(MediaPlayer.DeviceID-1,v);
end;

注:TrackBar.max:=255;
MediaPlayer是SYSTEM页中的那个MediaPlayer;

dearplumlxh 2002-12-19
  • 打赏
  • 举报
回复
不会真的没有人会吧?:(

1,184

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧