Follow the default audio output on the next song, and prepare the 0.2.0 release #15

Merged
GrumpyStraw merged 2 commits from fix-default-output into main 2026-10-13 18:42:30 +02:00
Owner

Next song on the old output

After switching the default output in the Plasma audio applet, for example from the speakers to headphones, the playing song moved to the headphones, but the next song played on the speakers again.

QAudioOutput takes the default device once, when it is made, and never looks again (qaudiooutput.cpp). Qt Multimedia makes a new QAudioSink for each song from that stored device (qffmpegaudiorenderer.cpp), and the PulseAudio backend opens the stream on it by name (qpulseaudiosink.cpp). The cause is in Qt, not in the Flatpak.

newAudioOutput() in src/media.h now listens for QMediaDevices::audioOutputsChanged, which the PulseAudio backend emits when the server's default sink changes, and moves the output to the new default. This also covers unplugging the headphones.

Moving only Strawly Music's stream in the applet's Applications tab is not covered. Qt does not report that move, so the next song goes to the default output.

0.2.0 release prep

  • Version 0.2.0 in Cargo.toml, Cargo.lock, CMakeLists.txt and the README's install command.
  • A 0.2.0 entry in data/app.strawly.music.metainfo.xml with release notes. appstreamcli validate passes.
  • The Unreleased items in CHANGELOG.md are now under [0.2.0] - 2026-10-13, with the compare links updated.
  • The shipped items leave ROADMAP.md. The three folder items (playlist folder setting, several music folders, first-run setup) are now the 0.3.0 section.

Checked

check.sh passes in org.kde.Sdk//6.11, with all 3 tests. The Flatpak builds, installs and reports version 0.2.0. The output fix was tested by hand on Plasma 6 (Wayland): after switching the default output from the Devices tab, the next song plays on the new output.

## Next song on the old output After switching the default output in the Plasma audio applet, for example from the speakers to headphones, the playing song moved to the headphones, but the next song played on the speakers again. `QAudioOutput` takes the default device once, when it is made, and never looks again ([qaudiooutput.cpp](https://github.com/qt/qtmultimedia/blob/6.11/src/multimedia/audio/qaudiooutput.cpp#L62-L75)). Qt Multimedia makes a new `QAudioSink` for each song from that stored device ([qffmpegaudiorenderer.cpp](https://github.com/qt/qtmultimedia/blob/6.11/src/plugins/multimedia/ffmpeg/playbackengine/qffmpegaudiorenderer.cpp#L307)), and the PulseAudio backend opens the stream on it by name ([qpulseaudiosink.cpp](https://github.com/qt/qtmultimedia/blob/6.11/src/multimedia/pulseaudio/qpulseaudiosink.cpp#L262-L264)). The cause is in Qt, not in the Flatpak. `newAudioOutput()` in `src/media.h` now listens for `QMediaDevices::audioOutputsChanged`, which the PulseAudio backend emits when the server's default sink changes, and moves the output to the new default. This also covers unplugging the headphones. Moving only Strawly Music's stream in the applet's Applications tab is not covered. Qt does not report that move, so the next song goes to the default output. ## 0.2.0 release prep - Version 0.2.0 in `Cargo.toml`, `Cargo.lock`, `CMakeLists.txt` and the README's install command. - A 0.2.0 entry in `data/app.strawly.music.metainfo.xml` with release notes. `appstreamcli validate` passes. - The Unreleased items in `CHANGELOG.md` are now under `[0.2.0] - 2026-10-13`, with the compare links updated. - The shipped items leave `ROADMAP.md`. The three folder items (playlist folder setting, several music folders, first-run setup) are now the 0.3.0 section. ## Checked `check.sh` passes in `org.kde.Sdk//6.11`, with all 3 tests. The Flatpak builds, installs and reports version 0.2.0. The output fix was tested by hand on Plasma 6 (Wayland): after switching the default output from the Devices tab, the next song plays on the new output.
QAudioOutput takes the default device once, when it is made, and Qt Multimedia opens each new
song on that device by name. After switching from the speakers to headphones, the next song
played on the speakers again. The output now moves to the new default when it changes.
Prepare the 0.2.0 release, and plan the folder settings for 0.3.0
All checks were successful
Pull request checks / Lint and test (pull_request) Successful in 6m35s
962fd90ba5
The version is 0.2.0 in Cargo.toml, Cargo.lock, CMakeLists.txt and the README's install
command. The metainfo has a 0.2.0 entry with release notes, and the changelog's Unreleased
items are now under 0.2.0. The shipped items leave the roadmap, and the three folder items
move to 0.3.0.
GrumpyStraw scheduled this pull request to auto merge when all checks succeed 2026-10-13 18:40:12 +02:00
GrumpyStraw deleted branch fix-default-output 2026-10-13 18:42:30 +02:00
Sign in to join this conversation.
No description provided.