コード例 #1
0
        public static ACMStream OpenWrite(Stream underlyingStream, WaveFormat2 fmtIn, WaveFormat2 fmtOut)
        {
            ACMStream stm = new ACMStream();

            stm._accessMode = FileAccess.Write;
            stm._baseStream = underlyingStream;
            stm.InitializeForWriting(underlyingStream, fmtIn, fmtOut, false);
            stm.WriteHeader();
            return(stm);
        }
コード例 #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);
        }