예제 #1
0
        public JcfMedia LoadMedia(Model.SongInfo song)
        {
            string tracksPath = Path.Combine(dataDirectory, "Tracks");
            string songPath   = Path.Combine(dataDirectory, "Tracks", $"{song.Id}".ToUpper() + ".jcf");

            var result = new JcfMedia(song, songPath);

            // Load length
            var beatArray  = PropertyListParser.Parse(Path.Combine(songPath, "beats.plist")) as NSArray;
            var dictionary = beatArray[beatArray.Count - 1] as NSDictionary;
            var position   = dictionary.Double("position") ?? 0;

            result.Length = TimeSpan.FromSeconds(position);

            LoadTracks(result, songPath);

            LoadBeats(result, songPath);

            LoadSections(result, songPath);

            LoadScoreNodes(result, songPath);

            return(result);
        }
예제 #2
0
파일: Settings.cs 프로젝트: hyvart/Unjammit
 public static string PositionKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/Position");
 }
예제 #3
0
파일: Settings.cs 프로젝트: hyvart/Unjammit
 public static string SoloTrackKey(Model.SongInfo song)
 {
     return($"Song/{song.Instrument}/SoloTrack");
 }
예제 #4
0
파일: Settings.cs 프로젝트: hyvart/Unjammit
 public static string MixerCollapsedKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/MixerCollapsed");
 }
예제 #5
0
파일: Settings.cs 프로젝트: hyvart/Unjammit
 public static string SelectedScoreKey(Model.SongInfo song)
 {
     return($"Song/{song.Sku}/SelectedScore");
 }