Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming you have the ID of the input and output devices, you could use something like the following to get the corresponding mixer IDs. If both are the same, both are attached to the same mixer, and most likely part of the same physical hardware.</p> <pre><code> /// &lt;summary&gt; /// Get the ID of the mixer associated with the given input device ID /// Returns -1 if no such mixer can be found /// &lt;/summary&gt; static public int GetMixerIdInput(int inputId) { int mixerId = -1; int result = MmeMixerApi.mixerGetID(inputId, ref mixerId, MIXER_OBJECTFLAG.WAVEIN); if (((MMError)result != MMError.MMSYSERR_NOERROR) &amp;&amp; ((MMError)result != MMError.MMSYSERR_NODRIVER)) { throw new MmeException((MMError)result); } return mixerId; } /// &lt;summary&gt; /// Get the ID of the mixer associated with the given output device ID /// Returns -1 if no such mixer can be found /// &lt;/summary&gt; static public int GetMixerIdOutput(int outputId) { int mixerId = -1; int result = MmeMixerApi.mixerGetID(outputId, ref mixerId, MIXER_OBJECTFLAG.WAVEOUT); if (((MMError)result != MMError.MMSYSERR_NOERROR) &amp;&amp; ((MMError)result != MMError.MMSYSERR_NODRIVER)) { throw new MmeException((MMError)result); } return mixerId; } </code></pre> <p>If you only have the name for the input device, you can use something like the following to find the device ID:</p> <pre><code> /// &lt;summary&gt; /// Find the ID of the input device given a name /// &lt;/summary&gt; static public int GetWaveInputId(string name) { int id = MmeWaveApi.WAVE_MAPPER; int devCount = MmeWaveApi.waveInGetNumDevs(); WAVEINCAPS caps = new WAVEINCAPS(); for (int dev = 0; (dev &lt; devCount) &amp;&amp; (id == MmeWaveApi.WAVE_MAPPER); dev++) { int result = MmeWaveApi.waveInGetDevCaps(dev, ref caps, Marshal.SizeOf(caps)); if ((MMError)result == MMError.MMSYSERR_NOERROR) { if (string.Compare(name, 0, caps.szPname, 0, Math.Min(name.Length, caps.szPname.Length)) == 0) { id = dev; } } } return id; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload