mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Fix disc changing, especially in single-disc mode
This commit is contained in:
@@ -765,9 +765,19 @@ namespace RedBookPlayer.Models.Hardware
|
|||||||
if (wasPlaying == PlayerState.Playing)
|
if (wasPlaying == PlayerState.Playing)
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
|
if(discNumber >= _numberOfDiscs)
|
||||||
|
discNumber = 0;
|
||||||
|
else if(discNumber < 0)
|
||||||
|
discNumber = _numberOfDiscs - 1;
|
||||||
|
|
||||||
_currentSectorReadPosition = 0;
|
_currentSectorReadPosition = 0;
|
||||||
|
|
||||||
CurrentDisc = discNumber;
|
CurrentDisc = discNumber;
|
||||||
|
|
||||||
|
// If we're in single disc mode, we need to reload the full track list
|
||||||
|
if(DiscHandling == DiscHandling.SingleDisc)
|
||||||
|
LoadTrackList();
|
||||||
|
|
||||||
if (_opticalDiscs[CurrentDisc] != null && _opticalDiscs[CurrentDisc].Initialized)
|
if (_opticalDiscs[CurrentDisc] != null && _opticalDiscs[CurrentDisc].Initialized)
|
||||||
{
|
{
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user