Ejemplo n.º 1
0
 public override void LoadFromStream(Stream st)
 {
     byte[] data = new byte[4];
     m_posStart = st.Position - 4;
     st.Read(data, 0, 4);
     m_nSize     = BitConverter.ToInt32(data, 0);
     m_fmt       = WaveFormat2.FromStream(st);
     st.Position = Start + 8 + m_nSize;
 }
Ejemplo n.º 2
0
        public static ACMStream Append(Stream underlyingStream, WaveFormat2 fmt)
        {
            ACMStream stm = new ACMStream();

            stm._accessMode          = FileAccess.Write;
            stm._baseStream          = underlyingStream;
            stm._baseStream.Position = 0;
            WaveFormat2 fmtOut = WaveFormat2.FromStream(underlyingStream);

            stm._baseStream.Position = stm._baseStream.Length;
            stm.InitializeForWriting(underlyingStream, fmt ?? fmtOut, fmtOut, true);
            stm.WriteHeader();
            return(stm);
        }