From: <mis...@us...> - 2007-02-22 09:40:23
|
Revision: 131 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=131&view=rev Author: misterd_sf Date: 2007-02-22 01:40:19 -0800 (Thu, 22 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-02-21 20:39:12 UTC (rev 130) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-02-22 09:40:19 UTC (rev 131) @@ -27,15 +27,14 @@ using System.ComponentModel; using System.Data; using System.Drawing; +using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; using System.Xml; using MediaPortal.GUI.Library; using MediaPortal.Util; using MediaPortal.Configuration; -using Un4seen.Bass; - namespace MPlayer { /// <summary> /// Configuration Form for the External player plugin @@ -65,9 +64,11 @@ osdFont.Items.AddRange(manager.PossibleFonts); soundOutputDevice.Items.Clear(); soundOutputDevice.Items.Add("Default DirectSound Device"); - string[] soundDevices = Bass.BASS_GetDeviceDescriptions(); - for (int i = 1; i < soundDevices.Length; i++) { - soundOutputDevice.Items.Add(soundDevices[i]); + AudioMixerHelper.MIXERCAPS wic = new AudioMixerHelper.MIXERCAPS(); + int iNumDevs = mixerGetNumDevs(); + for (int i = 0; i < iNumDevs; i++) { + mixerGetDevCaps(i, ref wic, Marshal.SizeOf(wic)); + soundOutputDevice.Items.Add(wic.szPname); } } #endregion @@ -445,6 +446,22 @@ } #endregion - + #region external calls + /// <summary> + /// The mixerGetDevCaps function queries a specified mixer device to determine its capabilities. + /// </summary> + /// <param name="uMxId">Identifier or handle of an open mixer device.</param> + /// <param name="pmxcaps">Pointer to a MIXERCAPS structure that receives information about the capabilities of the device.</param> + /// <param name="cbmxcaps">Size, in bytes, of the MIXERCAPS structure.</param> + /// <returns>Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.</returns> + [DllImport("winmm.dll", CharSet = CharSet.Ansi)] + public static extern int mixerGetDevCaps(int uMxId, ref AudioMixerHelper.MIXERCAPS pmxcaps, int cbmxcaps); + /// <summary> + /// The mixerGetNumDevs function retrieves the number of mixer devices present in the system. + /// </summary> + /// <returns>Returns the number of mixer devices or zero if no mixer devices are available.</returns> + [DllImport("winmm.dll", SetLastError = true)] + public static extern int mixerGetNumDevs(); + #endregion } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |