mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use merge pattern.
This commit is contained in:
@@ -1097,8 +1097,7 @@ public sealed partial class Cdrdao
|
||||
{
|
||||
buffer = null;
|
||||
|
||||
if(tag == SectorTagType.CdTrackFlags ||
|
||||
tag == SectorTagType.CdTrackIsrc)
|
||||
if(tag is SectorTagType.CdTrackFlags or SectorTagType.CdTrackIsrc)
|
||||
track = (uint)sectorAddress;
|
||||
|
||||
var aaruTrack = new CdrdaoTrack
|
||||
|
||||
@@ -461,8 +461,7 @@ public sealed partial class Cdrdao
|
||||
|
||||
foreach(Track track in tracks.OrderBy(t => t.Sequence))
|
||||
{
|
||||
if(track.SubchannelType == TrackSubchannelType.Q16 ||
|
||||
track.SubchannelType == TrackSubchannelType.Q16Interleaved)
|
||||
if(track.SubchannelType is TrackSubchannelType.Q16 or TrackSubchannelType.Q16Interleaved)
|
||||
{
|
||||
ErrorMessage = $"Unsupported subchannel type {track.SubchannelType} for track {track.Sequence}";
|
||||
|
||||
@@ -526,8 +525,9 @@ public sealed partial class Cdrdao
|
||||
|
||||
bool data = _writingTracks.Count(t => t.Type != TrackType.Audio) > 0;
|
||||
|
||||
bool mode2 = _writingTracks.Count(t => t.Type == TrackType.CdMode2Form1 || t.Type == TrackType.CdMode2Form2 ||
|
||||
t.Type == TrackType.CdMode2Formless) > 0;
|
||||
bool mode2 =
|
||||
_writingTracks.Count(t => t.Type is TrackType.CdMode2Form1 or TrackType.CdMode2Form2
|
||||
or TrackType.CdMode2Formless) > 0;
|
||||
|
||||
if(mode2)
|
||||
_descriptorStream.WriteLine("CD_ROM_XA");
|
||||
|
||||
Reference in New Issue
Block a user