예제 #1
0
        public static RiffStream OpenWrite(Stream underlyingStream, WaveFormat2 fmt)
        {
            RiffStream stm = new RiffStream();

            stm._accessMode = FileAccess.Write;
            stm._baseStream = underlyingStream;
            stm.InitializeForWriting(underlyingStream, fmt, fmt, false);
            stm.WriteHeader();
            return(stm);
        }
예제 #2
0
        public static RiffStream Append(Stream underlyingStream)
        {
            RiffStream stm = new RiffStream();

            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, fmtOut, fmtOut, true);
            stm.WriteHeader();
            return(stm);
        }