Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit edc850a9 authored by Robert Wu's avatar Robert Wu
Browse files

AAudio: Completely sync flowgraph with Oboe

AAudio and Oboe flowgraph is not completely in sync.
Any change targetting or another can lead to mistakes.

https://github.com/google/oboe/pull/1524 is the associated
PR over on github.

After these changes, the two repos will be exactly the same.

Bug: 227184807
Bug: 227183850
Test: atest test_various
Test: atest test_flowgraph
Test: atest AAudioTests
Test: play notes on Soundboard
Change-Id: Ifa586abc43c16f49f50d78df0c2a95048933fc0d
parent 986c16c9
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,6 @@ cc_library {
        "-Wno-unused-parameter",
        "-Wno-unused-parameter",
        "-Wall",
        "-Wall",
        "-Werror",
        "-Werror",

        // By default, all symbols are hidden.
        // By default, all symbols are hidden.
        // "-fvisibility=hidden",
        // "-fvisibility=hidden",
        // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
        // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
+1 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@
#include <flowgraph/SourceI24.h>
#include <flowgraph/SourceI24.h>
#include <flowgraph/SourceI32.h>
#include <flowgraph/SourceI32.h>


using namespace flowgraph;
using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph;


aaudio_result_t AAudioFlowGraph::configure(audio_format_t sourceFormat,
aaudio_result_t AAudioFlowGraph::configure(audio_format_t sourceFormat,
                          int32_t sourceChannelCount,
                          int32_t sourceChannelCount,
+13 −11
Original line number Original line Diff line number Diff line
@@ -72,17 +72,19 @@ public:
    void setRampLengthInFrames(int32_t numFrames);
    void setRampLengthInFrames(int32_t numFrames);


private:
private:
    std::unique_ptr<flowgraph::FlowGraphSourceBuffered>     mSource;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::FlowGraphSourceBuffered> mSource;
    std::unique_ptr<flowgraph::MonoBlend>                   mMonoBlend;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::MonoBlend> mMonoBlend;
    std::unique_ptr<flowgraph::ClipToRange>                 mClipper;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::ClipToRange> mClipper;
    std::unique_ptr<flowgraph::MonoToMultiConverter>        mChannelConverter;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::MonoToMultiConverter> mChannelConverter;
    std::unique_ptr<flowgraph::ManyToMultiConverter>        mManyToMultiConverter;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::ManyToMultiConverter>
    std::unique_ptr<flowgraph::MultiToManyConverter>        mMultiToManyConverter;
            mManyToMultiConverter;
    std::vector<std::unique_ptr<flowgraph::RampLinear>>     mVolumeRamps;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::MultiToManyConverter>
            mMultiToManyConverter;
    std::vector<std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::RampLinear>> mVolumeRamps;
    std::vector<float> mPanningVolumes;
    std::vector<float> mPanningVolumes;
    float mTargetVolume = 1.0f;
    float mTargetVolume = 1.0f;
    android::audio_utils::Balance mBalance;
    android::audio_utils::Balance mBalance;
    std::unique_ptr<flowgraph::FlowGraphSink>               mSink;
    std::unique_ptr<FLOWGRAPH_OUTER_NAMESPACE::flowgraph::FlowGraphSink> mSink;
};
};




+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@
#include "FlowGraphNode.h"
#include "FlowGraphNode.h"
#include "ChannelCountConverter.h"
#include "ChannelCountConverter.h"


using namespace flowgraph;
using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph;


ChannelCountConverter::ChannelCountConverter(
ChannelCountConverter::ChannelCountConverter(
        int32_t inputChannelCount,
        int32_t inputChannelCount,
+2 −2
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@


#include "FlowGraphNode.h"
#include "FlowGraphNode.h"


namespace flowgraph {
namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph {


/**
/**
 * Change the number of number of channels without mixing.
 * Change the number of number of channels without mixing.
@@ -47,6 +47,6 @@ namespace flowgraph {
        FlowGraphPortFloatOutput output;
        FlowGraphPortFloatOutput output;
    };
    };


} /* namespace flowgraph */
} /* namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph */


#endif //FLOWGRAPH_CHANNEL_COUNT_CONVERTER_H
#endif //FLOWGRAPH_CHANNEL_COUNT_CONVERTER_H
Loading