Can anyone help me with loading the dwVolume variable with the right DWORD to set the left and right channel volumes to -100 100 or 40 -40 for example. How do I come up with the DWORD and how do I express it with the dwVolume variable?
I'm looking at the C code I think (mmeapi.h) and I know I need the WAVECAPS_LRVOLUME structure. But this is above my paygrade. Any example or info would be most welcome and helpful. I'm trying to figure it out! So far, no luck. Thx!
I'm using: waveOutGetVolume_(hwaveOut, @pdwVolume) to get the volume successfully (I think), and the debugger shows a pdwVolume value of 710609796 I'm not sure how to view that as something useful. The documentation says 0x4000 is an example of what pdwVolume is returning.
wavOutSetVolume_(hwo, dwVolume) question...
Re: wavOutSetVolume_(hwo, dwVolume) question...
You can try this:
Code: Select all
Procedure.l waveOutdwVolume(Left.u, Right.u)
ProcedureReturn Right << 16 | Left
EndProcedure
Re: wavOutSetVolume_(hwo, dwVolume) question...
So do something like this to mute the right channel? Sorry, tryin' hard to figure this out.
Code: Select all
Procedure.l waveOutdwVolume(Left.u, Right.u)
ProcedureReturn Right << 16 | Left
EndProcedure
waveOutSetVolume_(hwaveOut, waveOutdwVolume(65532, 0))
[SOLVED] wavOutSetVolume_(hwo, dwVolume) question...
infratec nailed it! The code is working. I'm going to study up on the syntax as I don't know what
variable << 16 | variable means exactly other than to turn integers into what is needed.
Thank you very much for your help! I will try to return the favor to someone else having a problem.
This forum has been awesome! I'm learning new stuff everyday!
variable << 16 | variable means exactly other than to turn integers into what is needed.
Thank you very much for your help! I will try to return the favor to someone else having a problem.
This forum has been awesome! I'm learning new stuff everyday!
Re: wavOutSetVolume_(hwo, dwVolume) question...
dw means doubleword
a word is 16 bit, a double word is 32 bit.
In PB a dw is .l and a word is .w or .u
<< means shifting bits right
It returns a long, where Right word is shifted 16 bits to the right and left is or'ed to the lower 16 bits.
a word is 16 bit, a double word is 32 bit.
In PB a dw is .l and a word is .w or .u
<< means shifting bits right
It returns a long, where Right word is shifted 16 bits to the right and left is or'ed to the lower 16 bits.
Re: wavOutSetVolume_(hwo, dwVolume) question...
Thank you for taking the time to explain. That’s what makes this forum awesome!

