Silence when playing ogg files
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- audio-video-rtc
Direzione di ricerca
Start by reproducing the report: the snippet calls rodio::Decoder::try_from on an attached .ogg file and plays it through rodio::Player::connect_new(handle.mixer()), but the output is silent. Narrow down whether the decoder yields samples at all or the mixer drops them, and check the ogg file itself, which is attached as foo.txt and must be renamed back. Done means the basic example audibly plays an ogg file on the default device.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The basic example fails. The version is 0.22.2
fn main() {
use rodio::Decoder;
use std::fs::File;
// Get an OS-Sink handle to the default physical sound device.
// Note that the playback stops when the handle is dropped.//!
let handle = rodio::DeviceSinkBuilder::open_default_sink().expect("open default audio stream");
let player = rodio::Player::connect_new(handle.mixer());
// Load a sound from a file, using a path relative to Cargo.toml
let file = File::open("foo.ogg").unwrap();
// Decode that sound file into a source
let source = Decoder::try_from(file).unwrap();
// Play the sound directly on the device
handle.mixer().add(source);
// The sound plays in a separate audio thread,
// so we need to keep the main thread alive while it's playing.
std::thread::sleep(std::time::Duration::from_secs(5));
}
Here is the ogg file in question (renamed as txt so that i can upload it on github)
- Lingua principale
- Rust
- Stelle
- 2.5k
- Fork
- 338
- Merge medio
- 1g 3h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustAudio/rodio
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 73/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
WavDecoder::size_hint underflows (u32 wrap, ~4.29e9) after EOF, causes multi-GB Vec::collect() allocationForse già presa @marin-m l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di RustAudio/rodio
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
haowjy/mars-agents#228 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
redlib-org/redlib#604 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
dividebysandwich/rust-dos#240 ·
I maintainer di solito rispondono entro 1 giorno
-
A-UI C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bevyengine/bevy#26330 ·
I maintainer di solito rispondono entro 2 giorni