rust-math/fftw

Typing mismatch in mod.rs and timeval.rs for macOS 2.2.0 installation

noahbkim opened this issue · 1 comments

I'm working with the Pulse Audio binding to do a simple FFT visualizer. I'm getting the following traceback when trying to compile basic usage of the standard mainloop and context and stream stuff:

   Compiling libpulse-binding v2.2.0
error[E0308]: mismatched types
  --> /Users/noahbkim/.cargo/registry/src/github.com-1ecc6299db9ec823/libpulse-binding-2.2.0/src/time/mod.rs:55:35
   |
55 |         Timeval::new(secs as i64, usecs as i64)
   |                                   ^^^^^^^^^^^^ expected i32, found i64

error[E0308]: mismatched types
  --> /Users/noahbkim/.cargo/registry/src/github.com-1ecc6299db9ec823/libpulse-binding-2.2.0/src/time/mod.rs:74:42
   |
74 |         Timeval::new(t.as_secs() as i64, (t.subsec_nanos() / NANOS_PER_MILLI) as i64)
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found i64

error[E0308]: mismatched types
   --> /Users/noahbkim/.cargo/registry/src/github.com-1ecc6299db9ec823/libpulse-binding-2.2.0/src/time/timeval.rs:100:41
    |
100 |             true => { self.0.tv_usec |= PA_TIMEVAL_RTCLOCK; },
    |                                         ^^^^^^^^^^^^^^^^^^ expected i32, found i64

error[E0277]: no implementation for `i32 |= i64`
   --> /Users/noahbkim/.cargo/registry/src/github.com-1ecc6299db9ec823/libpulse-binding-2.2.0/src/time/timeval.rs:100:38
    |
100 |             true => { self.0.tv_usec |= PA_TIMEVAL_RTCLOCK; },
    |                                      ^^ no implementation for `i32 |= i64`
    |
    = help: the trait `std::ops::BitOrAssign<i64>` is not implemented for `i32`

I'm working on the current version of macOS with a vanilla installation of Rust. Let me know if you need any other information.

Whoops! Wrong repository...