예제 #1
0
 /// <summary>
 /// Disposes the component.
 /// </summary>
 public void Dispose()
 {
     if (this.writer != null)
     {
         this.writer.Dispose();
         this.writer = null;
     }
 }
예제 #2
0
        /// <summary>
        /// The receiver for the audio messages.
        /// </summary>
        /// <param name="message">The message that was received.</param>
        public override void Receive(Message <AudioBuffer> message)
        {
            if (this.writer == null)
            {
                var format = message.Data.Format.DeepClone();
                this.writer = new WaveDataWriterClass(new FileStream(this.outputFilename, FileMode.Create), format);
            }

            this.writer.Write(message.Data.Data);
        }