extern crate nihav_registry;
extern crate nihav_allstuff;
-use std::io::{SeekFrom, Write};
+use std::io::{SeekFrom, Write, BufReader};
use std::fs::File;
use std::path::Path;
use nihav_core::io::byteio::{FileReader, ByteReader};
}
let path = Path::new(name);
- let mut file = File::open(path).unwrap();
+ let file = File::open(path).unwrap();
+ let mut file = BufReader::new(file);
let dmx_fact;
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);
impl<'a> WavWriter<'a> {
pub fn new(name: &str) -> Self {
let file = File::create(name).unwrap();
+ let file = std::io::BufWriter::new(file);
let fw = Box::new(FileWriter::new_write(file));
let io = ByteWriter::new(Box::leak(fw));
WavWriter { io: Box::new(io), data_pos: 0, be: false, bits: 0 }