Added audio player logic and tests.

This commit is contained in:
2025-02-24 00:15:17 -05:00
parent f8cda3105a
commit 3c2c39e659
14 changed files with 1174 additions and 41 deletions

View File

@@ -0,0 +1,28 @@
using Harmonia.Core.Engine;
using Harmonia.Core.Playlists;
using System.ComponentModel;
namespace Harmonia.Core.Player;
public interface IAudioPlayer
{
Playlist? Playlist { get; }
PlaylistSong? PlayingSong { get; }
double Position { get; set; }
RepeatState RepeatState { get; set; }
double Volume { get; set; }
bool IsRandom { get; set; }
bool IsMuted { get; set; }
AudioPlaybackState State { get; }
Task<bool> LoadAsync(int index, PlaybackMode mode);
Task<bool> LoadAsync(PlaylistSong song, PlaybackMode mode);
void Play();
void Pause();
void Stop();
Task PreviousAsync();
Task NextAsync();
event PropertyChangedEventHandler PropertyChanged;
}