公開屬性#region 公開屬性
public int BitsPerSample
{
get { return m_Buffer.Format.BitsPerSample; }
}
public int Channels
{
get { return m_Buffer.Format.Channels; }
}
public Device Device
{
get { return m_Device; }
}
public int SamplingRate
{
get { return m_Buffer.Format.SamplesPerSecond; }
}
#endregion
IDisposable Members#region IDisposable Members
public void Dispose()
{
Stop();
if (m_Buffer != null)
{
m_Buffer.Dispose();
m_Buffer = null;
}
if (m_OwnsDevice && (m_Device != null))
{
m_Device.Dispose();
m_Device = null;
}
GC.SuppressFinalize(this);
}
~SoundPlayer()
{
Dispose();
}
#endregion