Solved

waveOutSetVolume

Posted on 1997-04-06
1
325 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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

10 Experts available now in Live!

Get 1:1 Help Now