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;
|
BiQuadFilter deEmphasisFilterRight;
|
||||||
bool readingImage = false;
|
bool readingImage = false;
|
||||||
|
|
||||||
public async void Init(AaruFormat image)
|
public async void Init(AaruFormat image, bool autoPlay = false)
|
||||||
{
|
{
|
||||||
this.Image = image;
|
this.Image = image;
|
||||||
|
|
||||||
@@ -152,7 +152,10 @@ namespace RedBookPlayer
|
|||||||
|
|
||||||
soundOut = new ALSoundOut(50);
|
soundOut = new ALSoundOut(50);
|
||||||
soundOut.Initialize(source);
|
soundOut.Initialize(source);
|
||||||
|
if (autoPlay)
|
||||||
|
{
|
||||||
soundOut.Play();
|
soundOut.Play();
|
||||||
|
}
|
||||||
|
|
||||||
LoadTrack(CurrentTrack);
|
LoadTrack(CurrentTrack);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace RedBookPlayer
|
|||||||
|
|
||||||
player?.Shutdown();
|
player?.Shutdown();
|
||||||
player = new Player();
|
player = new Player();
|
||||||
player.Init(image);
|
player.Init(image, App.Settings.AutoPlay);
|
||||||
});
|
});
|
||||||
|
|
||||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user