Skip to content

Commit

Permalink
fix: distinguish between BiquadFilterNode and OscillatorNode
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Jul 10, 2024
1 parent b651062 commit b6b2591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guards/oscillator-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { IAudioNode, IOscillatorNode } from '../interfaces';
import { TContext } from '../types';

export const isOscillatorNode = <T extends TContext>(audioNode: IAudioNode<T>): audioNode is IOscillatorNode<T> => {
return 'detune' in audioNode && 'frequency' in audioNode;
return 'detune' in audioNode && 'frequency' in audioNode && !('gain' in audioNode);
};

0 comments on commit b6b2591

Please sign in to comment.