Esempio n. 1
0
		/// <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));
		}
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
		/// <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;
		}