Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
xasopheno committed Aug 7, 2023
1 parent b99d8b7 commit 1688223
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ exclude = [
"imgs/*",
]

[build]
rustflags = ["-Z", "sanitizer=leak"]
# [build]
# rustflags = ["-Z", "sanitizer=leak"]

[profile.release]
debug = true
# [profile.release]
# debug = true

[package.metadata.arch]
arch = ["x86_64"]
Expand Down
6 changes: 4 additions & 2 deletions instrument/src/renderable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,21 @@ pub fn point_op_to_gains(
point_op: &PointOp,
basis: &Basis,
angle: f64,
frequency: f64,
_frequency: f64,
) -> (f64, f64) {
if *point_op.g.numer() == 0 {
return (0.0, 0.0);
}

let f = m_a_and_basis_to_f64(basis.f, point_op.fm, point_op.fa);

let pm = r_to_f64(point_op.pm);
let pa = r_to_f64(point_op.pa);
let g = r_to_f64(point_op.g);
let base_p = r_to_f64(basis.p);
let base_g = r_to_f64(basis.g);

let ild = calculate_ild(angle, frequency);
let ild = calculate_ild(angle, f);

let l_gain = g * (((pa.mul_add(pm, 1.0 + ild)) + base_p) / 2.0) * base_g;
let r_gain = g * (((pa.mul_add(pm, -1.0 - ild)) + base_p) / -2.0) * base_g;
Expand Down

0 comments on commit 1688223

Please sign in to comment.