Add option to allow skipping to index 0 of track 1

This commit is contained in:
deagahelio
2021-04-08 21:39:39 -03:00
parent 93872798fb
commit b2dedea77a
3 changed files with 14 additions and 2 deletions

View File

@@ -345,9 +345,16 @@ namespace RedBookPlayer
if (CurrentSector < (ulong)Image.Tracks[CurrentTrack].Indexes[1] + 75)
{
if (--CurrentTrack < 0)
if (App.Settings.AllowSkipHiddenTrack && CurrentTrack == 0 && CurrentSector >= 75)
{
CurrentTrack = Image.Tracks.Count - 1;
CurrentSector = 0;
}
else
{
if (--CurrentTrack < 0)
{
CurrentTrack = Image.Tracks.Count - 1;
}
}
}

View File

@@ -8,6 +8,7 @@ namespace RedBookPlayer
{
public bool AutoPlay { get; set; } = false;
public bool IndexButtonChangeTrack { get; set; } = false;
public bool AllowSkipHiddenTrack { get; set; } = false;
public int Volume { get; set; } = 100;
public string SelectedTheme { get; set; } = "default";
string filePath;

View File

@@ -17,6 +17,10 @@
<CheckBox IsChecked="{Binding IndexButtonChangeTrack}" Margin="0,0,8,0"/>
<TextBlock VerticalAlignment="Center">Index navigation can change track</TextBlock>
</WrapPanel>
<WrapPanel Margin="0,0,0,16">
<CheckBox IsChecked="{Binding AllowSkipHiddenTrack}" Margin="0,0,8,0"/>
<TextBlock VerticalAlignment="Center">Treat index 0 of track 1 as track 0 (hidden track)</TextBlock>
</WrapPanel>
<DockPanel Margin="0,0,0,16">
<TextBlock VerticalAlignment="Center" Margin="0,0,8,0" DockPanel.Dock="Left">Volume</TextBlock>
<TextBlock VerticalAlignment="Center" DockPanel.Dock="Right" Text="%"/>