From 9749b8d0bb14d5da0b0c577d6488e08d000f8c72 Mon Sep 17 00:00:00 2001 From: Maciej Makowski Date: Thu, 25 Jul 2024 14:29:43 +0200 Subject: [PATCH] fix: fix merge unwanted changes --- cpp/OscillatorNode/OscillatorNodeWrapper.h | 4 ---- example/src/App.tsx | 5 +++-- src/AudioContext.ts | 24 ---------------------- src/modules/global.d.ts | 1 + 4 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 src/AudioContext.ts diff --git a/cpp/OscillatorNode/OscillatorNodeWrapper.h b/cpp/OscillatorNode/OscillatorNodeWrapper.h index fefc2642..cf37e9d0 100644 --- a/cpp/OscillatorNode/OscillatorNodeWrapper.h +++ b/cpp/OscillatorNode/OscillatorNodeWrapper.h @@ -17,10 +17,6 @@ namespace audiocontext { class OscillatorNodeWrapper: public AudioNodeWrapper { #ifdef ANDROID std::shared_ptr oscillator_; -#else - std::shared_ptr oscillator_; -#endif - public: explicit OscillatorNodeWrapper(const std::shared_ptr &oscillator) : AudioNodeWrapper( oscillator), oscillator_(oscillator) {} diff --git a/example/src/App.tsx b/example/src/App.tsx index 9aac829d..cd16e67c 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -32,7 +32,8 @@ const App: React.FC = () => { if (Platform.OS === 'android') { const destination = audioContextRef.current.destination; - oscillatorRef.current.connect(destination!); + oscillatorRef.current.connect(gainRef.current); + gainRef.current.connect(destination!); } }; @@ -90,7 +91,7 @@ const App: React.FC = () => { /> - Gain: {gain.toFixed(1)} + Gain: {gain.toFixed(2)} Oscillator; + createGain: () => Gain; destination: AudioDestinationNode | null; };