Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

waveOutSetVolume

I dont know what to write if i just want to play a wavefile ex. file.wav and automatically change the soundvolume from minimum to maximum.
I know how to play the file in MediaPlayer but it is the soundvolume i cant figure out.

I have found this function:
waveOutSetVolume(uDeviceID: Word; dwVolume: Longint): Word;

Please write excatly what i have to do:)

regards Jakob Adeltoft
0
Jakob Adeltoft
Asked:
Jakob Adeltoft
1 Solution
 
javiertbCommented:
Try This:
        WORD wLeft = 0x0000, wRight = 0xFFFF;
        waveOutSetVolume(0, (DWORD)MAKELONG(wLeft, wRight));

It will set the left speaker volume to 0, and the right to Full.


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now