AudioSessionDisconnectReason.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.Enumerations
  22. {
  23. /// <summary>
  24. /// Defines constants that indicate a reason for an audio session being disconnected.
  25. /// </summary>
  26. /// <remarks>
  27. /// MSDN Reference: Unknown
  28. /// </remarks>
  29. public enum AudioSessionDisconnectReason
  30. {
  31. /// <summary>
  32. /// The user removed the audio endpoint device.
  33. /// </summary>
  34. DisconnectReasonDeviceRemoval = 0,
  35. /// <summary>
  36. /// The Windows audio service has stopped.
  37. /// </summary>
  38. DisconnectReasonServerShutdown = 1,
  39. /// <summary>
  40. /// The stream format changed for the device that the audio session is connected to.
  41. /// </summary>
  42. DisconnectReasonFormatChanged = 2,
  43. /// <summary>
  44. /// The user logged off the WTS session that the audio session was running in.
  45. /// </summary>
  46. DisconnectReasonSessionLogoff = 3,
  47. /// <summary>
  48. /// The WTS session that the audio session was running in was disconnected.
  49. /// </summary>
  50. DisconnectReasonSessionDisconnected = 4,
  51. /// <summary>
  52. /// The (shared-mode) audio session was disconnected to make the audio endpoint device available for an exclusive-mode connection.
  53. /// </summary>
  54. DisconnectReasonExclusiveModeOverride = 5
  55. }
  56. }