diff --git a/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs b/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs index f0bf4a2..7820129 100644 --- a/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs +++ b/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs @@ -51,15 +51,6 @@ public sealed partial class CoreAudioDevice private ThreadLocal _audioMeterInformation; private IntPtr _audioMeterInformationPtr; - private IPropertyDictionary Properties - { - get - { - ThrowIfDisposed(); - return _properties; - } - } - /// /// Audio Meter Information - Future support /// diff --git a/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.cs b/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.cs index fde43f1..82c23d5 100644 --- a/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.cs +++ b/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.cs @@ -58,6 +58,15 @@ private IMultimediaDevice Device } } + public IPropertyDictionary Properties + { + get + { + ThrowIfDisposed(); + return _properties; + } + } + /// /// Unique identifier for this device /// diff --git a/AudioSwitcher.AudioApi.CoreAudio/Internal/CachedPropertyDictionary.cs b/AudioSwitcher.AudioApi.CoreAudio/Internal/CachedPropertyDictionary.cs index f17cd75..9a3c9b6 100644 --- a/AudioSwitcher.AudioApi.CoreAudio/Internal/CachedPropertyDictionary.cs +++ b/AudioSwitcher.AudioApi.CoreAudio/Internal/CachedPropertyDictionary.cs @@ -127,5 +127,15 @@ public void SetValue(PropertyKey key, object value) Marshal.ThrowExceptionForHR(_propertyStoreInteface.SetValue(ref key, ref value)); _propertyStoreInteface.Commit(); } + + public IEnumerator> GetEnumerator() + { + return _properties.GetEnumerator(); + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } } \ No newline at end of file diff --git a/AudioSwitcher.AudioApi.CoreAudio/Internal/IPropertyDictionary.cs b/AudioSwitcher.AudioApi.CoreAudio/Internal/IPropertyDictionary.cs index ad1484e..f7dc7f6 100644 --- a/AudioSwitcher.AudioApi.CoreAudio/Internal/IPropertyDictionary.cs +++ b/AudioSwitcher.AudioApi.CoreAudio/Internal/IPropertyDictionary.cs @@ -1,8 +1,9 @@ using System; +using System.Collections.Generic; namespace AudioSwitcher.AudioApi.CoreAudio { - internal interface IPropertyDictionary : IDisposable + public interface IPropertyDictionary : IDisposable, IEnumerable> { AccessMode Mode { get; } @@ -14,7 +15,7 @@ internal interface IPropertyDictionary : IDisposable } [Flags] - internal enum AccessMode + public enum AccessMode { Read, Write,