1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006 |
- Unit webaudio;
- {$MODE ObjFPC}
- {$H+}
- {$modeswitch externalclass}
- interface
- uses SysUtils, JS,web,types;
- {
- Automatically generated file by TWebIDLToPas on 2018-06-23 10:52:00
-
- Used command-line options :
- -i
- webaudio.idl
- -v
- v2
- -t
- EventTarget=TJSEventTarget,DOMHighResTimeStamp=TJSDOMHighResTimeStamp,HTMLMediaElement=TJSElement,MediaStream=JSValue,MediaStreamTrack=JSValue,EventHandler=TJSEVentHandler,Promise=TJSPromise,Event=TJSEvent,Worklet=TJSOBject,WorkletGlobalScope=TJSObject,VoidFunction=TProcedure,MessagePort=TJSMessagePort
- -x
- web,types
- -d
- -p
-
- Command-line options translate to:
-
- Options : [coDictionaryAsClass,coaddOptionsToheader]
- Keyword prefix :
- Keyword suffix : _
- Class prefix : TJS
- Class suffix :
- Field prefix : F
- WEBIDLversion : v2
- Type aliases:
- EventTarget=TJSEventTarget
- DOMHighResTimeStamp=TJSDOMHighResTimeStamp
- HTMLMediaElement=TJSElement
- MediaStream=JSValue
- MediaStreamTrack=JSValue
- EventHandler=TJSEVentHandler
- Promise=TJSPromise
- Event=TJSEvent
- Worklet=TJSOBject
- WorkletGlobalScope=TJSObject
- VoidFunction=TProcedure
- MessagePort=TJSMessagePort
- }
- Type
- // Forward class definitions
- TJSBaseAudioContext = Class;
- TJSAudioContext = Class;
- TJSOfflineAudioContext = Class;
- TJSOfflineAudioCompletionEvent = Class;
- TJSAudioBuffer = Class;
- TJSAudioNode = Class;
- TJSAudioParam = Class;
- TJSAudioScheduledSourceNode = Class;
- TJSAnalyserNode = Class;
- TJSAudioBufferSourceNode = Class;
- TJSAudioDestinationNode = Class;
- TJSAudioListener = Class;
- TJSAudioProcessingEvent = Class;
- TJSBiquadFilterNode = Class;
- TJSChannelMergerNode = Class;
- TJSChannelSplitterNode = Class;
- TJSConstantSourceNode = Class;
- TJSConvolverNode = Class;
- TJSDelayNode = Class;
- TJSDynamicsCompressorNode = Class;
- TJSGainNode = Class;
- TJSIIRFilterNode = Class;
- TJSMediaElementAudioSourceNode = Class;
- TJSMediaStreamAudioDestinationNode = Class;
- TJSMediaStreamAudioSourceNode = Class;
- TJSMediaStreamTrackAudioSourceNode = Class;
- TJSOscillatorNode = Class;
- TJSPannerNode = Class;
- TJSPeriodicWave = Class;
- TJSScriptProcessorNode = Class;
- TJSStereoPannerNode = Class;
- TJSWaveShaperNode = Class;
- TJSAudioWorklet = Class;
- TJSAudioWorkletGlobalScope = Class;
- TJSAudioParamMap = Class;
- TJSAudioWorkletNode = Class;
- TJSAudioWorkletProcessor = Class;
- TJSAudioContextOptions = Class;
- TJSAudioTimestamp = Class;
- TJSOfflineAudioContextOptions = Class;
- TJSOfflineAudioCompletionEventInit = Class;
- TJSAudioBufferOptions = Class;
- TJSAudioNodeOptions = Class;
- TJSAnalyserOptions = Class;
- TJSAudioBufferSourceOptions = Class;
- TJSAudioProcessingEventInit = Class;
- TJSBiquadFilterOptions = Class;
- TJSChannelMergerOptions = Class;
- TJSChannelSplitterOptions = Class;
- TJSConstantSourceOptions = Class;
- TJSConvolverOptions = Class;
- TJSDelayOptions = Class;
- TJSDynamicsCompressorOptions = Class;
- TJSGainOptions = Class;
- TJSIIRFilterOptions = Class;
- TJSMediaElementAudioSourceOptions = Class;
- TJSMediaStreamAudioSourceOptions = Class;
- TJSMediaStreamTrackAudioSourceOptions = Class;
- TJSOscillatorOptions = Class;
- TJSPannerOptions = Class;
- TJSPeriodicWaveConstraints = Class;
- TJSPeriodicWaveOptions = Class;
- TJSStereoPannerOptions = Class;
- TJSWaveShaperOptions = Class;
- TJSAudioWorkletNodeOptions = Class;
- TJSAudioParamDescriptor = Class;
- AudioContextState = String;
- AudioContextLatencyCategory = String;
- ChannelCountMode = String;
- ChannelInterpretation = String;
- AutomationRate = String;
- BiquadFilterType = String;
- OscillatorType = String;
- PanningModelType = String;
- DistanceModelType = String;
- OverSampleType = String;
- DecodeErrorCallback = Procedure (error : TJSError);
- DecodeSuccessCallback = Procedure (decodedData : TJSAudioBuffer);
-
- { --------------------------------------------------------------------
- TJSAudioContextOptions
- --------------------------------------------------------------------}
-
- TJSAudioContextOptions = class external name 'Object' (TJSObject)
- latencyHint : JSValue;
- sampleRate : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioTimestamp
- --------------------------------------------------------------------}
-
- TJSAudioTimestamp = class external name 'Object' (TJSObject)
- contextTime : Double;
- performanceTime : TJSDOMHighResTimeStamp;
- end;
-
- { --------------------------------------------------------------------
- TJSOfflineAudioContextOptions
- --------------------------------------------------------------------}
-
- TJSOfflineAudioContextOptions = class external name 'Object' (TJSObject)
- numberOfChannels : NativeInt;
- length_ : NativeInt;external name 'length';
- sampleRate : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSOfflineAudioCompletionEventInit
- --------------------------------------------------------------------}
-
- TJSOfflineAudioCompletionEventInit = class external name 'Object' (TJSObject)
- renderedBuffer : TJSAudioBuffer;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioBufferOptions
- --------------------------------------------------------------------}
-
- TJSAudioBufferOptions = class external name 'Object' (TJSObject)
- numberOfChannels : NativeInt;
- length_ : NativeInt;external name 'length';
- sampleRate : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioNodeOptions
- --------------------------------------------------------------------}
-
- TJSAudioNodeOptions = class external name 'Object' (TJSObject)
- channelCount : NativeInt;
- _channelCountMode : ChannelCountMode;external name 'channelCountMode';
- _channelInterpretation : ChannelInterpretation;external name 'channelInterpretation';
- end;
-
- { --------------------------------------------------------------------
- TJSAnalyserOptions
- --------------------------------------------------------------------}
-
- TJSAnalyserOptions = class external name 'Object' (TJSObject)
- fftSize : NativeInt;
- maxDecibels : Double;
- minDecibels : Double;
- smoothingTimeConstant : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioBufferSourceOptions
- --------------------------------------------------------------------}
-
- TJSAudioBufferSourceOptions = class external name 'Object' (TJSObject)
- buffer : TJSAudioBuffer;
- detune : Double;
- loop : boolean;
- loopEnd : Double;
- loopStart : Double;
- playbackRate : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioProcessingEventInit
- --------------------------------------------------------------------}
-
- TJSAudioProcessingEventInit = class external name 'Object' (TJSObject)
- playbackTime : Double;
- inputBuffer : TJSAudioBuffer;
- outputBuffer : TJSAudioBuffer;
- end;
-
- { --------------------------------------------------------------------
- TJSBiquadFilterOptions
- --------------------------------------------------------------------}
-
- TJSBiquadFilterOptions = class external name 'Object' (TJSObject)
- type_ : BiquadFilterType;external name 'type';
- Q : Double;
- detune : Double;
- frequency : Double;
- gain : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSChannelMergerOptions
- --------------------------------------------------------------------}
-
- TJSChannelMergerOptions = class external name 'Object' (TJSObject)
- numberOfInputs : NativeInt;
- end;
-
- { --------------------------------------------------------------------
- TJSChannelSplitterOptions
- --------------------------------------------------------------------}
-
- TJSChannelSplitterOptions = class external name 'Object' (TJSObject)
- numberOfOutputs : NativeInt;
- end;
-
- { --------------------------------------------------------------------
- TJSConstantSourceOptions
- --------------------------------------------------------------------}
-
- TJSConstantSourceOptions = class external name 'Object' (TJSObject)
- offset : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSConvolverOptions
- --------------------------------------------------------------------}
-
- TJSConvolverOptions = class external name 'Object' (TJSObject)
- buffer : TJSAudioBuffer;
- disableNormalization : boolean;
- end;
-
- { --------------------------------------------------------------------
- TJSDelayOptions
- --------------------------------------------------------------------}
-
- TJSDelayOptions = class external name 'Object' (TJSObject)
- maxDelayTime : Double;
- delayTime : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSDynamicsCompressorOptions
- --------------------------------------------------------------------}
-
- TJSDynamicsCompressorOptions = class external name 'Object' (TJSObject)
- attack : Double;
- knee : Double;
- ratio : Double;
- release : Double;
- threshold : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSGainOptions
- --------------------------------------------------------------------}
-
- TJSGainOptions = class external name 'Object' (TJSObject)
- gain : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSIIRFilterOptions
- --------------------------------------------------------------------}
-
- TJSIIRFilterOptions = class external name 'Object' (TJSObject)
- feedforward : TDoubleDynArray;
- feedback : TDoubleDynArray;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaElementAudioSourceOptions
- --------------------------------------------------------------------}
-
- TJSMediaElementAudioSourceOptions = class external name 'Object' (TJSObject)
- mediaElement : TJSElement;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaStreamAudioSourceOptions
- --------------------------------------------------------------------}
-
- TJSMediaStreamAudioSourceOptions = class external name 'Object' (TJSObject)
- mediaStream : JSValue;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaStreamTrackAudioSourceOptions
- --------------------------------------------------------------------}
-
- TJSMediaStreamTrackAudioSourceOptions = class external name 'Object' (TJSObject)
- mediaStreamTrack : JSValue;
- end;
-
- { --------------------------------------------------------------------
- TJSOscillatorOptions
- --------------------------------------------------------------------}
-
- TJSOscillatorOptions = class external name 'Object' (TJSObject)
- type_ : OscillatorType;external name 'type';
- frequency : Double;
- detune : Double;
- periodicWave : TJSPeriodicWave;
- end;
-
- { --------------------------------------------------------------------
- TJSPannerOptions
- --------------------------------------------------------------------}
-
- TJSPannerOptions = class external name 'Object' (TJSObject)
- panningModel : PanningModelType;
- distanceModel : DistanceModelType;
- positionX : Double;
- positionY : Double;
- positionZ : Double;
- orientationX : Double;
- orientationY : Double;
- orientationZ : Double;
- refDistance : Double;
- maxDistance : Double;
- rolloffFactor : Double;
- coneInnerAngle : Double;
- coneOuterAngle : Double;
- coneOuterGain : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSPeriodicWaveConstraints
- --------------------------------------------------------------------}
-
- TJSPeriodicWaveConstraints = class external name 'Object' (TJSObject)
- disableNormalization : boolean;
- end;
-
- { --------------------------------------------------------------------
- TJSPeriodicWaveOptions
- --------------------------------------------------------------------}
-
- TJSPeriodicWaveOptions = class external name 'Object' (TJSObject)
- real : TDoubleDynArray;
- imag : TDoubleDynArray;
- end;
-
- { --------------------------------------------------------------------
- TJSStereoPannerOptions
- --------------------------------------------------------------------}
-
- TJSStereoPannerOptions = class external name 'Object' (TJSObject)
- pan : Double;
- end;
-
- { --------------------------------------------------------------------
- TJSWaveShaperOptions
- --------------------------------------------------------------------}
-
- TJSWaveShaperOptions = class external name 'Object' (TJSObject)
- curve : TDoubleDynArray;
- oversample : OverSampleType;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioWorkletNodeOptions
- --------------------------------------------------------------------}
-
- TJSAudioWorkletNodeOptions = class external name 'Object' (TJSObject)
- numberOfInputs : NativeInt;
- numberOfOutputs : NativeInt;
- outputChannelCount : TNativeIntDynArray;
- parameterData : TJSObject;
- processorOptions : TJSObject;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioParamDescriptor
- --------------------------------------------------------------------}
-
- TJSAudioParamDescriptor = class external name 'Object' (TJSObject)
- name : String;
- defaultValue : Double;
- minValue : Double;
- maxValue : Double;
- _automationRate : AutomationRate;external name 'automationRate';
- end;
-
- { --------------------------------------------------------------------
- TJSBaseAudioContext
- --------------------------------------------------------------------}
-
- TDoubleDynArray = Array of Double;
-
- TJSBaseAudioContext = class external name 'BaseAudioContext' (TJSEventTarget)
- Private
- Fdestination : TJSAudioDestinationNode; external name 'destination';
- FsampleRate : Double; external name 'sampleRate';
- FcurrentTime : Double; external name 'currentTime';
- Flistener : TJSAudioListener; external name 'listener';
- Fstate : AudioContextState; external name 'state';
- FaudioWorklet : TJSAudioWorklet; external name 'audioWorklet';
- Public
-
- onstatechange : TJSEVentHandler;
- function createAnalyser: TJSAnalyserNode;
- function createBiquadFilter: TJSBiquadFilterNode;
- function createBuffer(numberOfChannels : NativeInt; length_ : NativeInt; sampleRate : Double): TJSAudioBuffer;
- function createBufferSource: TJSAudioBufferSourceNode;
- function createChannelMerger(numberOfInputs : NativeInt): TJSChannelMergerNode; overload;
- function createChannelMerger: TJSChannelMergerNode; overload;
- function createChannelSplitter(numberOfOutputs : NativeInt): TJSChannelSplitterNode; overload;
- function createChannelSplitter: TJSChannelSplitterNode; overload;
- function createConstantSource: TJSConstantSourceNode;
- function createConvolver: TJSConvolverNode;
- function createDelay(maxDelayTime : Double): TJSDelayNode; overload;
- function createDelay: TJSDelayNode; overload;
- function createDynamicsCompressor: TJSDynamicsCompressorNode;
- function createGain: TJSGainNode;
- function createIIRFilter(feedforward : TDoubleDynArray; feedback : TDoubleDynArray): TJSIIRFilterNode;
- function createOscillator: TJSOscillatorNode;
- function createPanner: TJSPannerNode;
- function createPeriodicWave(real : TDoubleDynArray; imag : TDoubleDynArray; constraints : TJSPeriodicWaveConstraints): TJSPeriodicWave; overload;
- function createPeriodicWave(real : TDoubleDynArray; imag : TDoubleDynArray): TJSPeriodicWave; overload;
- function createScriptProcessor(bufferSize : NativeInt; numberOfInputChannels : NativeInt; numberOfOutputChannels : NativeInt): TJSScriptProcessorNode; overload;
- function createScriptProcessor: TJSScriptProcessorNode; overload;
- function createScriptProcessor(bufferSize : NativeInt): TJSScriptProcessorNode; overload;
- function createScriptProcessor(bufferSize : NativeInt; numberOfInputChannels : NativeInt): TJSScriptProcessorNode; overload;
- function createStereoPanner: TJSStereoPannerNode;
- function createWaveShaper: TJSWaveShaperNode;
- function decodeAudioData(audioData : TJSArrayBuffer; successCallback : DecodeSuccessCallback; errorCallback : DecodeErrorCallback): TJSPromise; overload;
- function decodeAudioData(audioData : TJSArrayBuffer): TJSPromise; overload;
- function decodeAudioData(audioData : TJSArrayBuffer; successCallback : DecodeSuccessCallback): TJSPromise; overload;
- function resume: TJSPromise;
- Property destination : TJSAudioDestinationNode Read Fdestination;
- Property sampleRate : Double Read FsampleRate;
- Property currentTime : Double Read FcurrentTime;
- Property listener : TJSAudioListener Read Flistener;
- Property state : AudioContextState Read Fstate;
- Property audioWorklet : TJSAudioWorklet Read FaudioWorklet;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioContext
- --------------------------------------------------------------------}
-
- TJSAudioContext = class external name 'AudioContext' (TJSBaseAudioContext)
- Private
- FbaseLatency : Double; external name 'baseLatency';
- FoutputLatency : Double; external name 'outputLatency';
- Public
- function getOutputTimestamp: TJSAudioTimestamp;
- function suspend: TJSPromise;
- function close: TJSPromise;
- function createMediaElementSource(mediaElement : TJSElement): TJSMediaElementAudioSourceNode;
- function createMediaStreamSource(mediaStream : JSValue): TJSMediaStreamAudioSourceNode;
- function createMediaStreamTrackSource(mediaStreamTrack : JSValue): TJSMediaStreamTrackAudioSourceNode;
- function createMediaStreamDestination: TJSMediaStreamAudioDestinationNode;
- Property baseLatency : Double Read FbaseLatency;
- Property outputLatency : Double Read FoutputLatency;
- end;
-
- { --------------------------------------------------------------------
- TJSOfflineAudioContext
- --------------------------------------------------------------------}
-
- TJSOfflineAudioContext = class external name 'OfflineAudioContext' (TJSBaseAudioContext)
- Private
- Flength_ : NativeInt; external name 'length';
- Public
- oncomplete : TJSEVentHandler;
- function startRendering: TJSPromise;
- function suspend(suspendTime : Double): TJSPromise;
- Property length_ : NativeInt Read Flength_;
- end;
-
- { --------------------------------------------------------------------
- TJSOfflineAudioCompletionEvent
- --------------------------------------------------------------------}
-
- TJSOfflineAudioCompletionEvent = class external name 'OfflineAudioCompletionEvent' (TJSEvent)
- Private
- FrenderedBuffer : TJSAudioBuffer; external name 'renderedBuffer';
- Public
- Property renderedBuffer : TJSAudioBuffer Read FrenderedBuffer;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioBuffer
- --------------------------------------------------------------------}
-
- TJSAudioBuffer = class external name 'AudioBuffer'
- Private
- FsampleRate : Double; external name 'sampleRate';
- Flength_ : NativeInt; external name 'length';
- Fduration : Double; external name 'duration';
- FnumberOfChannels : NativeInt; external name 'numberOfChannels';
- Public
- function getChannelData(channel : NativeInt): TJSFloat32Array;
- Procedure copyFromChannel(destination : TJSFloat32Array; channelNumber : NativeInt; startInChannel : NativeInt); overload;
- Procedure copyFromChannel(destination : TJSFloat32Array; channelNumber : NativeInt); overload;
- Procedure copyToChannel(source : TJSFloat32Array; channelNumber : NativeInt; startInChannel : NativeInt); overload;
- Procedure copyToChannel(source : TJSFloat32Array; channelNumber : NativeInt); overload;
- Property sampleRate : Double Read FsampleRate;
- Property length_ : NativeInt Read Flength_;
- Property duration : Double Read Fduration;
- Property numberOfChannels : NativeInt Read FnumberOfChannels;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioNode
- --------------------------------------------------------------------}
-
- TJSAudioNode = class external name 'AudioNode' (TJSEventTarget)
- Private
- Fcontext : TJSBaseAudioContext; external name 'context';
- FnumberOfInputs : NativeInt; external name 'numberOfInputs';
- FnumberOfOutputs : NativeInt; external name 'numberOfOutputs';
- Public
- channelCount : NativeInt;
- _channelCountMode : ChannelCountMode;external name 'channelCountMode';
- _channelInterpretation : ChannelInterpretation;external name 'channelInterpretation';
- function connect(destinationNode : TJSAudioNode; output : NativeInt; input : NativeInt): TJSAudioNode; overload;
- function connect(destinationNode : TJSAudioNode): TJSAudioNode; overload;
- function connect(destinationNode : TJSAudioNode; output : NativeInt): TJSAudioNode; overload;
- Procedure connect(destinationParam : TJSAudioParam; output : NativeInt); overload;
- Procedure connect(destinationParam : TJSAudioParam); overload;
- Procedure disconnect;
- Procedure disconnect(output : NativeInt);
- Procedure disconnect(destinationNode : TJSAudioNode);
- Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt);
- Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt; input : NativeInt);
- Procedure disconnect(destinationParam : TJSAudioParam);
- Procedure disconnect(destinationParam : TJSAudioParam; output : NativeInt);
- Property context : TJSBaseAudioContext Read Fcontext;
- Property numberOfInputs : NativeInt Read FnumberOfInputs;
- Property numberOfOutputs : NativeInt Read FnumberOfOutputs;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioParam
- --------------------------------------------------------------------}
-
- TJSAudioParam = class external name 'AudioParam'
- Private
- FdefaultValue : Double; external name 'defaultValue';
- FminValue : Double; external name 'minValue';
- FmaxValue : Double; external name 'maxValue';
- Public
- value : Double;
- _automationRate : AutomationRate;external name 'automationRate';
- function setValueAtTime(value : Double; startTime : Double): TJSAudioParam;
- function linearRampToValueAtTime(value : Double; endTime : Double): TJSAudioParam;
- function exponentialRampToValueAtTime(value : Double; endTime : Double): TJSAudioParam;
- function setTargetAtTime(target : Double; startTime : Double; timeConstant : Double): TJSAudioParam;
- function setValueCurveAtTime(values : TDoubleDynArray; startTime : Double; duration : Double): TJSAudioParam;
- function cancelScheduledValues(cancelTime : Double): TJSAudioParam;
- function cancelAndHoldAtTime(cancelTime : Double): TJSAudioParam;
- Property defaultValue : Double Read FdefaultValue;
- Property minValue : Double Read FminValue;
- Property maxValue : Double Read FmaxValue;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioScheduledSourceNode
- --------------------------------------------------------------------}
-
- TJSAudioScheduledSourceNode = class external name 'AudioScheduledSourceNode' (TJSAudioNode)
- Private
- Public
- onended : TJSEVentHandler;
- Procedure start(when : Double); overload;
- Procedure start; overload;
- Procedure stop(when : Double); overload;
- Procedure stop; overload;
- end;
-
- { --------------------------------------------------------------------
- TJSAnalyserNode
- --------------------------------------------------------------------}
-
- TJSAnalyserNode = class external name 'AnalyserNode' (TJSAudioNode)
- Private
- FfrequencyBinCount : NativeInt; external name 'frequencyBinCount';
- Public
- fftSize : NativeInt;
- minDecibels : Double;
- maxDecibels : Double;
- smoothingTimeConstant : Double;
- Procedure getFloatFrequencyData(array_ : TJSFloat32Array);
- Procedure getByteFrequencyData(array_ : TJSUint8Array);
- Procedure getFloatTimeDomainData(array_ : TJSFloat32Array);
- Procedure getByteTimeDomainData(array_ : TJSUint8Array);
- Property frequencyBinCount : NativeInt Read FfrequencyBinCount;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioBufferSourceNode
- --------------------------------------------------------------------}
-
- TJSAudioBufferSourceNode = class external name 'AudioBufferSourceNode' (TJSAudioScheduledSourceNode)
- Private
- FplaybackRate : TJSAudioParam; external name 'playbackRate';
- Fdetune : TJSAudioParam; external name 'detune';
- Public
- buffer : TJSAudioBuffer;
- loop : boolean;
- loopStart : Double;
- loopEnd : Double;
- Procedure start(when : Double; offset : Double; duration : Double); overload;
- Procedure start; overload;
- Procedure start(when : Double); overload;
- Procedure start(when : Double; offset : Double); overload;
- Property playbackRate : TJSAudioParam Read FplaybackRate;
- Property detune : TJSAudioParam Read Fdetune;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioDestinationNode
- --------------------------------------------------------------------}
-
- TJSAudioDestinationNode = class external name 'AudioDestinationNode' (TJSAudioNode)
- Private
- FmaxChannelCount : NativeInt; external name 'maxChannelCount';
- Public
- Property maxChannelCount : NativeInt Read FmaxChannelCount;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioListener
- --------------------------------------------------------------------}
-
- TJSAudioListener = class external name 'AudioListener'
- Private
- FpositionX : TJSAudioParam; external name 'positionX';
- FpositionY : TJSAudioParam; external name 'positionY';
- FpositionZ : TJSAudioParam; external name 'positionZ';
- FforwardX : TJSAudioParam; external name 'forwardX';
- FforwardY : TJSAudioParam; external name 'forwardY';
- FforwardZ : TJSAudioParam; external name 'forwardZ';
- FupX : TJSAudioParam; external name 'upX';
- FupY : TJSAudioParam; external name 'upY';
- FupZ : TJSAudioParam; external name 'upZ';
- Public
- Procedure setPosition(x : Double; y : Double; z : Double);
- Procedure setOrientation(x : Double; y : Double; z : Double; xUp : Double; yUp : Double; zUp : Double);
- Property positionX : TJSAudioParam Read FpositionX;
- Property positionY : TJSAudioParam Read FpositionY;
- Property positionZ : TJSAudioParam Read FpositionZ;
- Property forwardX : TJSAudioParam Read FforwardX;
- Property forwardY : TJSAudioParam Read FforwardY;
- Property forwardZ : TJSAudioParam Read FforwardZ;
- Property upX : TJSAudioParam Read FupX;
- Property upY : TJSAudioParam Read FupY;
- Property upZ : TJSAudioParam Read FupZ;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioProcessingEvent
- --------------------------------------------------------------------}
-
- TJSAudioProcessingEvent = class external name 'AudioProcessingEvent' (TJSEvent)
- Private
- FplaybackTime : Double; external name 'playbackTime';
- FinputBuffer : TJSAudioBuffer; external name 'inputBuffer';
- FoutputBuffer : TJSAudioBuffer; external name 'outputBuffer';
- Public
- Property playbackTime : Double Read FplaybackTime;
- Property inputBuffer : TJSAudioBuffer Read FinputBuffer;
- Property outputBuffer : TJSAudioBuffer Read FoutputBuffer;
- end;
-
- { --------------------------------------------------------------------
- TJSBiquadFilterNode
- --------------------------------------------------------------------}
-
- TJSBiquadFilterNode = class external name 'BiquadFilterNode' (TJSAudioNode)
- Private
- Ffrequency : TJSAudioParam; external name 'frequency';
- Fdetune : TJSAudioParam; external name 'detune';
- FQ : TJSAudioParam; external name 'Q';
- Fgain : TJSAudioParam; external name 'gain';
- Public
- type_ : BiquadFilterType;external name 'type';
- Procedure getFrequencyResponse(frequencyHz : TJSFloat32Array; magResponse : TJSFloat32Array; phaseResponse : TJSFloat32Array);
- Property frequency : TJSAudioParam Read Ffrequency;
- Property detune : TJSAudioParam Read Fdetune;
- Property Q : TJSAudioParam Read FQ;
- Property gain : TJSAudioParam Read Fgain;
- end;
-
- { --------------------------------------------------------------------
- TJSChannelMergerNode
- --------------------------------------------------------------------}
-
- TJSChannelMergerNode = class external name 'ChannelMergerNode' (TJSAudioNode)
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSChannelSplitterNode
- --------------------------------------------------------------------}
-
- TJSChannelSplitterNode = class external name 'ChannelSplitterNode' (TJSAudioNode)
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSConstantSourceNode
- --------------------------------------------------------------------}
-
- TJSConstantSourceNode = class external name 'ConstantSourceNode' (TJSAudioScheduledSourceNode)
- Private
- Foffset : TJSAudioParam; external name 'offset';
- Public
- Property offset : TJSAudioParam Read Foffset;
- end;
-
- { --------------------------------------------------------------------
- TJSConvolverNode
- --------------------------------------------------------------------}
-
- TJSConvolverNode = class external name 'ConvolverNode' (TJSAudioNode)
- Private
- Public
- buffer : TJSAudioBuffer;
- normalize : boolean;
- end;
-
- { --------------------------------------------------------------------
- TJSDelayNode
- --------------------------------------------------------------------}
-
- TJSDelayNode = class external name 'DelayNode' (TJSAudioNode)
- Private
- FdelayTime : TJSAudioParam; external name 'delayTime';
- Public
- Property delayTime : TJSAudioParam Read FdelayTime;
- end;
-
- { --------------------------------------------------------------------
- TJSDynamicsCompressorNode
- --------------------------------------------------------------------}
-
- TJSDynamicsCompressorNode = class external name 'DynamicsCompressorNode' (TJSAudioNode)
- Private
- Fthreshold : TJSAudioParam; external name 'threshold';
- Fknee : TJSAudioParam; external name 'knee';
- Fratio : TJSAudioParam; external name 'ratio';
- Freduction : Double; external name 'reduction';
- Fattack : TJSAudioParam; external name 'attack';
- Frelease : TJSAudioParam; external name 'release';
- Public
- Property threshold : TJSAudioParam Read Fthreshold;
- Property knee : TJSAudioParam Read Fknee;
- Property ratio : TJSAudioParam Read Fratio;
- Property reduction : Double Read Freduction;
- Property attack : TJSAudioParam Read Fattack;
- Property release : TJSAudioParam Read Frelease;
- end;
-
- { --------------------------------------------------------------------
- TJSGainNode
- --------------------------------------------------------------------}
-
- TJSGainNode = class external name 'GainNode' (TJSAudioNode)
- Private
- Fgain : TJSAudioParam; external name 'gain';
- Public
- Property gain : TJSAudioParam Read Fgain;
- end;
-
- { --------------------------------------------------------------------
- TJSIIRFilterNode
- --------------------------------------------------------------------}
-
- TJSIIRFilterNode = class external name 'IIRFilterNode' (TJSAudioNode)
- Private
- Public
- Procedure getFrequencyResponse(frequencyHz : TJSFloat32Array; magResponse : TJSFloat32Array; phaseResponse : TJSFloat32Array);
- end;
-
- { --------------------------------------------------------------------
- TJSMediaElementAudioSourceNode
- --------------------------------------------------------------------}
-
- TJSMediaElementAudioSourceNode = class external name 'MediaElementAudioSourceNode' (TJSAudioNode)
- Private
- FmediaElement : TJSElement; external name 'mediaElement';
- Public
- Property mediaElement : TJSElement Read FmediaElement;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaStreamAudioDestinationNode
- --------------------------------------------------------------------}
-
- TJSMediaStreamAudioDestinationNode = class external name 'MediaStreamAudioDestinationNode' (TJSAudioNode)
- Private
- Fstream : JSValue; external name 'stream';
- Public
- Property stream : JSValue Read Fstream;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaStreamAudioSourceNode
- --------------------------------------------------------------------}
-
- TJSMediaStreamAudioSourceNode = class external name 'MediaStreamAudioSourceNode' (TJSAudioNode)
- Private
- FmediaStream : JSValue; external name 'mediaStream';
- Public
- Property mediaStream : JSValue Read FmediaStream;
- end;
-
- { --------------------------------------------------------------------
- TJSMediaStreamTrackAudioSourceNode
- --------------------------------------------------------------------}
-
- TJSMediaStreamTrackAudioSourceNode = class external name 'MediaStreamTrackAudioSourceNode' (TJSAudioNode)
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSOscillatorNode
- --------------------------------------------------------------------}
-
- TJSOscillatorNode = class external name 'OscillatorNode' (TJSAudioScheduledSourceNode)
- Private
- Ffrequency : TJSAudioParam; external name 'frequency';
- Fdetune : TJSAudioParam; external name 'detune';
- Public
- type_ : OscillatorType;external name 'type';
- Procedure setPeriodicWave(periodicWave : TJSPeriodicWave);
- Property frequency : TJSAudioParam Read Ffrequency;
- Property detune : TJSAudioParam Read Fdetune;
- end;
-
- { --------------------------------------------------------------------
- TJSPannerNode
- --------------------------------------------------------------------}
-
- TJSPannerNode = class external name 'PannerNode' (TJSAudioNode)
- Private
- FpositionX : TJSAudioParam; external name 'positionX';
- FpositionY : TJSAudioParam; external name 'positionY';
- FpositionZ : TJSAudioParam; external name 'positionZ';
- ForientationX : TJSAudioParam; external name 'orientationX';
- ForientationY : TJSAudioParam; external name 'orientationY';
- ForientationZ : TJSAudioParam; external name 'orientationZ';
- Public
- panningModel : PanningModelType;
- distanceModel : DistanceModelType;
- refDistance : Double;
- maxDistance : Double;
- rolloffFactor : Double;
- coneInnerAngle : Double;
- coneOuterAngle : Double;
- coneOuterGain : Double;
- Procedure setPosition(x : Double; y : Double; z : Double);
- Procedure setOrientation(x : Double; y : Double; z : Double);
- Property positionX : TJSAudioParam Read FpositionX;
- Property positionY : TJSAudioParam Read FpositionY;
- Property positionZ : TJSAudioParam Read FpositionZ;
- Property orientationX : TJSAudioParam Read ForientationX;
- Property orientationY : TJSAudioParam Read ForientationY;
- Property orientationZ : TJSAudioParam Read ForientationZ;
- end;
-
- { --------------------------------------------------------------------
- TJSPeriodicWave
- --------------------------------------------------------------------}
-
- TJSPeriodicWave = class external name 'PeriodicWave'
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSScriptProcessorNode
- --------------------------------------------------------------------}
-
- TJSScriptProcessorNode = class external name 'ScriptProcessorNode' (TJSAudioNode)
- Private
- FbufferSize : Integer; external name 'bufferSize';
- Public
- onaudioprocess : TJSEVentHandler;
- Property bufferSize : Integer Read FbufferSize;
- end;
-
- { --------------------------------------------------------------------
- TJSStereoPannerNode
- --------------------------------------------------------------------}
-
- TJSStereoPannerNode = class external name 'StereoPannerNode' (TJSAudioNode)
- Private
- Fpan : TJSAudioParam; external name 'pan';
- Public
- Property pan : TJSAudioParam Read Fpan;
- end;
-
- { --------------------------------------------------------------------
- TJSWaveShaperNode
- --------------------------------------------------------------------}
-
- TJSWaveShaperNode = class external name 'WaveShaperNode' (TJSAudioNode)
- Private
- Public
- curve : TJSFloat32Array;
- oversample : OverSampleType;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioWorklet
- --------------------------------------------------------------------}
-
- TJSAudioWorklet = class external name 'AudioWorklet' (TJSOBject)
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSAudioWorkletGlobalScope
- --------------------------------------------------------------------}
-
- TJSAudioWorkletGlobalScope = class external name 'AudioWorkletGlobalScope' (TJSObject)
- Private
- FcurrentFrame : NativeInt; external name 'currentFrame';
- FcurrentTime : Double; external name 'currentTime';
- FsampleRate : Double; external name 'sampleRate';
- Public
- Procedure registerProcessor(name : String; processorCtor : TProcedure);
- Property currentFrame : NativeInt Read FcurrentFrame;
- Property currentTime : Double Read FcurrentTime;
- Property sampleRate : Double Read FsampleRate;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioParamMap
- --------------------------------------------------------------------}
-
- TJSAudioParamMap = class external name 'AudioParamMap'
- Private
- Public
- end;
-
- { --------------------------------------------------------------------
- TJSAudioWorkletNode
- --------------------------------------------------------------------}
-
- TJSAudioWorkletNode = class external name 'AudioWorkletNode' (TJSAudioNode)
- Private
- Fparameters : TJSAudioParamMap; external name 'parameters';
- Fport : TJSMessagePort; external name 'port';
- Public
- onprocessorerror : TJSEVentHandler;
- Property parameters : TJSAudioParamMap Read Fparameters;
- Property port : TJSMessagePort Read Fport;
- end;
-
- { --------------------------------------------------------------------
- TJSAudioWorkletProcessor
- --------------------------------------------------------------------}
-
- TJSAudioWorkletProcessor = class external name 'AudioWorkletProcessor'
- Private
- Fport : TJSMessagePort; external name 'port';
- Public
- Property port : TJSMessagePort Read Fport;
- end;
- implementation
- end.
|