Exemplo n.º 1
0
        /// <summary>
        /// DataChunk を読み込みます。
        /// </summary>
        /// <param name="reader">BinaryReader。</param>
        /// <returns>DataChunk。</returns>
        public static WaveDataChunk ReadFrom(BinaryReader reader)
        {
            var result = new WaveDataChunk();

            result.Header = ChunkHeader.ReadFrom(reader);
            result.Data = reader.ReadBytes(result.Header.Size);

            return result;
        }
Exemplo n.º 2
0
        /// <summary>
        /// DataChunk を読み込みます。
        /// </summary>
        /// <param name="reader">BinaryReader。</param>
        /// <returns>DataChunk。</returns>
        public static WaveDataChunk ReadFrom(BinaryReader reader)
        {
            var result = new WaveDataChunk();

            result.Header = ChunkHeader.ReadFrom(reader);
            result.Data   = reader.ReadBytes(result.Header.Size);

            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// WaveData を読み込みます。
        /// </summary>
        /// <param name="reader">Wave ファイルの BinaryReader。</param>
        /// <returns>WaveData。</returns>
        public static WaveData ReadFrom(BinaryReader reader)
        {
            var result = new WaveData();

            result.Riff   = RiffChunk.ReadFrom(reader);
            result.Format = WaveFormatChunk.ReadFrom(reader);
            result.Data   = WaveDataChunk.ReadFrom(reader);

            return(result);
        }