Skip to content

Commit 1888507

Browse files
fix: nitpicks
1 parent 2952e5e commit 1888507

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/react-native-audio-api/common/cpp/audioapi/core/BaseAudioContext.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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

2726
void 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

109107
void 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);

packages/react-native-audio-api/common/cpp/test/src/graph/AudioGraphFuzzTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
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

1414
namespace audioapi::utils::graph {
1515

0 commit comments

Comments
 (0)