line/mic in level 
Author Message
 line/mic in level

Is it possible to adjust the line and or mic input levels via VB? I have a
program that includes the ability to record to disk off the line or mic
inputs, and I'd like to include a record level slider. I've been searching
all over for this but the only thing I can find is volume control for
speaker output.

thanks - Woodie Morris



Mon, 13 Feb 2012 05:27:54 GMT  
 line/mic in level


Quote:
> Is it possible to adjust the line and or mic input levels via VB? I have a
> program that includes the ability to record to disk off the line or mic
> inputs, and I'd like to include a record level slider. I've been searching
> all over for this but the only thing I can find is volume control for
> speaker output.

See this for an example.

http://support.microsoft.com/kb/178456

--
Mike



Mon, 13 Feb 2012 06:18:32 GMT  
 line/mic in level
Thanks Mike, but as I'm finding everywhere that example provides
speaker-output volume control, but not record level control.

-Woodie


Quote:



>> Is it possible to adjust the line and or mic input levels via VB? I have
>> a program that includes the ability to record to disk off the line or mic
>> inputs, and I'd like to include a record level slider. I've been
>> searching all over for this but the only thing I can find is volume
>> control for speaker output.

> See this for an example.

> http://support.microsoft.com/kb/178456

> --
> Mike



Mon, 13 Feb 2012 09:59:18 GMT  
 line/mic in level

Quote:
> Thanks Mike, but as I'm finding everywhere that example provides
> speaker-output volume control, but not record level control.

It does both. See this line:

SetVolumeControl hmixer, micCtrl, vol



Mon, 13 Feb 2012 10:08:29 GMT  
 line/mic in level
It controls how loud the microphone plays over the speaker, but not the
record level like when you go to control panel, hardware and sound, manage
audio devices, click the recording tab, select the microphone, properties,
levels tab.

-Woodie


Quote:


>> Thanks Mike, but as I'm finding everywhere that example provides
>> speaker-output volume control, but not record level control.

> It does both. See this line:

> SetVolumeControl hmixer, micCtrl, vol



Tue, 14 Feb 2012 09:34:14 GMT  
 line/mic in level



Quote:
> It controls how loud the microphone plays over
> the speaker, but not the record level like when you
> go to control panel, hardware and sound, manage
> audio devices, click the recording tab, select the
> microphone, properties, levels tab.

Here's an already somewhat rusty example, how to deal
with the mixer-API - including WaveOut/WaveIn-Settings,
choosing InputLines in question, etc. pp.

All visualized in a somewhat minimalistic GUI.
Please check out, if you can make some sense out of it. ;-)
www.datenhaus.de/Downloads/WaveIn.zip

Olaf



Tue, 14 Feb 2012 21:03:27 GMT  
 line/mic in level
Thanks Olaf, but I still don't get it. Maybe I'm missing something right
under my nose. I'll admit that the api calls for volume controls are hard
for me to understand, but I've been able to implement audio, video, and
DVD/CD playback volume controls from examples I've picked up. Your example
code may have all the information necessary to figure it out, but I can't
see it. If I had an example that actually implemented a line/mic record
level slider...

-Woodie


Quote:



>> It controls how loud the microphone plays over
>> the speaker, but not the record level like when you
>> go to control panel, hardware and sound, manage
>> audio devices, click the recording tab, select the
>> microphone, properties, levels tab.

> Here's an already somewhat rusty example, how to deal
> with the mixer-API - including WaveOut/WaveIn-Settings,
> choosing InputLines in question, etc. pp.

> All visualized in a somewhat minimalistic GUI.
> Please check out, if you can make some sense out of it. ;-)
> www.datenhaus.de/Downloads/WaveIn.zip

> Olaf



Wed, 15 Feb 2012 08:33:27 GMT  
 line/mic in level



Quote:
> Thanks Olaf, but I still don't get it. Maybe I'm missing
> something right under my nose.
> I'll admit that the api calls for volume controls are hard
> for me to understand,

Yep - they are - that's why I made this small GUI for all
these Mixer-APIs, so that one can get a better understanding
of the underlying hierarchies.
There's a lot of enumeration that needs to be done, to
get to the right controls (handles).

In your case you need to make a choice regarding the
correct Mixer-Type first (the TopLeft-combo) - and
select the correct Destination-Line there - meaning the
"Record"-Destination-Line.

That RecordDest-Line usually offers you the Multiplexer
(shown in the TopCenter-Combo) as the only entry.
The "choice-values" of that Multiplexer are adjustable with the
TopRight-SliderControl - and this can switch the concrete
RecordSource for you ... you can prove the visual effects of
changed Slider-Values, if you startup the Win-System-Mixer
for the Record-Type in parallel to the small Demo-App.
This way you can follow the SliderChanges of the Demo-
App and their "visual-reflections" in the WinSystem-Mixer-
Application.

So, the TopRight-Slider changes the checkmarks in the
Record-SystemMixer-Window appropriately (1 of n
RecordSources, as e.g. Mic, LineIn, etc.).

In the same way you can change the Slider-Values of
all these different RecordSource-MixerTypes (directly below
the just mentioned Controls at the Top of the DemoForm) -
allowing you to select the Mic-Source for example and
change its InputLevel - and also the Mic-Preamp-Switch.
In the same way you can also choose the LineIn-SrcLine
and change its Input-Level - and - as said, you should
be able, to follow the desired effects visually in the parallel
started WinSys-MixerApp-Window.

What you need now, is to RipOff the example code in
a way, that does basically the same things as my "visually
oriented DemoCode" - but without filling up Combo- or
ListControls, but appropriate alternative Structures instead,
following the "order of the Handle-Hierarchy".

Maybe just set a breakpoint in the Combo-Click-Event
of the TopLeft (TopLevel)-Hierarchy-Control - and then
step through the code with the De{*filter*}, to follow the
"fillup-steps" and the enumerations which are done in
turn of that "entry-point-action".

Just try to implement the whole thing in a non-visual
way - maybe using Collection-Classes or Arrays of UDTs.
In your case reduced to the RecordSource-Destination-
Line, since you have no interest in the PlayBack-Mode
(in the "DownMix-Sum"-Destination-Line, used for the
output-direction).

Olaf



Fri, 17 Feb 2012 17:44:13 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. separating sound inputs (measure with mic only, output line-in only)

2. How do I measure volume levels from mic/line-in?

3. what control i should use to switch the mic on/off and adjust the mic volume?

4. Problem in Share-Level to User-Level, VB6,Jet4

5. Remote Data Objects in combination with level 1 compliance level

6. VB6 - Capture KeyUp at Form Level - Not FileListBox Control Level

7. Module Level Versus Subroutine Level

8. dim at procedure level or module level

9. How to cancel a large multiple level procedure from several levels in

10. Capturing Mic input

11. Mic I/O?

 

 
Powered by phpBB® Forum Software