mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Display time relative to start of current index
This commit is contained in:
@@ -71,7 +71,22 @@ namespace RedBookPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
public ushort CurrentIndex { get; private set; } = 1;
|
||||
ushort currentIndex = 1;
|
||||
public ushort CurrentIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return currentIndex;
|
||||
}
|
||||
|
||||
private set
|
||||
{
|
||||
currentIndex = value;
|
||||
|
||||
Console.WriteLine("thing set");
|
||||
SectionStartSector = (ulong)Image.Tracks[CurrentTrack].Indexes[CurrentIndex];
|
||||
}
|
||||
}
|
||||
private ulong currentSector = 0;
|
||||
private int currentSectorReadPosition = 0;
|
||||
public ulong CurrentSector
|
||||
@@ -116,6 +131,7 @@ namespace RedBookPlayer
|
||||
public bool ApplyDeEmphasis { get; private set; } = false;
|
||||
public bool CopyAllowed { get; private set; } = false;
|
||||
public TrackType? TrackType_ { get; private set; }
|
||||
public ulong SectionStartSector { get; private set; }
|
||||
public int TotalTracks { get; private set; } = 0;
|
||||
public int TotalIndexes { get; private set; } = 0;
|
||||
public ulong TimeOffset { get; private set; } = 0;
|
||||
|
||||
@@ -136,12 +136,22 @@ namespace RedBookPlayer
|
||||
{
|
||||
if (Player.Initialized)
|
||||
{
|
||||
ulong sectorTime = Player.CurrentSector;
|
||||
if (Player.SectionStartSector != 0)
|
||||
{
|
||||
sectorTime -= Player.SectionStartSector;
|
||||
}
|
||||
else
|
||||
{
|
||||
sectorTime += Player.TimeOffset;
|
||||
}
|
||||
|
||||
int[] numbers = new int[]{
|
||||
Player.CurrentTrack + 1,
|
||||
Player.CurrentIndex,
|
||||
(int)((Player.CurrentSector + Player.TimeOffset) / (75 * 60)),
|
||||
(int)(((Player.CurrentSector + Player.TimeOffset) / 75) % 60),
|
||||
(int)((Player.CurrentSector + Player.TimeOffset) % 75),
|
||||
(int)(sectorTime / (75 * 60)),
|
||||
(int)((sectorTime / 75) % 60),
|
||||
(int)(sectorTime % 75),
|
||||
Player.TotalTracks,
|
||||
Player.TotalIndexes,
|
||||
(int)(Player.TotalTime / (75 * 60)),
|
||||
|
||||
Reference in New Issue
Block a user