[gnome-games] utils: Add CueSheetTrackMode
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] utils: Add CueSheetTrackMode
- Date: Thu, 28 Jul 2016 09:48:53 +0000 (UTC)
commit 833de8844398bd156da5ae22f947f9235abb945d
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Jul 28 10:57:30 2016 +0200
utils: Add CueSheetTrackMode
This will be used in a later commit to improve cue sheets handling.
src/Makefile.am | 1 +
src/utils/cue-sheet/cue-sheet-track-mode.vala | 36 +++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ff039fc..2ff36ea 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -106,6 +106,7 @@ gnome_games_SOURCES = \
\
utils/cue-sheet/cue-sheet-file-format.vala \
utils/cue-sheet/cue-sheet-file-node.vala \
+ utils/cue-sheet/cue-sheet-track-mode.vala \
utils/filename-title.vala \
utils/fingerprint.vala \
utils/generic-game.vala \
diff --git a/src/utils/cue-sheet/cue-sheet-track-mode.vala b/src/utils/cue-sheet/cue-sheet-track-mode.vala
new file mode 100644
index 0000000..afe1034
--- /dev/null
+++ b/src/utils/cue-sheet/cue-sheet-track-mode.vala
@@ -0,0 +1,36 @@
+// This file is part of GNOME Games. License: GPLv3
+
+public enum Games.CueSheetTrackMode {
+ INVALID,
+ AUDIO,
+ CDG,
+ MODE1_2048,
+ MODE1_2352,
+ MODE2_2336,
+ MODE2_2352,
+ CDI_2336,
+ CDI_2352;
+
+ public static CueSheetTrackMode parse_string (string value) {
+ switch (value) {
+ case "AUDIO":
+ return CueSheetTrackMode.AUDIO;
+ case "CDG":
+ return CueSheetTrackMode.CDG;
+ case "MODE1/2048":
+ return CueSheetTrackMode.MODE1_2048;
+ case "MODE1/2352":
+ return CueSheetTrackMode.MODE1_2352;
+ case "MODE2/2336":
+ return CueSheetTrackMode.MODE2_2336;
+ case "MODE2/2352":
+ return CueSheetTrackMode.MODE2_2352;
+ case "CDI/2336":
+ return CueSheetTrackMode.CDI_2336;
+ case "CDI/2352":
+ return CueSheetTrackMode.CDI_2352;
+ default:
+ return CueSheetTrackMode.INVALID;
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]