Added audio player logic and tests.
This commit is contained in:
28
Harmonia.Core/Player/IAudioPlayer.cs
Normal file
28
Harmonia.Core/Player/IAudioPlayer.cs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user