mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Fix last access modifier
This commit is contained in:
@@ -99,7 +99,7 @@ namespace RedBookPlayer.Common.Discs
|
|||||||
public override ulong CurrentSector
|
public override ulong CurrentSector
|
||||||
{
|
{
|
||||||
get => _currentSector;
|
get => _currentSector;
|
||||||
set
|
protected set
|
||||||
{
|
{
|
||||||
// Unset image means we can't do anything
|
// Unset image means we can't do anything
|
||||||
if(_image == null)
|
if(_image == null)
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ namespace RedBookPlayer.Common.Discs
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Current sector number
|
/// Current sector number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// TODO: Maske this `protected set`
|
public abstract ulong CurrentSector { get; protected set; }
|
||||||
public abstract ulong CurrentSector { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the sector starting the section
|
/// Represents the sector starting the section
|
||||||
@@ -165,6 +164,12 @@ namespace RedBookPlayer.Common.Discs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract void SetTotalIndexes();
|
public abstract void SetTotalIndexes();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the current sector
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sector">New sector number to use</param>
|
||||||
|
public void SetCurrentSector(ulong sector) => CurrentSector = sector;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load the desired track, if possible
|
/// Load the desired track, if possible
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ namespace RedBookPlayer.Common.Hardware
|
|||||||
if(_opticalDisc == null || !_opticalDisc.Initialized)
|
if(_opticalDisc == null || !_opticalDisc.Initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_opticalDisc.CurrentSector = Math.Min(_opticalDisc.TotalSectors, _opticalDisc.CurrentSector + 75);
|
_opticalDisc.SetCurrentSector(Math.Min(_opticalDisc.TotalSectors, _opticalDisc.CurrentSector + 75));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -370,7 +370,7 @@ namespace RedBookPlayer.Common.Hardware
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(_opticalDisc.CurrentSector >= 75)
|
if(_opticalDisc.CurrentSector >= 75)
|
||||||
_opticalDisc.CurrentSector -= 75;
|
_opticalDisc.SetCurrentSector(_opticalDisc.CurrentSector - 75);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ namespace RedBookPlayer.Common.Hardware
|
|||||||
_currentSectorReadPosition += count;
|
_currentSectorReadPosition += count;
|
||||||
if(_currentSectorReadPosition >= _opticalDisc.BytesPerSector)
|
if(_currentSectorReadPosition >= _opticalDisc.BytesPerSector)
|
||||||
{
|
{
|
||||||
_opticalDisc.CurrentSector += (ulong)(_currentSectorReadPosition / _opticalDisc.BytesPerSector);
|
_opticalDisc.SetCurrentSector(_opticalDisc.CurrentSector + (ulong)(_currentSectorReadPosition / _opticalDisc.BytesPerSector));
|
||||||
_currentSectorReadPosition %= _opticalDisc.BytesPerSector;
|
_currentSectorReadPosition %= _opticalDisc.BytesPerSector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user