Idea/proposal: Total_duration enum (unknown/max/guarenteed)
Personne n'a encore pris cette issue.
- #863 par @Sim-hu — fermée sans fusion
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- rust
- Domaine
- audio-video-rtc
Piste de recherche
Read the linked proposal in issue #626 and compare it with the existing total_duration behavior described here, including TakeDuration and skippable. The issue proposes a SourceDuration enum and helper methods, with returning Duration::MAX for infinite sources as a simpler alternative; first determine whether either approach is still wanted. Done means the project has chosen and implemented a consistent duration representation for these cases.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Idea by @The0x539 https://github.com/RustAudio/rodio/issues/626#issuecomment-2661094585. Currently infinite sources will return None for total_duration, when paired with a TakeDuration you still get None. Another place we can do better is skippable. Right now a skippable will pass on the total_duration of what it wraps. Because the source can be skipped at any point there is no guarentee it will actually play for that length.
To address these issues we can put extra information in the total_duration result:
enum SourceDuration {
Max(Duration),
Guarenteed(Duration),
Infinite,
Unknown,
}
We could provide methods to turn this into an option returning Duration::MAX for Infinite. We could call that method known. We could also provide a map, is_known and maybe an unwrap_or.
A far simpler alternative to this proposal would be making infinite sources return Duration::MAX.
- Langage dominant
- Rust
- Étoiles
- 2.5k
- Forks
- 338
- Merge moyen
- 1 j 3 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de RustAudio/rodio
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 73/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
-
WavDecoder::size_hint underflows (u32 wrap, ~4.29e9) after EOF, causes multi-GB Vec::collect() allocationPeut-être pris @marin-m l’a pris il y a 5 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
Toutes les issues de RustAudio/rodio
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
dekobon/big-code-analysis#1729 ·
Les mainteneurs répondent en général sous 1 jour
-
bug help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 3 jours
-
Cline: allowlist capture drops every event because the capture gate ignores `workspaceRoots`Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
akitaonrails/ai-memory#1888 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
peteonrails/voxtype#941 ·
Les mainteneurs répondent en général sous 4 jours
-
bug priority:medium triage:maintainable
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
ccusage/ccusage#2000 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour