mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Add subchannel reading helpers
This commit is contained in:
@@ -356,6 +356,13 @@ namespace RedBookPlayer.Models.Discs
|
|||||||
/// <returns>Byte array representing the read sectors, if possible</returns>
|
/// <returns>Byte array representing the read sectors, if possible</returns>
|
||||||
public byte[] ReadSectors(uint sectorsToRead, DataPlayback dataPlayback) => ReadSectors(CurrentSector, sectorsToRead, dataPlayback);
|
public byte[] ReadSectors(uint sectorsToRead, DataPlayback dataPlayback) => ReadSectors(CurrentSector, sectorsToRead, dataPlayback);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Read subchannel data from the base image starting from the specified sector
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sectorsToRead">Current number of sectors to read</param>
|
||||||
|
/// <returns>Byte array representing the read subchannels, if possible</returns>
|
||||||
|
public byte[] ReadSubchannels(uint sectorsToRead) => ReadSubchannels(CurrentSector, sectorsToRead);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read sector data from the base image starting from the specified sector
|
/// Read sector data from the base image starting from the specified sector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -381,6 +388,15 @@ namespace RedBookPlayer.Models.Discs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Read subchannel data from the base image starting from the specified sector
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="startSector">Sector to start at for reading</param>
|
||||||
|
/// <param name="sectorsToRead">Current number of sectors to read</param>
|
||||||
|
/// <returns>Byte array representing the read subchannels, if possible</returns>
|
||||||
|
private byte[] ReadSubchannels(ulong startSector, uint sectorsToRead)
|
||||||
|
=> _image.ReadSectorsTag(startSector, sectorsToRead, SectorTagType.CdSectorSubchannel);
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void SetTotalIndexes()
|
public override void SetTotalIndexes()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user