Skip to content

Commit

Permalink
Fix several import issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ctoth committed Jun 24, 2024
1 parent 84411b5 commit 353fcb5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/cacophony.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { AudioContext, AudioWorkletNode, IAudioListener, IMediaStreamAudioSourceNode, IOscillatorOptions, IPannerNode, IPannerOptions } from 'standardized-audio-context';
import { AudioContext, AudioWorkletNode, IAudioListener, IMediaStreamAudioSourceNode, IPannerNode, IPannerOptions } from 'standardized-audio-context';
import phaseVocoderProcessorWorkletUrl from './bundles/phase-vocoder-bundle.js?url';
import { AudioCache } from './cache';
import { BiquadFilterNode, GainNode, AudioBuffer } from './context';
import { AudioBuffer, BiquadFilterNode, GainNode } from './context';
import { FilterManager } from './filters';
import { Group } from './group';
import { Playback } from './playback';
import type { Playback } from './playback';
import { Sound } from './sound';
import { createStream } from './stream';
import { Synth } from './synth';
Expand Down
2 changes: 1 addition & 1 deletion src/container.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Position } from "./cacophony";
import type { Position } from "./cacophony";
import { BiquadFilterNode } from "./context";
import { FilterManager } from "./filters";
import { BasePlayback, Playback } from "./playback";
Expand Down
2 changes: 1 addition & 1 deletion src/group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseSound, LoopCount, Position } from './cacophony';
import type { BaseSound, LoopCount, Position } from './cacophony';

import { BiquadFilterNode } from './context';
import { Playback } from './playback';
Expand Down
2 changes: 1 addition & 1 deletion src/pannerMixin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PanType, Position } from "./cacophony";
import type { AudioContext, PannerNode, StereoPannerNode } from "./context";
import { PanType, Position } from "./cacophony";
import { FilterManager } from "./filters";

export type PanCloneOverrides = {
Expand Down
9 changes: 4 additions & 5 deletions src/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
*/


import type { PanCloneOverrides } from "pannerMixin";
import { AudioContext, IAudioBuffer } from "standardized-audio-context";
import type { VolumeCloneOverrides } from "volumeMixin";
import { SoundType, type BaseSound, type LoopCount, type PanType } from "./cacophony";
import { PlaybackContainer } from "./container";
import type { BiquadFilterNode, GainNode, SourceNode, } from './context';
import type { AudioBuffer, AudioContext, BiquadFilterNode, GainNode, SourceNode, } from './context';
import { FilterManager } from "./filters";
import type { PanCloneOverrides } from "./pannerMixin";
import { Playback } from "./playback";
import type { VolumeCloneOverrides } from "./volumeMixin";

type SoundCloneOverrides = PanCloneOverrides & VolumeCloneOverrides & {
loopCount?: LoopCount;
Expand All @@ -39,7 +38,7 @@ type SoundCloneOverrides = PanCloneOverrides & VolumeCloneOverrides & {

export class Sound extends PlaybackContainer(FilterManager) implements BaseSound {
protected playbacks: Playback[] = [];
buffer?: IAudioBuffer;
buffer?: AudioBuffer;
context: AudioContext;
loopCount: LoopCount = 0;
private _playbackRate: number = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AudioContext, IAudioBuffer, IAudioBufferSourceNode, IAudioListener, IBiquadFilterNode, IGainNode, IMediaElementAudioSourceNode, IMediaStreamAudioSourceNode, IPannerNode, IPannerOptions } from 'standardized-audio-context';
import { AudioContext, IAudioBuffer } from 'standardized-audio-context';


const appendBuffer = (buffer1: ArrayBuffer, buffer2: ArrayBuffer): ArrayBuffer => {
Expand Down
8 changes: 4 additions & 4 deletions src/synth.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { OscillatorCloneOverrides } from "oscillatorMixin";
import type { PanCloneOverrides } from "pannerMixin";
import type { VolumeCloneOverrides } from "volumeMixin";
import { BaseSound, PanType, SoundType } from "./cacophony";
import { SoundType, type BaseSound, type PanType } from "./cacophony";
import { PlaybackContainer } from "./container";
import type { GainNode } from './context';
import { AudioContext } from './context';
import type { FilterCloneOverrides } from "./filters";
import { FilterManager } from "./filters";
import type { OscillatorCloneOverrides } from "./oscillatorMixin";
import type { PanCloneOverrides } from "./pannerMixin";
import { SynthPlayback } from "./synthPlayback";
import type { VolumeCloneOverrides } from "./volumeMixin";

type SynthCloneOverrides = FilterCloneOverrides & OscillatorCloneOverrides & PanCloneOverrides & VolumeCloneOverrides

Expand Down
2 changes: 1 addition & 1 deletion src/synthPlayback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseSound, PanType } from "./cacophony";
import type { BaseSound, PanType } from "./cacophony";
import type { AudioContext, GainNode, OscillatorNode } from "./context";
import { FilterManager } from "./filters";
import { OscillatorMixin } from "./oscillatorMixin";
Expand Down

0 comments on commit 353fcb5

Please sign in to comment.