Class MMDeviceCollection
- Namespace
- NAudio.CoreAudioApi
- Assembly
- NAudio.Wasapi.dll
A snapshot of audio endpoints returned by
EnumerateAudioEndPoints(DataFlow, DeviceState). Indexable and enumerable;
each access materialises a fresh MMDevice wrapper around the same
underlying COM endpoint. Dispose when finished to release the underlying
IMMDeviceCollection.
public class MMDeviceCollection : IEnumerable<MMDevice>, IEnumerable, IDisposable
- Inheritance
-
MMDeviceCollection
- Implements
- Inherited Members
Properties
Count
Number of endpoints in this collection.
public int Count { get; }
Property Value
this[int]
Returns the endpoint at index. The returned MMDevice
is a fresh wrapper — call Dispose() when finished.
public MMDevice this[int index] { get; }
Parameters
indexint
Property Value
Methods
Dispose()
Releases the underlying IMMDeviceCollection. Iterators previously
obtained from this collection should no longer be used after disposal.
public void Dispose()
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<MMDevice> GetEnumerator()
Returns
- IEnumerator<MMDevice>
An enumerator that can be used to iterate through the collection.