http://www.daniweb.com/tutorials/forum68.html, there should be a button on the bottom for contribute tutorial (the link is for VB Specifically).
Thanks again AlanC,
I have got a sample to do this from ...
'Public Function SelectMicrophone(DeviceID As Long, Optional sError As String) As Boolean ' Dim pmxl As MIXERLINE, pmxlc As MIXERLINECONTROLS, pmxc As MIXERCONTROL, pmxcd As MIXERCONTROLDETAILS, mcdlt() As MIXERCONTROLDETAILS_LISTTEXT, mcdb() As Long ' Dim rc As Long, Index As Long ' On Error GoTo Exception ' 'Get WaveIn Destination Line ID ' Let pmxl.cbStruct = Len(pmxl) ' Let pmxl.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN ' Let rc = mixerGetLineInfo(DeviceID, pmxl, MIXER_GETLINEINFOF_COMPONENTTYPE) ' If rc <> 0 Then GoTo Exception 'Error Trap ' ' 'Get Control ID with MIXER ' Let pmxlc.cbStruct = Len(pmxlc) ' Let pmxlc.dwLineID = pmxl.dwLineID ' Let pmxlc.dwControl = MIXERCONTROL_CONTROLTYPE_MIXER ' Let pmxlc.cControls = pmxl.cControls ' Let pmxlc.cbmxctrl = Len(pmxc) ' Let pmxlc.pamxctrl = VarPtr(pmxc) ' Let rc = mixerGetLineControls(DeviceID, pmxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE) ' ' If rc <> 0 Then ' 'Get Control ID ' Let pmxlc.dwControl = MIXERCONTROL_CONTROLTYPE_MUX ' Let rc = mixerGetLineControls(DeviceID, pmxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE) ' If rc <> 0 Then GoTo Exception 'Error Trap ' End If ' ' 'Get Control Details ' ReDim mcdlt(pmxc.cMultipleItems - 1) ' Let pmxcd.cbStruct = Len(pmxcd) ' Let pmxcd.cChannels = 1 ' Let pmxcd.dwControlID = pmxc.dwControlID ' Let pmxcd.item = pmxc.cMultipleItems ' Let pmxcd.cbDetails = Len(mcdlt(0)) ' Let pmxcd.paDetails = VarPtr(mcdlt(0)) ' Let rc = mixerGetControlDetails(DeviceID, pmxcd, MIXER_GETCONTROLDETAILSF_LISTTEXT) ' If rc <> 0 Then GoTo Exception 'Error Trap ' ' For Index = LBound(mcdlt) To UBound(mcdlt) ' pmxl.dwLineID = mcdlt(Index).dwParam1 ' Let rc = mixerGetLineInfo(DeviceID, pmxl, MIXER_GETLINEINFOF_LINEID) ' If rc <> 0 Then GoTo Exception 'Error Trap ' If pmxl.dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE Then ' Exit For ' End If ' Next ' ' If Index > UBound(mcdlt) Then GoTo Exception ' 'Get Control Values ' ReDim mcdb(pmxc.cMultipleItems - 1) ' Let pmxcd.cbDetails = Len(mcdb(0)) ' Let pmxcd.paDetails = VarPtr(mcdb(0)) ' Let mcdb(Index) = 1 ' Let rc = mixerSetControlDetails(DeviceID, pmxcd, MIXER_SETCONTROLDETAILSF_VALUE) ' If rc <> 0 Then GoTo Exception 'Error Trap ' Let SelectMicrophone = True ' Exit Function 'Exception: 'End Function
but when ever i execute this function, i get fatal error, while closing the main application.
I thing some memory free issue...
can u pls. help me?
This thread just lives on and on!
This is maybe possible but its difficult to do. I've been able to programmatically adjust the master volume but not much else. The fundamental issue is that there is a lot of variation between sound cards. To give you an idea of this, you can have a one-of-n selection switch for record source (e.g Soundblaster) or multiple selections (e.g. ESS chipsets); and the 'Stereo Mix' line you refer to can be called different things or may not exist at all.
Practically, the Win32 API allows you to enumerate the lines and controls in the recording mixer and you have then to make a decision about what you want to do. This will, I believe, be different from one card to another.
I've got a lot on at the moment but I'll have a look at some point.
I did make a start on my audio tutorial but this is a huge task too. I need to ask the moderators what I need to do to to post it up on DaniWeb- I'm sure it'd get loads of hits.
Please I have an autocomplete textbox which fetches value from a tabe in the database. But after i choose the name i want to get the id of the value ...
I want to draw a triangle using mouse events like mousePressed(), mouseReleased() and mouseDragged(). But triangle did not show until mouse release. Please tell me what i am ...
what i have done is copied answer in label and now matching the radiobutton option with it so far so good but i dont know how to uncheck radio button ...