File tree Expand file tree Collapse file tree
packages/react-native-audio-api/common/cpp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ BaseAudioContext::BaseAudioContext(
2020 runtimeRegistry_(runtimeRegistry),
2121 audioEventScheduler_(AUDIO_SCHEDULER_CAPACITY),
2222 disposer_(
23- std::make_unique<utils::DisposerImpl<utils::graph::Graph::kDisposerPayloadSize >>(
24- AUDIO_SCHEDULER_CAPACITY)),
23+ std::make_unique<utils::DisposerImpl<DISPOSER_PAYLOAD_SIZE>>(AUDIO_SCHEDULER_CAPACITY)),
2524 graph_(std::make_shared<utils::graph::Graph>(AUDIO_SCHEDULER_CAPACITY, disposer_.get())) {}
2625
2726void BaseAudioContext::initialize (const AudioDestinationNode *destination) {
@@ -101,15 +100,14 @@ const RuntimeRegistry &BaseAudioContext::getRuntimeRegistry() const {
101100 return runtimeRegistry_;
102101}
103102
104- utils::DisposerImpl<utils::graph::Graph::kDisposerPayloadSize > *BaseAudioContext::getDisposer ()
105- const {
103+ utils::DisposerImpl<DISPOSER_PAYLOAD_SIZE> *BaseAudioContext::getDisposer () const {
106104 return disposer_.get ();
107105}
108106
109107void BaseAudioContext::processGraph (DSPAudioBuffer *buffer, int numFrames) {
108+ processAudioEvents ();
110109 graph_->processEvents ();
111110 graph_->process ();
112- processAudioEvents ();
113111
114112 for (auto &&[node, inputs] : graph_->iter ()) {
115113 node.process (inputs, numFrames);
Original file line number Diff line number Diff line change 44#include " TestGraphUtils.h"
55
66#include < iostream>
7+ #include < memory>
78#include < random>
89#include < set>
910#include < string>
1011#include < utility>
1112#include < vector>
12- #include < memory>
1313
1414namespace audioapi ::utils::graph {
1515
You can’t perform that action at this time.
0 commit comments