KSJACK_DESCRIPTION.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // -----------------------------------------
  2. // SoundScribe (TM) and related software.
  3. //
  4. // Copyright (C) 2007-2011 Vannatech
  5. // http://www.vannatech.com
  6. // All rights reserved.
  7. //
  8. // This source code is subject to the MIT License.
  9. // http://www.opensource.org/licenses/mit-license.php
  10. //
  11. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  17. // THE SOFTWARE.
  18. // -----------------------------------------
  19. using System;
  20. using System.Runtime.InteropServices;
  21. namespace Vannatech.CoreAudio.Structures
  22. {
  23. /// <summary>
  24. /// Describes an audio jack.
  25. /// </summary>
  26. /// <remarks>
  27. /// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd316543.aspx
  28. /// </remarks>
  29. [StructLayout(LayoutKind.Sequential)]
  30. public struct KSJACK_DESCRIPTION
  31. {
  32. /// <summary>
  33. /// Specifies the mapping of the two audio channels in a stereo jack to speaker positions.
  34. /// </summary>
  35. [MarshalAs(UnmanagedType.I4)]
  36. public Int32 ChannelMapping;
  37. /// <summary>
  38. /// The jack color.
  39. /// </summary>
  40. [MarshalAs(UnmanagedType.U4)]
  41. public UInt32 Color;
  42. /// <summary>
  43. /// The connection type.
  44. /// </summary>
  45. [MarshalAs(UnmanagedType.I4)]
  46. public Int32 ConnectionType;
  47. /// <summary>
  48. /// The geometric location of the jack.
  49. /// </summary>
  50. [MarshalAs(UnmanagedType.I4)]
  51. public Int32 GeoLocation;
  52. /// <summary>
  53. /// The general location of the jack.
  54. /// </summary>
  55. [MarshalAs(UnmanagedType.I4)]
  56. public Int32 GenLocation;
  57. /// <summary>
  58. /// The type of port represented by the jack.
  59. /// </summary>
  60. [MarshalAs(UnmanagedType.I4)]
  61. public Int32 PortConnection;
  62. /// <summary>
  63. /// Indicates whether an endpoint device is plugged into the jack, if supported by the adapter.
  64. /// </summary>
  65. [MarshalAs(UnmanagedType.Bool)]
  66. public bool IsConnected;
  67. }
  68. }