LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

change volume of the sndPlaySound() output ??

Hallo,

I play wav-files with sndPlaySound() in my program. Is there a possibility to change the volume step by step by pressing a button (one for up and one for down) in the uir-file?

thx
Florian
0 Kudos
Message 1 of 4
(4,333 Views)
ActiveX should be able to do that! You might be able to use the manufacturer driver or .dll directly. If not low level IO to the hardware address.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 4
(4,327 Views)
Hallo again,

active X is okay, but which one?

Is there no possibility to use no active x?
please give me a function or something else

thx
Florian
0 Kudos
Message 3 of 4
(4,318 Views)
Playing a little with the SDK I found these useful functions: waveOutGetVolume and waveOutSetVolume that read and set the volume of the wave audio device. They worked well while playing a CD on the computer: maybe can help you in your application.

Take a look at the attached project. It works on my machine that has only one audio device: in case od more complex configurations you'll have to struggle a bit to intercept the proper device: the waveOutGetNumDevs function can help you in finding how many devices are installed in your computer.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 4
(4,311 Views)