From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control pc volume

hi, i need a way to control the pc volume using a slider. i did search on the forum for related topics all i've found many VI that control the volume of a .wav file in labview but what i really want is to adjust the volume of the pc (for example if i'm listening to an mp3 file using realplayer and i move down the slider in labview the volume should decrease)
0 Kudos
Message 1 of 12
(3,149 Views)

There should be a Windows DLL that you can call with a Call Library Function Node, but I'm not sure what it is.

 

I did a little searching and this is the closest I got: http://msdn.microsoft.com/en-us/library/aa908146.aspx

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 12
(3,144 Views)

Hey elriwech,

 

What version of Windows OS are you using?

For Windows XP and 2000 there is win32.dll that you can call and do that, for Windows Vista and 7 it is more difficult due to the restricitons you have.

 

Kind regards,

0 Kudos
Message 3 of 12
(3,128 Views)
i'm using windows vista
0 Kudos
Message 4 of 12
(3,115 Views)
packersfan, i have found the waveoutsetvolume earlier but i couldn't get it work using the call library function node, i didn't understand the required parameters for this function, if someone can give me a simple vi example i will be grateful
0 Kudos
Message 5 of 12
(3,113 Views)

I have not used the DLL before, so the MSDN documentation I linked is the best I have unfortunately.

 

I am also concerned about what ion.rosca said, because I think I may have seen the same thing while searching for it.  The DLL will work on XP, but I think it fails in Vista and 7.

 

Sorry Smiley Sad

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 12
(3,106 Views)
😞 thank you any way, appreciate your help
0 Kudos
Message 7 of 12
(3,102 Views)

Hello,

I've found the following topic on microsoft website:

http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.volume(v=vs.95).aspx#Y0

 

At this moment I don't know how is the dll built, as a .NET assembly, in this case you should use

http://zone.ni.com/reference/en-XX/help/371361H-01/lvdialog/assemblies_in_memory/

 

or if it is Active X service.

 

I believe the next step will be to write to microsoft and ask exactly which is the dll and how it is defined, as a C dll (I doubt that is C), as a .NET assembly (this makes more sense for me) or an Active X, in this case you should have a closer look at DCOM settings.

 

Kind regards,

Ion R.

0 Kudos
Message 8 of 12
(3,095 Views)
thank you ion.rosca, this could be a good start for me, your are helpfull 😄
0 Kudos
Message 9 of 12
(3,089 Views)

Hi all,

 

I am having the same problem like elriwech ( need to control pc volume using LabVIEW ) however I have windows XP machine so I was wodering if someone could give me an example of what parameters to use for the .dll file. I would really appreciate.

 

Thanks

0 Kudos
Message 10 of 12
(3,056 Views)