/// <summary> /// Disposes the component. /// </summary> public void Dispose() { if (this.writer != null) { this.writer.Dispose(); this.writer = null; } }
/// <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); }