mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Handle data track corner cases
This commit is contained in:
@@ -153,6 +153,13 @@ namespace RedBookPlayer.Common.Hardware
|
||||
// Set the current volume
|
||||
_soundOut.Volume = (float)Volume / 100;
|
||||
|
||||
// If we have an unreadable track, just return
|
||||
if (_opticalDisc.BytesPerSector <= 0)
|
||||
{
|
||||
Array.Clear(buffer, offset, count);
|
||||
return count;
|
||||
}
|
||||
|
||||
// Determine how many sectors we can read
|
||||
ulong sectorsToRead;
|
||||
ulong zeroSectorsAmount;
|
||||
|
||||
Reference in New Issue
Block a user