Drop MEDIA_ROLE, escape shared WirePlumber mute bucket
Browse files at this commit3daab1a967b8d9efe9648c00d73782b580311e67Parent: d598c98- fix
- drop MEDIA_ROLE, escape shared WirePlumber mute bucket
1 changed file +8 -1
crates/engine-audio/src/lib.rsmodified+8 -1
| @@ -170,7 +170,14 @@ fn run( | |||
| 170 | properties! { | 170 | properties! { |
| 171 | *pw::keys::MEDIA_TYPE => "Audio", | 171 | *pw::keys::MEDIA_TYPE => "Audio", |
| 172 | *pw::keys::MEDIA_CATEGORY => "Playback", | 172 | *pw::keys::MEDIA_CATEGORY => "Playback", |
| 173 | - *pw::keys::MEDIA_ROLE => "Movie", | 173 | + // Deliberately no MEDIA_ROLE: the session manager keys saved stream |
| 174 | + // volume/mute by media.role before anything else, so declaring | ||
| 175 | + // "Movie" put us in one bucket with every other video player on the | ||
| 176 | + // box -- a mute somebody set on one of them last month came back as | ||
| 177 | + // "edith has no sound", with nothing in the app to undo it. Without | ||
| 178 | + // a role we get our own bucket, keyed by name, and start audible. | ||
| 179 | + // Restoring stays ON: it is also what initialises the channel | ||
| 180 | + // volumes, and a stream that opts out of it comes up at -inf dB. | ||
| 174 | *pw::keys::AUDIO_CHANNELS => channels.to_string(), | 181 | *pw::keys::AUDIO_CHANNELS => channels.to_string(), |
| 175 | // Asks the graph to schedule us at our own quantum, which is what | 182 | // Asks the graph to schedule us at our own quantum, which is what |
| 176 | // keeps the fill below from under-delivering on a lazy sink. | 183 | // keeps the fill below from under-delivering on a lazy sink. |