Skip to content

enable tracing for rodio#23557

Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom
mockersf:tracing-for-rodio
Mar 29, 2026
Merged

enable tracing for rodio#23557
alice-i-cecile merged 5 commits intobevyengine:mainfrom
mockersf:tracing-for-rodio

Conversation

@mockersf
Copy link
Copy Markdown
Member

Objective

  • All Bevy programs with bevy_audio print a line to stderr when they exit:
Dropping DeviceSink, audio playing through this sink will stop, to prevent this message from appearing use tracing or call `.log_on_drop(false)` on this DeviceSink

Solution

  • Enable the tracing feature so that it's logged instead of printed
  • set log_on_drop(false) on the audio sink created by Bevy. It's expected to stop playing sound when it's dropped

@mockersf mockersf added this to the 0.19 milestone Mar 28, 2026
@mockersf mockersf added the A-Audio Sounds playback and modification label Mar 28, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Audio Mar 28, 2026
@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Mar 29, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 29, 2026
Merged via the queue into bevyengine:main with commit 17a1b08 Mar 29, 2026
50 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in Audio Mar 29, 2026
splo pushed a commit to splo/bevy that referenced this pull request Mar 31, 2026
# Objective

- All Bevy programs with bevy_audio print a line to stderr when they
exit:
```
Dropping DeviceSink, audio playing through this sink will stop, to prevent this message from appearing use tracing or call `.log_on_drop(false)` on this DeviceSink
```
- This is an expected print by rodio:

https://github.com/RustAudio/rodio/blob/7e9ba6dd017abb88a1de8c287849c89c3624437d/src/stream.rs#L99-L108

## Solution

- Enable the tracing feature so that it's logged instead of printed
- set `log_on_drop(false)` on the audio sink created by Bevy. It's
expected to stop playing sound when it's dropped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Audio Sounds playback and modification C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants