Exemplo n.º 1
0
 public WaveStream(AudioDecoder decoder)
 {
     this.decoder = decoder;
     this.encoder = new WaveEncoder(decoder, new MemoryStream(), decoder.StreamInfo);
     dataBuffer = new byte[DATA_BUFFER_SIZE];
     bufferHead = 0;
     bufferTail = 0;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Construct new encoder
        /// </summary>
        /// <param name="decoder">Source of audio data</param>
        /// <param name="outputStream">Output</param>
        /// <param name="recodeInfo">Information for new stream in reencode required. Otherwise kept as close as possible to source</param>
        public AudioEncoder(AudioDecoder decoder, Stream outputStream, StreamInfo recodeInfo)
        {
            this.physicalStream = outputStream;
            this.decoder = decoder;

            if (recodeInfo != null)
            {
                ImportStreamInfo(recodeInfo);
            }
            else
            {
                ImportStreamInfo(decoder.StreamInfo);
            }

            //WriterHeader();
        }
Exemplo n.º 3
0
 public WaveEncoder(AudioDecoder decoder, Stream outputStream, StreamInfo recodeInfo)
     : base(decoder, outputStream, recodeInfo)
 {
 }