D deipptf1 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-22 #1 我是用的auxsetvolume(0,((255-trackbar2.position)shl 16)or ((255-trackbar2.position))); 可是好像没有用? 箐各位高手多多指教!!!
我是用的auxsetvolume(0,((255-trackbar2.position)shl 16)or ((255-trackbar2.position))); 可是好像没有用? 箐各位高手多多指教!!!
W weekboy Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-23 #3 auxsetvolume是调节左右声道的平衡,不是用来调节主音量的,第二个参数是16进制 auxsetvolume(0,(inttohex(255-trackbar2.position)shl 16) or (inttohex(255-trackbar2.position)));
auxsetvolume是调节左右声道的平衡,不是用来调节主音量的,第二个参数是16进制 auxsetvolume(0,(inttohex(255-trackbar2.position)shl 16) or (inttohex(255-trackbar2.position)));
W weekboy Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-23 #5 WaveOutSetVolume(0, $FFFFFFFF);//$FFFFFFFF左右都最大,$0000FFFF左最大 //$FFFF0000 右最大 $00000000 无声音
J jrq Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-26 #7 //+-------------------------------------------+ //| 注意 :要uses Mmsystem 单元 | //+-------------------------------------------+ 调节左声道---------- procedure TSoundForm.TrackBar1Change(Sender: TObject); var t,v:longint; begin t:=TrackBar1.Position; waveoutgetvolume(0,@ v); v:=v and $ffff0000 or (t shl 8); //数字前加$符号表示是16进制数字 waveoutsetvolume(0,v); end; 调节变右声道--------- procedure TSoundForm.TrackBar2Change(Sender: TObject); var t,v:longint; begin t:=TrackBar1.Position; waveoutgetvolume(0,@ v); v:=v and $0000ffff or (t shl 24);//数字前加$符号表示是16进制数字 waveoutsetvolume(0,v); end; -------供参考 []
//+-------------------------------------------+ //| 注意 :要uses Mmsystem 单元 | //+-------------------------------------------+ 调节左声道---------- procedure TSoundForm.TrackBar1Change(Sender: TObject); var t,v:longint; begin t:=TrackBar1.Position; waveoutgetvolume(0,@ v); v:=v and $ffff0000 or (t shl 8); //数字前加$符号表示是16进制数字 waveoutsetvolume(0,v); end; 调节变右声道--------- procedure TSoundForm.TrackBar2Change(Sender: TObject); var t,v:longint; begin t:=TrackBar1.Position; waveoutgetvolume(0,@ v); v:=v and $0000ffff or (t shl 24);//数字前加$符号表示是16进制数字 waveoutsetvolume(0,v); end; -------供参考 []