mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Use Aaru.CommonTypes.Enums.TrackType
This commit is contained in:
@@ -69,11 +69,11 @@ namespace RedBookPlayer
|
|||||||
ApplyDeEmphasis = (subchannel[3] & 0b01000000) != 0;
|
ApplyDeEmphasis = (subchannel[3] & 0b01000000) != 0;
|
||||||
|
|
||||||
CopyAllowed = (subchannel[2] & 0b01000000) != 0;
|
CopyAllowed = (subchannel[2] & 0b01000000) != 0;
|
||||||
TrackType = (subchannel[1] & 0b01000000) != 0 ? TrackTypeValue.Data : TrackTypeValue.Audio;
|
TrackType = (subchannel[1] & 0b01000000) != 0 ? Aaru.CommonTypes.Enums.TrackType.Data : Aaru.CommonTypes.Enums.TrackType.Audio;
|
||||||
}
|
}
|
||||||
catch(ArgumentException)
|
catch(ArgumentException)
|
||||||
{
|
{
|
||||||
// Ignore subchannel read issues
|
TrackType = track.TrackType;
|
||||||
}
|
}
|
||||||
|
|
||||||
TrackHasEmphasis = ApplyDeEmphasis;
|
TrackHasEmphasis = ApplyDeEmphasis;
|
||||||
@@ -82,7 +82,7 @@ namespace RedBookPlayer
|
|||||||
CurrentIndex = track.Indexes.Keys.Min();
|
CurrentIndex = track.Indexes.Keys.Min();
|
||||||
|
|
||||||
// If we're not playing data tracks, skip
|
// If we're not playing data tracks, skip
|
||||||
if(!App.Settings.PlayDataTracks && TrackType == TrackTypeValue.Data)
|
if(!App.Settings.PlayDataTracks && TrackType != Aaru.CommonTypes.Enums.TrackType.Audio)
|
||||||
{
|
{
|
||||||
if(increment)
|
if(increment)
|
||||||
NextTrack();
|
NextTrack();
|
||||||
@@ -190,7 +190,7 @@ namespace RedBookPlayer
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the track type
|
/// Represents the track type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TrackTypeValue? TrackType { get; private set; }
|
public TrackType? TrackType { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the sector starting the section
|
/// Represents the sector starting the section
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
using Aaru.CommonTypes.Enums;
|
||||||
using Aaru.DiscImages;
|
using Aaru.DiscImages;
|
||||||
using Aaru.Filters;
|
using Aaru.Filters;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
@@ -235,8 +236,8 @@ namespace RedBookPlayer
|
|||||||
dataContext.ApplyDeEmphasis = Player.ApplyDeEmphasis;
|
dataContext.ApplyDeEmphasis = Player.ApplyDeEmphasis;
|
||||||
dataContext.TrackHasEmphasis = Player.TrackHasEmphasis;
|
dataContext.TrackHasEmphasis = Player.TrackHasEmphasis;
|
||||||
dataContext.CopyAllowed = Player.CopyAllowed;
|
dataContext.CopyAllowed = Player.CopyAllowed;
|
||||||
dataContext.IsAudioTrack = Player.TrackType == TrackTypeValue.Audio;
|
dataContext.IsAudioTrack = Player.TrackType == TrackType.Audio;
|
||||||
dataContext.IsDataTrack = Player.TrackType == TrackTypeValue.Data;
|
dataContext.IsDataTrack = Player.TrackType != TrackType.Audio;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
namespace RedBookPlayer
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Track type for determining how to handle
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Does not distinguish between different data track types</remarks>
|
|
||||||
public enum TrackTypeValue
|
|
||||||
{
|
|
||||||
Audio,
|
|
||||||
Data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user