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;
|
||||
|
||||
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)
|
||||
{
|
||||
// Ignore subchannel read issues
|
||||
TrackType = track.TrackType;
|
||||
}
|
||||
|
||||
TrackHasEmphasis = ApplyDeEmphasis;
|
||||
@@ -82,7 +82,7 @@ namespace RedBookPlayer
|
||||
CurrentIndex = track.Indexes.Keys.Min();
|
||||
|
||||
// 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)
|
||||
NextTrack();
|
||||
@@ -190,7 +190,7 @@ namespace RedBookPlayer
|
||||
/// <summary>
|
||||
/// Represents the track type
|
||||
/// </summary>
|
||||
public TrackTypeValue? TrackType { get; private set; }
|
||||
public TrackType? TrackType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents the sector starting the section
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.DiscImages;
|
||||
using Aaru.Filters;
|
||||
using Avalonia;
|
||||
@@ -235,8 +236,8 @@ namespace RedBookPlayer
|
||||
dataContext.ApplyDeEmphasis = Player.ApplyDeEmphasis;
|
||||
dataContext.TrackHasEmphasis = Player.TrackHasEmphasis;
|
||||
dataContext.CopyAllowed = Player.CopyAllowed;
|
||||
dataContext.IsAudioTrack = Player.TrackType == TrackTypeValue.Audio;
|
||||
dataContext.IsDataTrack = Player.TrackType == TrackTypeValue.Data;
|
||||
dataContext.IsAudioTrack = Player.TrackType == TrackType.Audio;
|
||||
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