Guest User

Untitled

a guest
Jun 5th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. Compiling lavalink_player v0.1.0 (C:\Users\06mosnaz\Desktop\Laboratory\lavalink_player)
  2. error[E0308]: mismatched types
  3. --> src\main.rs:45:37
  4. |
  5. 45 | let mut opus = OpusDecoder::new(48000, audiopus::Channels::Stereo)?;
  6. | ---------------- ^^^^^ expected `SampleRate`, found integer
  7. | |
  8. | arguments to this function are incorrect
  9. |
  10. note: associated function defined here
  11. --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:51:12
  12. |
  13. 51 | pub fn new(sample_rate: SampleRate, channels: Channels) -> Result<Decoder> {
  14. | ^^^
  15.  
  16. error[E0277]: the trait bound `&mut [f32; 3840]: audiopus::TryInto<MutSignals<'_, f32>>` is not satisfied
  17. --> src\main.rs:70:52
  18. |
  19. 70 | let samples = opus.decode_float(&data, &mut output, false)?;
  20. | ------------ ^^^^^^^^^^^ the trait `audiopus::TryInto<MutSignals<'_, f32>>` is not implemented for `&mut [f32; 3840]`
  21. | |
  22. | required by a bound introduced by this call
  23. |
  24. = help: the following other types implement trait `audiopus::TryInto<T>`:
  25. `&[u8]` implements `audiopus::TryInto<Packet<'_>>`
  26. `&mut [T]` implements `audiopus::TryInto<MutSignals<'_, T>>`
  27. `&mut [u8]` implements `audiopus::TryInto<MutPacket<'_>>`
  28. note: required by a bound in `Decoder::decode_float`
  29. --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:112:13
  30. |
  31. 109 | pub fn decode_float<'a, TP, TS>(&mut self, input: Option<TP>, output: TS, fec: bool) -> Result<usize>
  32. | ------------ required by a bound in this associated function
  33. ...
  34. 112 | TS: TryInto<MutSignals<'a, f32>>,
  35. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Decoder::decode_float`
  36.  
  37. error[E0308]: mismatched types
  38. --> src\main.rs:70:45
  39. |
  40. 70 | let samples = opus.decode_float(&data, &mut output, false)?;
  41. | ------------ ^^^^^ expected `Option<_>`, found `&Vec<u8>`
  42. | |
  43. | arguments to this method are incorrect
  44. |
  45. = note: expected enum `Option<_>`
  46. found reference `&Vec<u8>`
  47. note: method defined here
  48. --> C:\Users\06mosnaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\audiopus-0.2.0\src\coder\decoder.rs:109:12
  49. |
  50. 109 | pub fn decode_float<'a, TP, TS>(&mut self, input: Option<TP>, output: TS, fec: bool) -> Result<usize>
  51. | ^^^^^^^^^^^^
  52. help: try wrapping the expression in `Some`
  53. |
  54. 70 | let samples = opus.decode_float(Some(&data), &mut output, false)?;
  55. | +++++ +
  56.  
  57. Some errors have detailed explanations: E0277, E0308.
  58. For more information about an error, try `rustc --explain E0277`.
  59. error: could not compile `lavalink_player` (bin "lavalink_player") due to 3 previous errors
Advertisement
Add Comment
Please, Sign In to add comment