Solved

waveOutSetVolume

Posted on 1997-04-06
1
326 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now