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
diff --git a/media/libaaudio/src/flowgraph/FlowGraphNode.cpp b/media/libaaudio/src/flowgraph/FlowGraphNode.cpp
index 4c76e77..012abe7 100644
--- a/media/libaaudio/src/flowgraph/FlowGraphNode.cpp
+++ b/media/libaaudio/src/flowgraph/FlowGraphNode.cpp
@@ -19,7 +19,7 @@
#include <sys/types.h>
#include "FlowGraphNode.h"
-using namespace flowgraph;
+using namespace FLOWGRAPH_OUTER_NAMESPACE::flowgraph;
/***************************************************************************/
int32_t FlowGraphNode::pullData(int32_t numFrames, int64_t callCount) {
@@ -68,7 +68,7 @@
: FlowGraphPort(parent, samplesPerFrame)
, mFramesPerBuffer(framesPerBuffer)
, mBuffer(nullptr) {
- size_t numFloats = framesPerBuffer * getSamplesPerFrame();
+ size_t numFloats = static_cast<size_t>(framesPerBuffer) * getSamplesPerFrame();
mBuffer = std::make_unique<float[]>(numFloats);
}