12-28-2013 08:01 PM
Hello everyone,
i want to control the volume of the right and left channel independently when i playback a mp3-file.
So the only possible solution is to use the mixerGetNumDevs.vi, mixerOpen.vi, mixerLineSetVolume.vi and the mixerClose.vi of the
volume control.llb.
What is working with the volume control.vi (of the volume control.llb) is the master volume (that means both channels have the same volume).
How can i change the settings to control the left and right channel independently.
Is there an example.vi for it?
Thank you.
with kind regards
Erik
12-30-2013 05:03 AM
Hi Erik,
where did you download the volume control.llb?
You could also use the Sound Output Set Volume VI.
There you have the possiblility to set different volumes for each channel.
Best regards,
Nina
12-30-2013 06:55 AM
Hello Nina,
i downloaded the Volume Control.llb from this forum here (there is also an older version called volctrl.llb).
The Sound Output Set Volume VI is fine if you play wave-files, but it is not possible to use it for playing mp3 files (with the mciSendStringA function of the winmm.dll).
So the only possibility is to use the mixer functions of the winmm.dll.
with kind regards
Erik
01-02-2014 05:19 AM
Hi Erik,
go to the Numeric palette --> Data Manipulation --> Join Numbers.vi
You can use this VI to use 2 byte for left and 2 byte for right channel.
To create a 32 bit value you can use the Join Numbers.vi
I hope this was helpful for you.
Just try to configure your VI. This shouls work.
Best regards,
Nina
01-02-2014 07:03 AM
Hello Nina,
thank you very much for your help.
I tried it, but it is not working like it should.
When i set the higher 2 bytes to 0 the volume is equal the lower 2 bytes. (But it is the main volume)
When the set the higher 2 bytes unequal 0 there is nothing happened anymore.
I fear there should be some changes more.
with kind regards
Erik
01-03-2014 09:38 AM
Hi Erik,
this seems to be a bit more difficult.
There are used many windows functions. I don´t know if it´s generally possible to set different volumes for both channels.
Would be the best, to ask this in a windows forum.
Maybe there is a special function.
Here some interesting information about the mixerline structure:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd757305%28v=vs.85%29.aspx
I´m sorry, unfortunateley I have no other solution yet.
Have a great weekend.
Best regards,
Nina
11-04-2016 04:12 AM
Thank you Nina, This method is working for me.