Skip to content

Commit

Permalink
fix: fix merge unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Makowski committed Jul 25, 2024
1 parent 92568e0 commit 9749b8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 30 deletions.
4 changes: 0 additions & 4 deletions cpp/OscillatorNode/OscillatorNodeWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ namespace audiocontext {
class OscillatorNodeWrapper: public AudioNodeWrapper {
#ifdef ANDROID
std::shared_ptr<OscillatorNode> oscillator_;
#else
std::shared_ptr<IOSOscillator> oscillator_;
#endif

public:
explicit OscillatorNodeWrapper(const std::shared_ptr<OscillatorNode> &oscillator) : AudioNodeWrapper(
oscillator), oscillator_(oscillator) {}
Expand Down
5 changes: 3 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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!);
}
};

Expand Down Expand Up @@ -90,7 +91,7 @@ const App: React.FC = () => {
/>
</View>
<View style={styles.container}>
<Text>Gain: {gain.toFixed(1)}</Text>
<Text>Gain: {gain.toFixed(2)}</Text>
<Slider
containerStyle={styles.slider}
value={gain}
Expand Down
24 changes: 0 additions & 24 deletions src/AudioContext.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/modules/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Oscillator } from '../types';

type AudioContext = {
createOscillator: () => Oscillator;
createGain: () => Gain;
destination: AudioDestinationNode | null;
};

Expand Down

0 comments on commit 9749b8d

Please sign in to comment.