I'm trying to set the controls for the audio line
MIXERLINE_COMPONENTTYPE_DST_WAVEIN using the mixer APIs...
The following code gives me junk values for the LineID and szName values
for this audio line...
Can anyone tell me why??
-------------------------------------------------------------------------------------------
mmResult =
waveInOpen(&m_hWaveIn,WAVE_MAPPER,&m_waveFormatEx,(DWORD)hWnd,NULL,CALLBACK_THREAD);
if(mmResult != MMSYSERR_NOERROR){
printf("waveInOpen Failed!\n");
return;
}
printf("waveInOpen successfully returned\n");
mmResult =
mixerOpen(&MixerHandle,(DWORD)m_hWaveIn,0,0,MIXER_OBJECTF_HWAVEIN);
if (mmResult != MMSYSERR_NOERROR)
{
printf("Device does not have mixer support! -- %08X\n", err);
goto CloseMixer;
}
printf("Mixer Sucessfully opened\n");
MIXERLINE mixerline;
mixerLine.cbStruct = sizeof(MIXERLINE);
mixerLine.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;
mmResult = mixerGetLineInfo((HMIXEROBJ)MixerHandle, &mixerLine,
MIXER_GETLINEINFOF_COMPONENTTYPE);
if (mmResult != MMSYSERR_NOERROR)
{
printf("Device does not have a WAVE recording control! -- %08X\n",
err);
goto CloseMixer;
}
printf("Line name=%s,%ld\n",mixerline.szName,mixerline.dwLineID);
------------------------------------------------------------------------------------------


|