Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling lavalink_player v0.1.0 (C:\Users\06mosnaz\Desktop\Laboratory\lavalink_player)
- error[E0308]: mismatched types
- --> src\main.rs:45:37
- |
- 45 | let mut opus = OpusDecoder::new(48000, audiopus::Channels::Stereo)?;
- | ---------------- ^^^^^ expected `SampleRate`, found integer
- | |
- | arguments to this function are incorrect
- |
- note: associated function defined here
- --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:51:12
- |
- 51 | pub fn new(sample_rate: SampleRate, channels: Channels) -> Result<Decoder> {
- | ^^^
- error[E0277]: the trait bound `&mut [f32; 3840]: audiopus::TryInto<MutSignals<'_, f32>>` is not satisfied
- --> src\main.rs:70:52
- |
- 70 | let samples = opus.decode_float(&data, &mut output, false)?;
- | ------------ ^^^^^^^^^^^ the trait `audiopus::TryInto<MutSignals<'_, f32>>` is not implemented for `&mut [f32; 3840]`
- | |
- | required by a bound introduced by this call
- |
- = help: the following other types implement trait `audiopus::TryInto<T>`:
- `&[u8]` implements `audiopus::TryInto<Packet<'_>>`
- `&mut [T]` implements `audiopus::TryInto<MutSignals<'_, T>>`
- `&mut [u8]` implements `audiopus::TryInto<MutPacket<'_>>`
- note: required by a bound in `Decoder::decode_float`
- --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:112:13
- |
- 109 | pub fn decode_float<'a, TP, TS>(&mut self, input: Option<TP>, output: TS, fec: bool) -> Result<usize>
- | ------------ required by a bound in this associated function
- ...
- 112 | TS: TryInto<MutSignals<'a, f32>>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Decoder::decode_float`
- error[E0308]: mismatched types
- --> src\main.rs:70:45
- |
- 70 | let samples = opus.decode_float(&data, &mut output, false)?;
- | ------------ ^^^^^ expected `Option<_>`, found `&Vec<u8>`
- | |
- | arguments to this method are incorrect
- |
- = note: expected enum `Option<_>`
- found reference `&Vec<u8>`
- note: method defined here
- --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:109:12
- |
- 109 | pub fn decode_float<'a, TP, TS>(&mut self, input: Option<TP>, output: TS, fec: bool) -> Result<usize>
- | ^^^^^^^^^^^^
- help: try wrapping the expression in `Some`
- |
- 70 | let samples = opus.decode_float(Some(&data), &mut output, false)?;
- | +++++ +
- Some errors have detailed explanations: E0277, E0308.
- For more information about an error, try `rustc --explain E0277`.
- error: could not compile `lavalink_player` (bin "lavalink_player") due to 3 previous errors
Advertisement
Add Comment
Please, Sign In to add comment