import AudioNodeSubgraph from './AudioNodeSubgraph' ; import Device from './Device' ; /**
 * This class simplifies the process of defining a transform device that
 * does not modify its input device constraints, and provides only a single audio node
 * to apply transforms.
 *
 * Subclass `SingleNodeAudioTransformDevice`, implementing `createSingleAudioNode`.
 */ export default abstract class SingleNodeAudioTransformDevice < T extends AudioNode > { protected node : T | undefined ; constructor ( protected inner ) { } async mute ( _muted ) { } /**
     * `stop` should be called by the application to free any resources associated
     * with the device (e.g., workers).
     *
     * After this is called, the device should be discarded.
     */ async stop ( ) { this . node ?. disconnect ( ) ; } /**
     * Return the inner  Device that the device controller should select as part
     * of the application of this `AudioTransformDevice`.
      async intrinsicDevice ( ) { return this . inner ; } param context async createAudioNode ( context ) { this . node ?. disconnect ( ) ; this . node = await this . createSingleAudioNode ( context ) ; return { start : this . node , end : this . node , } ; } abstract createSingleAudioNode ( context ) ; }