mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Implement auto-play functionality
This commit is contained in:
@@ -104,7 +104,7 @@ namespace RedBookPlayer
|
||||
BiQuadFilter deEmphasisFilterRight;
|
||||
bool readingImage = false;
|
||||
|
||||
public async void Init(AaruFormat image)
|
||||
public async void Init(AaruFormat image, bool autoPlay = false)
|
||||
{
|
||||
this.Image = image;
|
||||
|
||||
@@ -152,7 +152,10 @@ namespace RedBookPlayer
|
||||
|
||||
soundOut = new ALSoundOut(50);
|
||||
soundOut.Initialize(source);
|
||||
soundOut.Play();
|
||||
if (autoPlay)
|
||||
{
|
||||
soundOut.Play();
|
||||
}
|
||||
|
||||
LoadTrack(CurrentTrack);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace RedBookPlayer
|
||||
|
||||
player?.Shutdown();
|
||||
player = new Player();
|
||||
player.Init(image);
|
||||
player.Init(image, App.Settings.AutoPlay);
|
||||
});
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
|
||||
Reference in New Issue
Block a user