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(
114114 /// the caching; this owns the queue, so a test can drive both directions without
115115 /// a window and without a device that dies on cue.
116116 ///
117-/// The reason itself is the engine's to write
118-/// ([`PlaybackSession::audio_disabled_reason`]): this side never spells its
119-/// words, so a lost-device reason the engine lane teaches the death path to set
120-/// needs nothing here -- and a death that sets nothing stays unsaid, which is
121-/// what the engine side of this defect is.
117+/// The reason is the engine's to write, and the engine's writer is the wave
118+/// branch's: `tick`'s dead branch sets the lost-device reason and `rearm_audio`
119+/// clears it (its own test observes both). This side is the reader and never
120+/// spells the engine's words, so the end-to-end flip is asserted on the merged
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.
122123 pub(crate) fn audio_change_notice(
123124 notices: &mut std::collections::VecDeque<SharedString>,
124125 was: Option<&str>,
crates/app/src/player/transport.rsmodified+3 -2
@@ -36,8 +36,9 @@ impl Player {
3636 /// A file that *opens* silent says so in its own open line
3737 /// ([`audio_notice`], `library.rs`); what used to reach no consumer at all is
3838 /// 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 own
40- /// `PlaybackSession::audio_disabled_reason`, which this lane never spells.
39+ /// reader of that state: the writer is the engine's (the wave branch's
40+ /// `tick` dead branch sets the lost-device reason, `rearm_audio` clears it),
41+ /// and this lane spells none of its words.
4142 ///
4243 /// Called from [`Player::pump`] because that is the one place every frame
4344 /// 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};
2020 /// saying so when it clears. This side is the *reader*: the writer of a reason is
2121 /// the engine's own `audio_disabled_reason`, and the app's two call sites were
2222 /// 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.
2427 ///
2528 /// Driven through the queue step itself -- [`audio_change_notice`] is the whole
2629 /// of what a reason change does to the strip -- because a test cannot make a