Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
volume
#1
is there a way to set the volume to a certian level rather than just using VK_VOLUME_DOWN etc.? for example, volume level 33% etc.

thanks
#2
Code:
Copy      Help
dll winmm.dll #waveOutSetVolume uDeviceID dwVolume

;left and right channels, between 0 and 65535
int left right
left=50000
right=50000

waveOutSetVolume(0 right<<16|left)
#3
Awesowe! works great as a function too!
set_volume(x y)

Is there a way to get the current values for the left and right?

:wink:

thanks
#4
Code:
Copy      Help
dll winmm.dll #waveOutSetVolume uDeviceID dwVolume
dll winmm.dll #waveOutGetVolume uDeviceID *dwVolume

;left and right channels, between 0 and 65535
int left right
;left=50000
;right=50000
;
;waveOutSetVolume(0 right<<16|left)


int lr
waveOutGetVolume(0 &lr)
left=lr&0xffff
right=lr>>16
out left
out right


Forum Jump:


Users browsing this thread: 1 Guest(s)