Records

Functions

  • void set_save_pipeline_test_inputs_and_outputs (bool save_input_and_output_files)

    --save-inputs-and-outputs

    When enabled, save input and output as WAV files for debugging

    The saved files are:

    <testname

    >_input.wav - the input audio buffer

    <testname

    >_ring_buffer.wav - contents of the entire output ring buffer

    <testname

    >_output.wav - portion of the output ring buffer expected to be non-silent

    <testname

    >_expected_output.wav - expected contents of

    <testname

    >_output.wav

    This flag can be used as follows:

    PKG=

    <fuchsia

    _test_package to run>

    REALM=audio-pipeline-tests

    DEVICE_DIR=/tmp

    fx test "--realm=$REALM" $PKG -- --save-inputs-and-outputs

    Run `ffx component copy --help` for instructions to copy the file in /tmp to

    the host.

    Defined at line 50 of file ../../src/media/audio/audio_core/testing/integration/hermetic_pipeline_test.cc

  • bool operator< (const HermeticFidelityTest::ChannelMeasurement & lhs, const HermeticFidelityTest::ChannelMeasurement & rhs)

    Defined at line 177 of file ../../src/media/audio/audio_core/testing/integration/hermetic_fidelity_test.h

  • template <fuchsia::media::AudioSampleFormat SampleFormat>
    void CompareAudioBuffers (AudioBufferSlice<SampleFormat> got_slice, AudioBufferSlice<SampleFormat> want_slice, CompareAudioBufferOptions options)

    Compares got_slice to want_slice, reporting any differences. If got_slice is larger than

    want_slice, the extra suffix should contain silence. If options.partial is true, then got_slice

    should contain a prefix of want_slice, followed by silence.

    For example, CompareAudioBuffer succeeds on these inputs

    got_slice = {0,1,2,3,4,0,0,0,0,0}

    want_slice = {0,1,2,3,4}

    partial = false

    And these inputs:

    got_slice = {0,1,2,3,0,0,0,0,0,0}

    want_slice = {0,1,2,3,4}

    partial = true

    But not these inputs:

    got_slice = {0,1,2,3,0,0,0,0,0,0}

    want_slice = {0,1,2,3,4}

    partial = false

    Differences are reported to gtest EXPECT macros.

    Defined at line 221 of file ../../src/media/audio/lib/test/comparators.cc

  • template <fuchsia::media::AudioSampleFormat SampleFormat>
    void ExpectSilentAudioBuffer (AudioBufferSlice<SampleFormat> slice, ExpectAudioBufferOptions options)

    Expect that the given slice is silent.

    Equivalent to CompareAudioBuffers(got_slice, AudioBufferSlice(), {.partial = true}).

    Defined at line 245 of file ../../src/media/audio/lib/test/comparators.cc

  • template <fuchsia::media::AudioSampleFormat SampleFormat>
    void ExpectNonSilentAudioBuffer (AudioBufferSlice<SampleFormat> sliceExpectAudioBufferOptions options)

    Expect that the given slice is not silent.

    Defined at line 251 of file ../../src/media/audio/lib/test/comparators.cc