public virtual void close()
{
lock (this)
{
AudioDevice out_Renamed = audio;
if (out_Renamed != null)
{
closed = true;
audio = null;
// this may fail, so ensure object state is set up before
// calling this method.
out_Renamed.close();
lastPosition = out_Renamed.Position;
try
{
bitstream.close();
}
catch (BitstreamException ex)
{
}
}
}
}
/// <summary> Stops the audio player. If the player is already stopped /// this method is a no-op. /// </summary> protected internal virtual void stopPlayer() { if (player != null) { player.close(); player = null; playerThread = null; } }