public void LoadVorbisBuffer(OggStreamBuffer ovb, LoopCommentExtension loop) { loop_start = loop.Start * 4; loop_length = loop.Length * 4; loop_end = loop.End * 4; total = loop.Total; }
public LoopCommentExtension(OggStreamBuffer owner) { total = owner.GetTotalPcm (-1); foreach (var cmt in owner.GetComment(-1).Comments) { var comment = cmt.Replace(" ", ""); // trim spaces if (comment.StartsWith("LOOPSTART=")) loop_start = int.Parse(comment.Substring("LOOPSTART=".Length)); if (comment.StartsWith("LOOPLENGTH=")) loop_length = int.Parse(comment.Substring("LOOPLENGTH=".Length)); } if (loop_start > 0 && loop_length > 0) loop_end = (loop_start + loop_length); }
public LoopCommentExtension(OggStreamBuffer owner) { total = owner.GetTotalPcm(-1); foreach (var cmt in owner.GetComment(-1).Comments) { var comment = cmt.Replace(" ", ""); // trim spaces if (comment.StartsWith("LOOPSTART=")) { loop_start = int.Parse(comment.Substring("LOOPSTART=".Length)); } if (comment.StartsWith("LOOPLENGTH=")) { loop_length = int.Parse(comment.Substring("LOOPLENGTH=".Length)); } } if (loop_start > 0 && loop_length > 0) { loop_end = (loop_start + loop_length); } }
public void SelectFile(string file) { var hist = GetPlayHistory(); if (!hist.Contains(file)) { var ifs = IsolatedStorageFile.GetUserStoreForApplication(); using (var sw = new StreamWriter(ifs.OpenFile("history.txt", FileMode.Create))) { sw.WriteLine(file); foreach (var h in hist.Take(Math.Min(9, hist.Length))) { sw.WriteLine(h); } } } Stream input = File.OpenRead(file); vorbis_buffer = new OggStreamBuffer(input); loop = new LoopCommentExtension(vorbis_buffer); InitializeVorbisBuffer(); }
public void SelectFile(string file) { var hist = GetPlayHistory (); if (!hist.Contains (file)) { var ifs = IsolatedStorageFile.GetUserStoreForApplication (); using (var sw = new StreamWriter (ifs.OpenFile ("history.txt", FileMode.Create))) { sw.WriteLine(file); foreach (var h in hist.Take (Math.Min (9, hist.Length))) sw.WriteLine (h); } } Stream input = File.OpenRead (file); vorbis_buffer = new OggStreamBuffer (input); loop = new LoopCommentExtension (vorbis_buffer); InitializeVorbisBuffer (); }