namespace Harmonia.Core.Engine;

public interface IAudioEngine
{
    string[] SupportedFormats { get; }
    string? Source { get; }
    TimeSpan Position { get; set; }
    TimeSpan Length { get; }
    float Volume { get; set; }
    bool CanPause { get; }
    bool IsMuted { get; set; }
    AudioPlaybackState State { get; }

    Task<bool> LoadAsync(string fileName);
    void Play();
    void Pause();
    void Stop();

    event EventHandler<PlaybackStoppedEventArgs> PlaybackStopped;
    event EventHandler StreamFinished;
    event EventHandler<PlaybackStateChangedEventArgs> StateChanged;
}