Kwint wrote: > I tried Jaroslav's test project, and I see, that I have > MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE. So the problem is not the same. > Drivers > are original, from motherboard vendor's CD. soundcard is some Realtec AC'97. > When setting breakpoint in MpCodec_setGain both with > MIXERLINE_COMPONENTTYPE_DST_WAVEIN and MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE > I > see that everything goes ok, mixerSetControlDetails returns MMSYSERR_NOERROR. > > Driver vendor not necessarily must include > MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE. I think MpCodec_setGain code must be > reviewed, because it is not very platform independent. > > _______________________________________________ > sipxtapi-dev mailing list > [email protected] > List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/ > > Have you tried updating your sound card driver?
My testing code implicitly uses mixer ID 1. Try changing mmresult = mixerOpen(&hmx, 1, 0, 0, MIXER_OBJECTF_MIXER ); to mmresult = mixerOpen(&hmx, 0, 0, 0, MIXER_OBJECTF_MIXER ); to use mixer ID 0. There are also some printfs that should print you the name of the mixer as a string. You should be able to see this name when you go to windows master volume control, options->properties. Test if you have MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE on both mixer IDs. Then set a break point in MpCodec_setGain and see whether it tries to use the same mixer ID that has MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE. If you have this microphone component on both mixers and code in MpCodec_setGain uses mixer with a microphone and yet setting volume doesnt work then it will have to be fixed. I didnt touch the core of MpCodec_setGain, I only added mixer ID detection. When you use MIXERLINE_COMPONENTTYPE_DST_WAVEIN, does it set volume on mic for recording or playback? Jaroslav Libak _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
