edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBfbc29d1Tahinli2 months ago972 commits
| 1 | //! A silent leading source must not silence the timeline for good. |
| 2 | //! |
| 3 | //! The reported sequence: (1) a video with no audio track is added to the |
| 4 | //! timeline, (2) it is removed, (3) another file -- one that *does* have audio |
| 5 | //! -- is added. The engine used to pin the session to its first source: the |
| 6 | //! device was opened (or, here, not opened) from that one file and never |
| 7 | //! re-armed, and the import door refused the newcomer outright ("the file has |
| 8 | //! audio, the timeline is silent"). So the second file's picture showed but its |
| 9 | //! audio was silent -- or the file could not join at all. |
| 10 | //! |
| 11 | //! Three seams held that pin, and each is covered here: |
| 12 | //! - the import gate (`audio_matches_probed` / `first_audio_of`) refused a file |
| 13 | //! with sound onto a timeline whose leading source has none; |
| 14 | //! - the session never opened a device when such a file did join |
| 15 | //! (`PlaybackSession::arm_audio`); |
| 16 | //! - playback itself re-picked the first non-image source and returned |
| 17 | //! `Ok(None)` -- silence -- however many later segments named a source with |
| 18 | //! audio (`AudioSession::open_multi_streams_speed_at_fade`). |
| 19 | //! |
| 20 | //! ```text |
| 21 | //! cargo test -p engine --test silent_first_source -- --nocapture |
| 22 | //! ``` |
| 23 | |
| 24 | use ; |
| 25 | use sleep; |
| 26 | use ; |
| 27 | |
| 28 | use ; |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// The real phone clip the report named, when it is on this machine: mono-ish |
| 37 | /// ambient at about -36 dBFS, so the "non-silent" bar is its own peak, not a |
| 38 | /// loud fixture's. Skipped (and the run says so) when the file is absent. |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | /// The app's own import door: the gate taken off the live session, the probe |
| 73 | /// read off it (what the worker does), then the registration. |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | /// The reported add/remove/add, end to end at the session level: a silent first |
| 81 | /// file, removed from the timeline, then a file with sound imported into the |
| 82 | /// *same* session and placed -- its audio must decode non-silent. |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | /// The same sequence with the report's own file as the second import. |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | /// The playback seam on its own: a segment naming the second source must decode |
| 137 | /// that source's samples even though the first source has no track. Pre-fix |
| 138 | /// this returned `Ok(None)` -- the whole timeline silent. |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 |