public MFFileWriter(string path, ThroughputDescription description) : base(path, description) { // We always need to write using the same thread for MediaFoundation to function properly thread = new Thread(DoWork); thread.Start(); dataProcessedEvent.WaitOne(); }
public SampleBuffer(ThroughputDescription desc, float length) { buffers = new BufferedWaveProvider[desc.Count]; for (int i = 0; i < desc.Count; i++) { buffers[i] = new BufferedWaveProvider(desc[i].WaveFormat) { BufferDuration = TimeSpan.FromSeconds(length) }; } description = desc; }
public FileWriter(string path, ThroughputDescription description) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } encoders = new T[description.Count]; for (int i = 0; i < description.Count; i++) { encoders[i] = GetEncoder(Path.Combine(path, description[i].Name), description[i].WaveFormat); } this.description = description; }
public WavFileWriter(string path, ThroughputDescription description) : base(path, description) { }