diff --git a/RedBookPlayer/Player.cs b/RedBookPlayer/Player.cs
index d65b127..40f4f09 100644
--- a/RedBookPlayer/Player.cs
+++ b/RedBookPlayer/Player.cs
@@ -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
///
/// Represents the track type
///
- public TrackTypeValue? TrackType { get; private set; }
+ public TrackType? TrackType { get; private set; }
///
/// Represents the sector starting the section
diff --git a/RedBookPlayer/PlayerView.xaml.cs b/RedBookPlayer/PlayerView.xaml.cs
index 4de010c..9e48786 100644
--- a/RedBookPlayer/PlayerView.xaml.cs
+++ b/RedBookPlayer/PlayerView.xaml.cs
@@ -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;
}
});
}
diff --git a/RedBookPlayer/TrackTypeValue.cs b/RedBookPlayer/TrackTypeValue.cs
deleted file mode 100644
index 1e9db11..0000000
--- a/RedBookPlayer/TrackTypeValue.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace RedBookPlayer
-{
- ///
- /// Track type for determining how to handle
- ///
- /// Does not distinguish between different data track types
- public enum TrackTypeValue
- {
- Audio,
- Data
- }
-}
\ No newline at end of file