Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ public sealed partial class CoreAudioDevice
private ThreadLocal<IAudioMeterInformation> _audioMeterInformation;
private IntPtr _audioMeterInformationPtr;

private IPropertyDictionary Properties
{
get
{
ThrowIfDisposed();
return _properties;
}
}

/// <summary>
/// Audio Meter Information - Future support
/// </summary>
Expand Down
9 changes: 9 additions & 0 deletions AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ private IMultimediaDevice Device
}
}

public IPropertyDictionary Properties
{
get
{
ThrowIfDisposed();
return _properties;
}
}

/// <summary>
/// Unique identifier for this device
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,15 @@ public void SetValue(PropertyKey key, object value)
Marshal.ThrowExceptionForHR(_propertyStoreInteface.SetValue(ref key, ref value));
_propertyStoreInteface.Commit();
}

public IEnumerator<KeyValuePair<PropertyKey, object>> GetEnumerator()
{
return _properties.GetEnumerator();
}

System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;

namespace AudioSwitcher.AudioApi.CoreAudio
{
internal interface IPropertyDictionary : IDisposable
public interface IPropertyDictionary : IDisposable, IEnumerable<KeyValuePair<PropertyKey, object>>
{
AccessMode Mode { get; }

Expand All @@ -14,7 +15,7 @@ internal interface IPropertyDictionary : IDisposable
}

[Flags]
internal enum AccessMode
public enum AccessMode
{
Read,
Write,
Expand Down