Repository navigation
Audio pipeline: remove the legacy float stream path - #1698
Merged
Merged
Conversation
With stream history migrated to the working stream (#1695), the legacy AudioFloatStreamListener path has no consumers left; delete it per the removal checklist in the audio pipeline hand-off doc: - Delete AudioStream.h/.cpp: AudioFloatStreamListener and AudioStreamToFloat. sample_size() (declared in AudioInfo.h, used by the sink gate tests) moves its definition to AudioInfo.cpp; the buffer-size constant had no other users. - AudioSource: drop the AudioStreamToFloat reader, the InternalListener relay, the float add/remove_listener, samples_per_frame(), m_sample_rate/m_channels/m_multiplier, the preset switch in init(), and the now-unused volume_multiplier constructor argument (input volume rides the tree's RawAudio2WorkingAudio decoder, as before). The raw-stream accessors (raw_sample_rate/raw_channels/ raw_sample_format, add/remove_raw_listener) are unchanged - the pipeline tree consumes the raw stream exactly as it did. - AudioInputFile / AudioInputDevice: no longer fed by the reader; the double-feed (m_reader.push_bytes) in on_buffer_ready / writeData is gone - the raw RawAudioStreamListener output is untouched. - AudioPassthroughPairQt: drop the SampleListener relay, m_sample_listener (and every reset()/new in the source/sink lifecycle paths), m_stream_listeners, and the float add/remove_listener overloads. AudioPassthroughPair (base) and AudioPassthroughPairQtThread lose the matching virtuals / forwarders. - AudioSession: drop add/remove_stream_listener. - SinkPipeline_Tests.h: the gate tests have been self-contained kernel chains since #1668; update the stale doc comment that still described a raw-byte comparison against the legacy converter chain. - TestProgramComputer: drop the now-unused AudioStream.h include; StreamHistorySession: drop a stale commented-out expected_samples_per_frame line. No behavior change for the pipeline tree, the sink/FFT branches, or the working-stream listeners: the raw byte stream reaching the source decoder is byte-identical to before (the legacy reader only tapped it in parallel, with no consumer). Verified: pa-build green (-Wall -Wextra -Wpedantic -Werror), full pa-test suite 18,272 passed / 0 failed / 3 skipped (decode-backend skips, unavailable in the container).
Mysticial
pushed a commit
that referenced
this pull request
Oct 24, 2026
…sandbox fossils (#1699) * Nuke the dead audio stream conversion kernels and TimeSample tools. Follow-up to the StreamHistory migration (#1695) and the legacy float path removal (#1698); two pieces of the old audio stack are now unreferenced: - Kernels/AudioStreamConversion: the convert_audio_* raw sample-format kernels. The only call site in the tree was a #if 0 block in TestProgramComputer (removed with the include); the live pipeline converts formats through Kernels/AudioStreamConverter instead. - AudioPipeline/Tools/TimeSampleBuffer, TimeSampleBufferReader and TimeSampleWriter: the old fault-tolerant timestamped sample buffer the pre-migration stream history recording rode on. No references remain anywhere in the source. Both are dropped from SourceFiles.cmake; TestProgramComputer also loses its stale StreamConverters.h include (the header itself is kept - AudioInputDevice inherits from MisalignedStreamConverter / ObjectStreamListener). Full suite: 18,276 passed / 0 failed / 0 skipped. * Sweep the dead audio-system fossils from TestProgramComputer. The dev sandbox kept early versions of the pre-pipeline audio classes. Remove the #if 0 block using the long-deleted AudioSourceReader / AudioListener / AudioSampleFormat (plus the commented-out AudioStreamReader2 line) and the stale AudioConstants.h include (none of its constants are used in the file). The sandbox's #if 0 blocks that exercise the current kernels are left in place. Full suite: 18,276 passed / 0 failed / 0 skipped. --------- Co-authored-by: PA Dev Bot <344001113+pa-devbot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the legacy
AudioFloatStreamListenerpath per the removal checklist in the audio pipeline hand-off doc. With #1695 (stream history on the working stream) in main, this path has no consumers left. 19 files, ~460 lines out.What
AudioStream.h/.cpp:AudioFloatStreamListenerandAudioStreamToFloat.sample_size()(declared inAudioInfo.h, still used by the sink gate tests) moves its definition toAudioInfo.cpp.AudioSource: drops theAudioStreamToFloatreader, theInternalListenerrelay, floatadd/remove_listener,samples_per_frame(),m_sample_rate/m_channels/m_multiplier, the preset switch ininit(), and the now-unusedvolume_multiplierctor argument (input volume rides the tree'sRawAudio2WorkingAudiodecoder, as it already did). The raw-stream accessors (raw_sample_rate()/raw_channels()/raw_sample_format(),add/remove_raw_listener) are untouched — the pipeline tree consumes the raw stream exactly as before.AudioInputFile/AudioInputDevice: the double-feed is gone (m_reader.push_bytesinon_buffer_ready/writeData); the rawRawAudioStreamListeneroutput is byte-identical to before.AudioPassthroughPairQt: drops theSampleListenerrelay,m_sample_listener(and everyreset()/newin the source/sink lifecycle paths),m_stream_listeners, and the floatadd/remove_listeneroverloads; theAudioPassthroughPairbase andAudioPassthroughPairQtThreadlose the matching virtuals/forwarders.AudioSession: dropsadd/remove_stream_listener.SinkPipeline_Tests.h: doc comment still described a raw-byte comparison against the legacy converter chain — the gate tests have been self-contained kernel chains since Audio pipeline: sink-side cleanups (dead output enumeration, legacy converter) #1668, so the comment is updated to match.TestProgramComputer: staleAudioStream.hinclude;StreamHistorySession: one stale commented-outexpected_samples_per_frameline.Why this is behavior-neutral
The legacy reader only tapped the raw byte stream in parallel (its converted float output went to
StreamHistorySession's oldon_samples, whose tracker-side sink is inert). Nothing in the tree, the sink branch, the FFT branch, or the working-stream listeners read from it. The raw bytes reachingm_source_decoderare unchanged, and input volume was already applied in the tree's decoder (the reader's copy of the multiplier is gone, but it had no consumers).Verified
pa-buildgreen (-Wall -Wextra -Wpedantic -Werror), including the gate tests inSinkPipeline_Tests.cpp(they build the sink branch from plain kernel objects and are unaffected).pa-testcommand-line suite: 18,272 passed / 0 failed / 3 skipped (skips = decode-backend tests, unavailable in the container).-Werror+ CI (x86) + live hardware, per the hand-off doc.