volume
Perhaps this is what you look for. It's a snippet from a program of mine:
;Volx = new VolumeValue
; read current (left+right) volume values:
waveOutGetVolume_(0, @Volumes.l)
VolL = Volumes & HFFFF : VolR = (Volumes >>16) & HFFFF
 
;write new values:
t1.f = (HFFFF/100)*Volx -0.5
VolL=t1: VolR=VolL: ii.l=VolR<<16 + VolL
waveoutSetVolume_(0, ii)
  
../tomio
			
			
									
									
						;Volx = new VolumeValue
; read current (left+right) volume values:
waveOutGetVolume_(0, @Volumes.l)
VolL = Volumes & HFFFF : VolR = (Volumes >>16) & HFFFF
;write new values:
t1.f = (HFFFF/100)*Volx -0.5
VolL=t1: VolR=VolL: ii.l=VolR<<16 + VolL
waveoutSetVolume_(0, ii)
../tomio
Hi,
I remember I have posted a question concerning MIDI and GPI gave me
a link to a very powerfull MCI pack including volume, etc... :
viewtopic.php?t=7394&highlight=
Enjoy.
			
			
									
									I remember I have posted a question concerning MIDI and GPI gave me
a link to a very powerfull MCI pack including volume, etc... :
viewtopic.php?t=7394&highlight=
Enjoy.
Beware of the man who has the solution before he understands the problem...
						Volx = 0 - 100 , because that's the range of waveOutGetVolume.PB wrote:> Volx = new VolumeValue
What is the range for Volx? 0 to ?
(I tried up to 65535 but still had no sound).
And, of course, the soundChannel has to be open already, like that:
uu.l=mciSendString_("open "+ft$+" type waveaudio alias "+snda$,0,0,0)
If uu.l <> 0
mciGetErrorString_(uu.l,*sndbuf,sbl)
gosub err_
Return
EndIf
uu.l=mciSendString_("play "+snda$,0,0,0) ;no need to start "play"
If uu.l <> 0
mciGetErrorString_(uu.l,*sndbuf,sbl):
gosub err_
Return
EndIf
HFFFF.l=$FFFF
As already mentioned, these are snippets of a program.
But I use to manipulate the volume this way since long with success.
../tomio



