Closed rossdylan closed 10 years ago
generated using my libpoly rust bindings. Functions match the C API exactly.
extern crate poly;
use std::io::timer::sleep;
use poly::Poly;
fn main() {
let mut poly = Poly::new(16, 2, 44100, 1, "test.wav");
poly.init_generator(0, poly::poly_square, 1.0, 220 as f64);
poly.start();
sleep(1000);
poly.set_wavetype(0, poly::poly_sine);
sleep(1000);
poly.stop();
}
This looks as though it is rolling over at peak. Try an amplitude slightly less than 1.0 and see if the results reoccur.
Yep, I'm considering internally multiplying all frames by 0.999... transparently, as API callers will probably assume an amplitude of '1.0' is A-OK.
yep that was the problem.
I just bumped down POLY_AMP_MAX, should do the trick.