예제 #1
0
 private MIXERLINE GetLine()
 {
     MIXERLINE ml=new MIXERLINE();
     if(this.component_type==MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE)
     {
         MIXERLINE inLine=new MIXERLINE();
         inLine.cbStruct=Marshal.SizeOf(inLine);
         inLine.dwComponentType=Mixer.MIXERLINE_COMPONENTTYPE_DST_WAVEIN;
         Mixer.mixerGetLineInfo((int)mixer.Handle,ref inLine,Mixer.MIXER_GETLINEINFOF_COMPONENTTYPE);
         for(int i=0;i<inLine.cConnections;i++)
         {
             ml=new MIXERLINE();
             ml.cbStruct=Marshal.SizeOf(ml);
             ml.dwSource=(uint)i;
             ml.dwDestination=inLine.dwDestination;
             Mixer.mixerGetLineInfo((int)mixer.Handle,ref ml,Mixer.MIXER_GETLINEINFOF_SOURCE);
             if(ml.dwComponentType==this.component_type)break;
         }
     }
     else
     {
         ml=new MIXERLINE();
         ml.cbStruct=Marshal.SizeOf(ml);
         ml.dwComponentType=this.component_type;
         Mixer.mixerGetLineInfo((int)mixer.Handle,ref ml, Mixer.MIXER_OBJECTF_HMIXER|Mixer.MIXER_GETLINEINFOF_COMPONENTTYPE);
     }
     return ml;
 }
예제 #2
0
        public static extern int mixerGetLineInfo(
			int hmxobj,
			ref MIXERLINE pmxl,
			uint fdwInfo
			);