Solved

waveOutSetVolume

Posted on 1997-04-06
1
330 Views
Last Modified: 2010-04-06
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
Comment
Question by:Jakob Adeltoft
1 Comment
 
LVL 2

Accepted Solution

by:
javiertb earned 50 total points
ID: 1335215
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question