Skip to content

Commit 2f044e0

Browse files
committed
Format the code
1 parent e56e35e commit 2f044e0

File tree

8 files changed

+499
-244
lines changed

8 files changed

+499
-244
lines changed

fft/src/fftwrap.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ pub unsafe extern "C" fn spx_fft(
7070
) {
7171
if in_0 == out {
7272
let mut i: c_int = 0;
73-
let mut scale: c_float = (1.0f64 / (*(table as *mut drft_lookup)).n as c_double) as c_float;
73+
let mut scale: c_float =
74+
(1.0f64 / (*(table as *mut drft_lookup)).n as c_double) as c_float;
7475
eprintln!("FFT should not be done in-place");
7576
i = 0 as c_int;
7677
while i < (*(table as *mut drft_lookup)).n {

fft/src/smallft.rs

Lines changed: 224 additions & 145 deletions
Large diffs are not rendered by default.

resampler/src/lib.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ impl State {
1717
out_rate: usize,
1818
quality: usize,
1919
) -> Result<Self, Error> {
20-
let st = speex::SpeexResamplerState::new(channels, in_rate, out_rate, quality);
20+
let st = speex::SpeexResamplerState::new(
21+
channels, in_rate, out_rate, quality,
22+
);
2123

2224
Ok(State { st })
2325
}
2426

25-
pub fn set_rate(&mut self, in_rate: usize, out_rate: usize) -> Result<(), Error> {
27+
pub fn set_rate(
28+
&mut self,
29+
in_rate: usize,
30+
out_rate: usize,
31+
) -> Result<(), Error> {
2632
if self.st.set_rate(in_rate, out_rate) != 0 {
2733
Err(Error::InvalidArg)
2834
} else {
@@ -46,9 +52,13 @@ impl State {
4652
) -> Result<(usize, usize), Error> {
4753
let mut in_len = input.len() as u32;
4854
let mut out_len = output.len() as u32;
49-
let ret = self
50-
.st
51-
.process_float(index as u32, input, &mut in_len, output, &mut out_len);
55+
let ret = self.st.process_float(
56+
index as u32,
57+
input,
58+
&mut in_len,
59+
output,
60+
&mut out_len,
61+
);
5262

5363
if ret != 0 {
5464
Err(Error::AllocFailed)

0 commit comments

Comments
 (0)