forge
Explore
Log in

Don't you dare go Hollow

The death writer is the wave branch's tick, not a missing half

Browse files at this commit

56924e860c21822c2e8bbce6e42515f048e34ac1Ahmet Kaan GümüşParent: a091c6d
  • docs
    • the death writer is the wave branch's tick, not a missing half
Show full message
📝 docs(audio): the death writer is the wave branch's tick, not a missing half

E1 settled by the integrator: the engine writer exists on the wave branch -- `tick`'s dead branch sets `AUDIO_LOST` and `rearm_audio` clears it -- while this lane's base engine carries neither, so the earlier wording read as an engine defect that is not owed. The three documents now say what each side is: the engine writes the reason (wave branch), this lane reads it and spells none of its words, the flip is driven through the seam here and asserted end to end on the merged tree. Nothing in either test depends on when `tick` sets it.
crates/app/src/notices.rsmodified+6 -5
@@ -114,11 +114,12 @@ pub(crate) fn audio_step(
114 /// the caching; this owns the queue, so a test can drive both directions without114 /// the caching; this owns the queue, so a test can drive both directions without
115 /// a window and without a device that dies on cue.115 /// a window and without a device that dies on cue.
116 ///116 ///
117-/// The reason itself is the engine's to write117+/// The reason is the engine's to write, and the engine's writer is the wave
118-/// ([`PlaybackSession::audio_disabled_reason`]): this side never spells its118+/// branch's: `tick`'s dead branch sets the lost-device reason and `rearm_audio`
119-/// words, so a lost-device reason the engine lane teaches the death path to set119+/// clears it (its own test observes both). This side is the reader and never
120-/// needs nothing here -- and a death that sets nothing stays unsaid, which is120+/// spells the engine's words, so the end-to-end flip is asserted on the merged
121-/// what the engine side of this defect is.121+/// tree while this lane drives the same step through the seam below -- on this
122+/// lane's base engine no path flips the reason at all.
122 pub(crate) fn audio_change_notice(123 pub(crate) fn audio_change_notice(
123 notices: &mut std::collections::VecDeque<SharedString>,124 notices: &mut std::collections::VecDeque<SharedString>,
124 was: Option<&str>,125 was: Option<&str>,
crates/app/src/player/transport.rsmodified+3 -2
@@ -36,8 +36,9 @@ impl Player {
36 /// A file that *opens* silent says so in its own open line36 /// A file that *opens* silent says so in its own open line
37 /// ([`audio_notice`], `library.rs`); what used to reach no consumer at all is37 /// ([`audio_notice`], `library.rs`); what used to reach no consumer at all is
38 /// a reason that changes *under* a session that is already up. This is the38 /// a reason that changes *under* a session that is already up. This is the
39- /// reader of that state -- the writer of it is the engine's own39+ /// reader of that state: the writer is the engine's (the wave branch's
40- /// `PlaybackSession::audio_disabled_reason`, which this lane never spells.40+ /// `tick` dead branch sets the lost-device reason, `rearm_audio` clears it),
41+ /// and this lane spells none of its words.
41 ///42 ///
42 /// Called from [`Player::pump`] because that is the one place every frame43 /// Called from [`Player::pump`] because that is the one place every frame
43 /// passes through, and written to cost an ordinary frame nothing: one read of44 /// passes through, and written to cost an ordinary frame nothing: one read of
crates/app/src/tests/media.rsmodified+4 -1
@@ -20,7 +20,10 @@ use crate::notices::{audio_change_notice, audio_lost_line, audio_tail};
20 /// saying so when it clears. This side is the *reader*: the writer of a reason is20 /// saying so when it clears. This side is the *reader*: the writer of a reason is
21 /// the engine's own `audio_disabled_reason`, and the app's two call sites were21 /// the engine's own `audio_disabled_reason`, and the app's two call sites were
22 /// the *open* paths -- so a reason that arrived mid-session reached no consumer22 /// the *open* paths -- so a reason that arrived mid-session reached no consumer
23-/// at all and the window played on in silence with nothing said.23+/// at all and the window played on in silence with nothing said. The engine's
24+/// writer is the wave branch's, so the flip is driven through the seam here and
25+/// asserted end to end on the merged tree; nothing below depends on when the
26+/// engine's `tick` sets it.
24 ///27 ///
25 /// Driven through the queue step itself -- [`audio_change_notice`] is the whole28 /// Driven through the queue step itself -- [`audio_change_notice`] is the whole
26 /// of what a reason change does to the strip -- because a test cannot make a29 /// of what a reason change does to the strip -- because a test cannot make a