trying to compile the wasm example...issue
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- rust, wasm
- Área
- audio-video-rtc, backend
Línea de trabajo
Start with src/lib.rs in the wasm example, especially the code around lines 46–76 shown in the compiler output, and compare its build_output_stream call and sample type bounds with the CPAL 0.15 API. Check whether the reported errors still reproduce with npm run start; done means the example compiles and starts without those errors.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
i am receiving the following errors when i try :: npm run start :: with the wasm example:
compiling hello_wasm v0.1.0 (C:\Users\Admin\Documents\ajhRust\Yew\ajhYewTree\hello_wasm)
error[E0277]: the trait bound T: SizedSample is not satisfied
--> src\lib.rs:61:10
|
61 | .build_output_stream(
| ^^^^^^^^^^^^^^^^^^^ the trait SizedSample is not implemented for T
|
note: required by a bound in build_output_stream
--> C:\Users\Admin.cargo\registry\src\index.crates.io-6f17d22bba15001f\cpal-0.15.2\src\traits.rs:161:12
|
153 | fn build_output_stream<T, D, E>(
| ------------------- required by a bound in this associated function
...
161 | T: SizedSample,
| ^^^^^^^^^^^ required by this bound in DeviceTrait::build_output_stream
help: consider further restricting this bound
|
46 | T: cpal::Sample + cpal::SizedSample,
| +++++++++++++++++++
error[E0061]: this method takes 4 arguments but 3 arguments were supplied
--> src\lib.rs:61:10
|
61 | .build_output_stream(
| __^^^^^^^^^^^^^^^^^^^-
62 | | config,
63 | | move |data: &mut [T], | write_data(data, channels, &mut next_value),
64 | | err_fn,
65 | | )
| |- an argument of type Option<Duration> is missing
|
note: method defined here
--> C:\Users\Admin.cargo\registry\src\index.crates.io-6f17d22bba15001f\cpal-0.15.2\src\traits.rs:153:8
|
153 | fn build_output_stream<T, D, E>(
| ^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
61 | .build_output_stream(config, move |data: &mut [T], _| write_data(data, channels, &mut next_value), err_fn, /* Option */)
|
error[E0038]: the trait Sample cannot be made into an object
--> src\lib.rs:76:24
|
76 | let value: T = cpal::Sample::from::(&next_sample());
| ^^^^^^^^^^^^ Sample cannot be made into an object
|
6f17d22bba15001f\dasp_sample-0.11.0\src\lib.rs:39:34
|
39 | pub trait Sample: Copy + Clone + PartialOrd + PartialEq {
| ^^^^^^^^^^ ^^^^^^^^^ the trait cannot be made into an object because it uses Self as a type parameter
| |
| the trait cannot be made into an object because it uses Self as a type parameter
error[E0782]: trait objects must include the dyn keyword
--> src\lib.rs:76:24
|
76 | let value: T = cpal::Sample::from::(&next_sample());
| ^^^^^^^^^^^^
|
help: add dyn keyword before this trait
|
76 | let value: T = ::from::(&next_sample());
| ++++ +
the first function requires another argument (a duration it seems) ,
and then there is an issue perhaps with context regarding Self...
...very interested in diving into your library but yes...thx!
- Lenguaje dominante
- Rust
- Estrellas
- 4k
- Forks
- 554
- Merge medio
- 3 d 3 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RustAudio/cpal
-
aaudio: dynamic buffer tuning never grows the buffer (set_buffer_size_in_frames reports Err on success)Posiblemente ocupada @dannyward630 la tomó hace 8 días. Abiertohost - aaudio platform - android
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
WebAudio wasm build fails with wasm-bindgen panic=unwind closuresPosiblemente ocupada @bogusyogi la tomó hace 16 días. Abiertohost - webaudio platform - web
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
RustAudio/cpal#1394 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
New WASAPI implementationPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertocode quality dependencies host - wasapi platform - windows
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
RustAudio/cpal#1416 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
host - pipewire platform - linux
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
RustAudio/cpal#1405 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
WASAPI: default-device activation fails with RPC_E_CHANGED_MODE after endpoint-notification callbacks put thread-pool threads into an STAPosiblemente ocupada @dannyward630 la tomó hace 9 días. Abiertocorrectness host - wasapi platform - windows
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
RustAudio/cpal#1402 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de RustAudio/cpal
Issues similares
-
area:docs documentation good first issue priority:medium
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
rtk-ai/rtk#4958 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
calagopus/panel#285 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: streamed Responses API flex_unavailable error maps to 500 InternalServerError instead of 429Abiertollm translation
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
BerriAI/litellm#49736 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
question
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
autoindex tests: denied loopback bind shows only PermissionDenied (255 failures), not the causeAbiertofield-report
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día