2024-06-07 00:47:07 +02:00

46 lines
1.0 KiB
C#

using NAudio.CoreAudioApi.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace NAudio.CoreAudioApi
{
public class PartsList
{
private IPartsList partsListInterface;
internal PartsList(IPartsList partsList)
{
partsListInterface = partsList;
}
public uint Count
{
get
{
uint result = 0;
if (partsListInterface != null)
{
partsListInterface.GetCount(out result);
}
return result;
}
}
public Part this[uint index]
{
get
{
if (partsListInterface == null)
{
throw new IndexOutOfRangeException();
}
partsListInterface.GetPart(index, out IPart part);
return new Part(part);
}
}
}
}