/// <summary> /// Adds a cue to the Wave file /// </summary> /// <param name="position">Sample position</param> /// <param name="label">Label text</param> public void AddCue(int position, string label) { if (cues == null) { cues = new CueList(); } cues.Add(new Cue(position, label)); }
internal static CueList FromChunks(WaveFileReader reader) { CueList result = null; byte[] array = null; byte[] array2 = null; foreach (RiffChunk riffChunk in reader.ExtraChunks) { if (riffChunk.IdentifierAsString.ToLower() == "cue ") { array = reader.GetChunkData(riffChunk); } else if (riffChunk.IdentifierAsString.ToLower() == "list") { array2 = reader.GetChunkData(riffChunk); } } if (array != null && array2 != null) { result = new CueList(array, array2); } return(result); }
/// <summary> /// Checks if the cue and list chunks exist and if so, creates a cue list /// </summary> internal static CueList FromChunks(WaveFileReader reader) { CueList cueList = null; byte[] cueChunkData = null; byte[] listChunkData = null; foreach (RiffChunk chunk in reader.ExtraChunks) { if (chunk.IdentifierAsString.ToLower() == "cue ") { cueChunkData = reader.GetChunkData(chunk); } else if (chunk.IdentifierAsString.ToLower() == "list") { listChunkData = reader.GetChunkData(chunk); } } if (cueChunkData != null && listChunkData != null) { cueList = new CueList(cueChunkData, listChunkData); } return(cueList); }
/// <summary> /// Checks if the cue and list chunks exist and if so, creates a cue list /// </summary> internal static CueList FromChunks(WaveFileReader reader) { CueList cueList = null; byte[] cueChunkData = null; byte[] listChunkData = null; foreach (RiffChunk chunk in reader.ExtraChunks) { if (chunk.IdentifierAsString.ToLower() == "cue ") { cueChunkData = reader.GetChunkData(chunk); } else if (chunk.IdentifierAsString.ToLower() == "list") { listChunkData = reader.GetChunkData(chunk); } } if (cueChunkData != null && listChunkData != null) { cueList = new CueList(cueChunkData, listChunkData); } return cueList; }