using System;
// ReSharper disable once CheckNamespace
namespace NAudio.Wave
{
///
/// Represents the interface to a device that can play a WaveFile
///
public interface IWavePlayer : IDisposable
{
///
/// Begin playback
///
void Play();
///
/// Stop playback
///
void Stop();
///
/// Pause Playback
///
void Pause();
///
/// Initialise playback
///
/// The waveprovider to be played
void Init(IWaveProvider waveProvider);
///
/// Current playback state
///
PlaybackState PlaybackState { get; }
///
/// The volume
/// 1.0f is full scale
/// Note that not all implementations necessarily support volume changes
///
float Volume { get; set; }
///
/// Indicates that playback has gone into a stopped state due to
/// reaching the end of the input stream or an error has been encountered during playback
///
event EventHandler PlaybackStopped;
}
///
/// Interface for IWavePlayers that can report position
///
public interface IWavePosition
{
///
/// Position (in terms of bytes played - does not necessarily translate directly to the position within the source audio file)
///
/// Position in bytes
long GetPosition();
///
/// Gets a instance indicating the format the hardware is using.
///
WaveFormat OutputWaveFormat { get; }
}
}