LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get mic or line in sound

Hi,
I'm currently doing test on sound and I've found the ones from the examples. It work well but I can't select programmaticaly the input source, mic or line in. I succeed at switching it from windows menus but automation rules...
Can anybody help me to find a solution?
 
Thank you in advance.
 
Bim
0 Kudos
Message 1 of 8
(4,396 Views)
Hello Bim.
I guess you need to ake control of windows mixer.
Please. look at this link : http://forums.ni.com/ni/board/message?board.id=170&message.id=134009&requireLogin=False
Perhaps it will be usefull for you.
Hope it helps
Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 8
(4,392 Views)
Thank you for this link, but I've just been able to change the volume of the lines...
I tried to find a way to select a line or another but I didn't found it. The dll function is "SetVolume..." so it's perhaps not the good one. I also may not use the VI well...
In my opinion it shouldn't be the harder (as the volume control seems to be) but as I've never used a dll in my program I may have some difficulties.
Could you tell me if this VI exists or if I have to build my own one based on a particular function of winnm.dll?
In this last case, could someone help me for my "first time"?

Thank you in advance.

Bim
0 Kudos
Message 3 of 8
(4,371 Views)

Can anyone tell me how to change the sound recording line via LabVIEW please?

I'm looking forward to your answer...

Thank you in advance

Bim

0 Kudos
Message 4 of 8
(4,357 Views)
Hello Bin
In my windows mixer (xp pro sp2) when using recording controls, my options are recording volume of any input and mute.
If recording volume is 0 and you can contro recording volume for all inputs, it should run as a input selector.

Try  volume control from this link: http://forums.ni.com/ni/board/message?board.id=170&message.id=22278&requireLogin=False
There is an ennumerated in the block code to select volume of the source. Yo can convert it in a control and it should allow you  sound source selection.

Hope it helps
Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 5 of 8
(4,335 Views)

Thank you alipio,

I've tried the volume_control.llb, it works fine to select the volume of a line, but "out" I think (see attacjed pic "volume control"). In other words, the VI I used is only taking care of the recording source selected (line in or mic), I can't select both (see "recording control"). I can't even act on the volume of this window. I attach the VI I use, it's absed on provided examples. It's possible it's not the best way to detect a sound in the PC...

Thank you again, I'm looking forward to your answer.

Bim

 

0 Kudos
Message 6 of 8
(4,294 Views)
Hi bimbim
I see. Actually, there are quite a few variables depending on SO, sound card, etc. I will test volume.llb under XP sp1.
I am testintg, too, an activex mixer control. Will let you know results.

And detecting sound......well, that is another history. What kind of sound? voice? tones? signals?. It coul be quite easy in some cases and very dificult in others.
Will post as soon as possible
Cheers
Alipio


---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 7 of 8
(4,279 Views)
Hi again
 
After some more tests, conclusions are:

Using vrmixer from http://vrmixer.softvr.com you can select source and level.
This is the best way if you need to have full control.
Also, dll from http://www.dmm.cz/en/dmm_volume_dll.htm can do the work.
You can read about different problems with sound cards,too.
Mixer inputs/outputs and options depends on type of sound card and if hard and soft are full duplex or
not.
Some mixers allow multiplexed inputs and other allow simultaneous inputs.Some use mute and some select.
Using volume control.llb and SB pci, I can adjust record level for mic in and line in.
If sound is integrated, I can have "mono mix" that mixes inputs mic and line.
Some minor changes are neccesary.
The behavior is doferent for sound cards, so activex or dll will be a good choice. Microsoft mmsys
functions are quite complicated, at least, for me.
Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 8 of 8
(4,261 Views)