From 6944ca9ad602bf3b02c1ceec3b7c809773ffabab Mon Sep 17 00:00:00 2001 From: Wolftein Date: Thu, 23 Jun 2016 17:38:06 -0300 Subject: [PATCH 1/3] Added missing WheelEvent fixes konsoletyper/teavm#192. Added missing JSO interface for DataView. Added missing JSO interfaces for WebAudio. --- .../org/teavm/jso/dom/events/WheelEvent.java | 35 ++++ .../jso/dom/events/WheelEventTarget.java | 29 ++++ .../org/teavm/jso/typedarrays/DataView.java | 114 ++++++++++++ .../org/teavm/jso/webaudio/AnalyserNode.java | 66 +++++++ .../org/teavm/jso/webaudio/AudioBuffer.java | 53 ++++++ .../jso/webaudio/AudioBufferSourceNode.java | 80 +++++++++ .../org/teavm/jso/webaudio/AudioContext.java | 164 ++++++++++++++++++ .../jso/webaudio/AudioDestinationNode.java | 27 +++ .../org/teavm/jso/webaudio/AudioListener.java | 47 +++++ .../org/teavm/jso/webaudio/AudioNode.java | 86 +++++++++ .../org/teavm/jso/webaudio/AudioParam.java | 53 ++++++ .../teavm/jso/webaudio/AudioProcessEvent.java | 41 +++++ .../jso/webaudio/AudioProcessingEvent.java | 33 ++++ .../org/teavm/jso/webaudio/AudioWorker.java | 59 +++++++ .../jso/webaudio/AudioWorkerGlobalScope.java | 50 ++++++ .../teavm/jso/webaudio/AudioWorkerNode.java | 38 ++++ .../AudioWorkerNodeCreationEvent.java | 35 ++++ .../webaudio/AudioWorkerNodeProcessor.java | 38 ++++ .../webaudio/AudioWorkerParamDescriptor.java | 30 ++++ .../teavm/jso/webaudio/BiquadFilterNode.java | 55 ++++++ .../teavm/jso/webaudio/ChannelMergerNode.java | 22 +++ .../jso/webaudio/ChannelSplitterNode.java | 22 +++ .../org/teavm/jso/webaudio/ConvolverNode.java | 36 ++++ .../jso/webaudio/DecodeErrorCallback.java | 29 ++++ .../jso/webaudio/DecodeSuccessCallback.java | 29 ++++ .../org/teavm/jso/webaudio/DelayNode.java | 26 +++ .../jso/webaudio/DynamicsCompressorNode.java | 41 +++++ .../java/org/teavm/jso/webaudio/GainNode.java | 27 +++ .../org/teavm/jso/webaudio/IIRFilterNode.java | 28 +++ .../webaudio/MediaElementAudioSourceNode.java | 22 +++ .../org/teavm/jso/webaudio/MediaStream.java | 25 +++ .../MediaStreamAudioDestinationNode.java | 27 +++ .../webaudio/MediaStreamAudioSourceNode.java | 23 +++ .../webaudio/OfflineAudioCompletionEvent.java | 27 +++ .../jso/webaudio/OfflineAudioContext.java | 40 +++++ .../teavm/jso/webaudio/OscillatorNode.java | 64 +++++++ .../org/teavm/jso/webaudio/PannerNode.java | 89 ++++++++++ .../org/teavm/jso/webaudio/PeriodicWave.java | 24 +++ .../jso/webaudio/PeriodicWaveConstraints.java | 30 ++++ .../jso/webaudio/ScriptProcessorNode.java | 34 ++++ .../teavm/jso/webaudio/StereoPannerNode.java | 27 +++ .../teavm/jso/webaudio/WaveShaperNode.java | 41 +++++ 42 files changed, 1866 insertions(+) create mode 100644 jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java new file mode 100644 index 000000000..e45e2810d --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java @@ -0,0 +1,35 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.dom.events; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface WheelEvent extends MouseEvent { + @JSProperty + double getDeltaX(); + + @JSProperty + double getDeltaY(); + + @JSProperty + double getDeltaZ(); + + @JSProperty + long getDeltaMode(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java new file mode 100644 index 000000000..520ed69e4 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java @@ -0,0 +1,29 @@ +/* + * Copyright 2014 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.dom.events; + +/** + * + */ +public interface WheelEventTarget extends EventTarget { + default void listenWheel(EventListener listener) { + addEventListener("wheel", listener); + } + + default void neglectWheel(EventListener listener) { + removeEventListener("wheel", listener); + } +} diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java new file mode 100644 index 000000000..a14ae51b1 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java @@ -0,0 +1,114 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.typedarrays; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSMethod; + +/** + * + */ +public abstract class DataView extends ArrayBufferView { + @JSMethod + public abstract byte getInt8(int byteOffset); + + @JSMethod + public abstract short getUInt8(int byteOffset); + + @JSMethod + public abstract short getInt16(int byteOffset); + + @JSMethod + public abstract short getInt16(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract int getUInt16(int byteOffset); + + @JSMethod + public abstract int getUInt16(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract int getInt32(int byteOffset); + + @JSMethod + public abstract int getInt32(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract long getUInt32(int byteOffset); + + @JSMethod + public abstract long getUInt32(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract float getFloat32(int byteOffset); + + @JSMethod + public abstract float getFloat32(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract double getFloat64(int byteOffset); + + @JSMethod + public abstract double getFloat64(int byteOffset, boolean littleEndian); + + @JSMethod + public abstract void setInt8(int byteOffset, int value); + + @JSMethod + public abstract void setUInt8(int byteOffset, int value); + + @JSMethod + public abstract void setInt16(int byteOffset, int value); + + @JSMethod + public abstract void setInt16(int byteOffset, int value, boolean littleEndian); + + @JSMethod + public abstract void setUInt16(int byteOffset, int value); + + @JSMethod + public abstract void setUInt16(int byteOffset, int value, boolean littleEndian); + + @JSMethod + public abstract void setInt32(int byteOffset, int value); + + @JSMethod + public abstract void setInt32(int byteOffset, int value, boolean littleEndian); + + @JSMethod + public abstract void setUInt32(int byteOffset, long value); + + @JSMethod + public abstract void setUInt32(int byteOffset, long value, boolean littleEndian); + + @JSMethod + public abstract void setFloat32(int byteOffset, float value); + + @JSMethod + public abstract void setFloat32(int byteOffset, float value, boolean littleEndian); + + @JSMethod + public abstract void setFloat64(int byteOffset, double value); + + @JSMethod + public abstract void setFloat64(int byteOffset, double value, boolean littleEndian); + + @JSBody(params = "buffer", script = "return new DataView(buffer);") + public static native DataView create(ArrayBuffer buffer); + + @JSBody(params = {"buffer", "offset", "length"}, script = "return new DataView(buffer, offset, length);") + public static native DataView create(ArrayBuffer buffer, int offset, int length); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java new file mode 100644 index 000000000..1a53fd42c --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java @@ -0,0 +1,66 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.typedarrays.Uint8Array; + +/** + * + */ +public interface AnalyserNode extends AudioNode { + @JSProperty + void setFftSize(int size); + + @JSProperty + int getFftSize(); + + @JSProperty + int getFrequencyBinCount(); + + @JSProperty + void setMinDecibels(float value); + + @JSProperty + float getMinDecibels(); + + @JSProperty + void setMaxDecibels(float value); + + @JSProperty + float getMaxDecibels(); + + @JSProperty + void setSmoothingTimeConstant(float value); + + @JSProperty + float getSmoothingTimeConstant(); + + @JSMethod + void getFloatFrequencyData(Float32Array array); + + @JSMethod + void getByteFrequencyData(Uint8Array array); + + @JSMethod + void getFloatTimeDomainData(Float32Array array); + + @JSMethod + void getByteTimeDomainData(Uint8Array array); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java new file mode 100644 index 000000000..d2baf4350 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface AudioBuffer extends JSObject { + @JSProperty + float getSampleRate(); + + @JSProperty + int getLength(); + + @JSProperty + double getDuration(); + + @JSProperty + int getNumberOfChannels(); + + @JSMethod + Float32Array getChannelData(int channel); + + @JSMethod + void copyFromChannel(Float32Array destination, int channelNumber); + + @JSMethod + void copyFromChannel(Float32Array destination, int channelNumber, int startInChannel); + + @JSMethod + void copyToChannel(Float32Array source, int channelNumber); + + @JSMethod + void copyToChannel(Float32Array source, int channelNumber, int startInChannel); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java new file mode 100644 index 000000000..374c9f313 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java @@ -0,0 +1,80 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface AudioBufferSourceNode extends AudioNode { + @JSProperty + AudioBuffer getBuffer(); + + @JSProperty + void setBuffer(AudioBuffer buffer); + + @JSProperty + AudioParam getPlaybackRate(); + + @JSProperty + AudioParam getDetune(); + + @JSProperty + boolean getLoop(); + + @JSProperty + void setLoop(boolean loop); + + @JSProperty + double getLoopStart(); + + @JSProperty + void setLoopStart(double start); + + @JSProperty + double getLoopEnd(); + + @JSProperty + void setLoopEnd(double end); + + @JSProperty("onended") + void setOnEnded(EventListener ent); + + @JSProperty("onended") + EventListener getOnEnded(); + + @JSMethod + void start(double when, double offset, double duration); + + @JSMethod + void start(double when, double offset); + + @JSMethod + void start(double when); + + @JSMethod + void start(); + + @JSMethod + void stop(double when); + + @JSMethod + void stop(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java new file mode 100644 index 000000000..b0f921214 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java @@ -0,0 +1,164 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; +import org.teavm.jso.dom.html.HTMLMediaElement; +import org.teavm.jso.typedarrays.ArrayBuffer; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public abstract class AudioContext implements JSObject { + String STATE_SUSPENDED = "suspended"; + String STATE_RUNNING = "running"; + String STATE_CLOSE = "close"; + + @JSProperty + public abstract AudioDestinationNode getDestination(); + + @JSProperty + public abstract float getSampleRate(); + + @JSProperty + public abstract double getCurrentTime(); + + @JSProperty + public abstract AudioListener getListener(); + + @JSProperty + public abstract String getState(); + + @JSProperty("onstatechange") + public abstract void setOnStateChange(EventListener listener); + + @JSProperty("onstatechange") + public abstract EventListener getOnStateChange(); + + @JSMethod + public abstract void suspend(); + + @JSMethod + public abstract void resume(); + + @JSMethod + public abstract void close(); + + @JSMethod + public abstract AudioBuffer createBuffer(int numberOfChannels, int length, float sampleRate); + + @JSMethod + public abstract AudioBuffer decodeAudioData(ArrayBuffer audioData, DecodeSuccessCallback successCallback, + DecodeErrorCallback errorCallback); + + @JSMethod + public abstract AudioBuffer decodeAudioData(ArrayBuffer audioData, DecodeSuccessCallback successCallback); + + @JSMethod + public abstract AudioBuffer decodeAudioData(ArrayBuffer audioData); + + @JSMethod + public abstract AudioBufferSourceNode createBufferSource(); + + @JSMethod + public abstract MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); + + @JSMethod + public abstract MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); + + @JSMethod + public abstract MediaStreamAudioDestinationNode createMediaStreamDestination(); + + @JSMethod + public abstract AudioWorker createAudioWorker(); + + @JSMethod + public abstract ScriptProcessorNode createScriptProcessor(int bufferSize, int numberOfInputChannels, + int numberOfOutputChannels); + + @JSMethod + public abstract ScriptProcessorNode createScriptProcessor(int bufferSize, int numberOfInputChannels); + + @JSMethod + public abstract ScriptProcessorNode createScriptProcessor(int bufferSize); + + @JSMethod + public abstract ScriptProcessorNode createScriptProcessor(); + + @JSMethod + public abstract AnalyserNode createAnalyser(); + + @JSMethod + public abstract GainNode createGain(); + + @JSMethod + public abstract DelayNode createDelay(double maxDelayTime); + + @JSMethod + public abstract DelayNode createDelay(); + + @JSMethod + public abstract BiquadFilterNode createBiquadFilter(); + + @JSMethod + public abstract IIRFilterNode createIIRFilter(Float32Array feedforward, Float32Array feedback); + + @JSMethod + public abstract WaveShaperNode createWaveShaper(); + + @JSMethod + public abstract PannerNode createPanner(); + + @JSMethod + public abstract StereoPannerNode createStereoPanner(); + + @JSMethod + public abstract ConvolverNode createConvolver(); + + @JSMethod + public abstract ChannelSplitterNode createChannelSplitter(int numberOfOutputs); + + @JSMethod + public abstract ChannelSplitterNode createChannelSplitter(); + + @JSMethod + public abstract ChannelMergerNode createChannelMerger(int numberOfInputs); + + @JSMethod + public abstract ChannelMergerNode createChannelMerger(); + + @JSMethod + public abstract DynamicsCompressorNode createDynamicsCompressor(); + + @JSMethod + public abstract OscillatorNode createOscillator(); + + @JSMethod + public abstract PeriodicWave createPeriodicWave(Float32Array real, Float32Array image, + PeriodicWaveConstraints constraints); + + @JSMethod + public abstract PeriodicWave createPeriodicWave(Float32Array real, Float32Array image); + + @JSBody(params = {}, + script = "var Context = window.AudioContext || window.webkitAudioContext; return new Context();") + public static native AudioContext create(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java new file mode 100644 index 000000000..3136726ff --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface AudioDestinationNode extends AudioNode { + @JSProperty + int getMaxChannelCount(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java new file mode 100644 index 000000000..a3045218b --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java @@ -0,0 +1,47 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface AudioListener extends JSObject { + @JSProperty + void setDopplerFactor(float value); + + @JSProperty + float getDopplerFactor(); + + @JSProperty + void setSpeedOfSound(float value); + + @JSProperty + float getSpeedOfSound(); + + @JSMethod + void setPosition(float x, float y, float z); + + @JSMethod + void setOrientation(float x, float y, float z, float xUp, float yUp, float zUp); + + @JSMethod + void setVelocity(float x, float y, float z); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java new file mode 100644 index 000000000..806efee09 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java @@ -0,0 +1,86 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface AudioNode extends JSObject { + String CHANNEL_COUNT_MODE_MAX = "max"; + String CHANNEL_COUNT_MODE_CLAMPED_MAX = "clamped-max"; + String CHANNEL_COUNT_MODE_EXPLICIT = "explicit"; + + String CHANNEL_INTERPRETATION_SPEAKERS = "speakers"; + String CHANNEL_INTERPRETATION_DISCRETE = "discrete"; + + @JSMethod + void connect(AudioNode destination, int output, int input); + + @JSMethod + void connect(AudioNode destination, int output); + + @JSMethod + void connect(AudioNode destination); + + @JSMethod + void connect(AudioParam destination, int output); + + @JSMethod + void connect(AudioParam destination); + + @JSMethod + void disconnect(); + + @JSMethod + void disconnect(int output); + + @JSMethod + void disconnect(AudioNode destination); + + @JSMethod + void disconnect(AudioNode destination, int output); + + @JSMethod + void disconnect(AudioNode destination, int output, int input); + + @JSMethod + void disconnect(AudioParam destination); + + @JSMethod + void disconnect(AudioParam destination, int output); + + @JSProperty + AudioContext getContext(); + + @JSProperty + int getNumberOfInputs(); + + @JSProperty + int getNumberOfOutputs(); + + @JSProperty + int getChannelCount(); + + @JSProperty + String getChannelCountMode(); + + @JSProperty + String getChannelInterpretation(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java new file mode 100644 index 000000000..7cb6f2e1e --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java @@ -0,0 +1,53 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface AudioParam extends JSObject { + @JSProperty + float getValue(); + + @JSProperty + void setValue(float value); + + @JSProperty + float getDefaultValue(); + + @JSMethod + void setValueAtTime(float value, double startTime); + + @JSMethod + void linearRampToValueAtTime(float value, double endTime); + + @JSMethod + void exponentialRampToValueAtTime(float value, double endTime); + + @JSMethod + void setTargetAtTime(float target, double startTime, float timeConstant); + + @JSMethod + void setValueCurveAtTime(Float32Array values, double startTime, double duration); + + @JSMethod + void cancelScheduledValues(double startTime); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java new file mode 100644 index 000000000..776bd7c86 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java @@ -0,0 +1,41 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.Event; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface AudioProcessEvent extends Event { + @JSProperty + double getPlaybackTime(); + + @JSProperty + AudioWorkerNodeProcessor getNode(); + + @JSProperty + Float32Array[][] getInputs(); + + @JSProperty + Float32Array[][] getOutputs(); + + @JSProperty + JSObject getParameters(); +} \ No newline at end of file diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java new file mode 100644 index 000000000..0b6035caf --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java @@ -0,0 +1,33 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.Event; + +/** + * + */ +public interface AudioProcessingEvent extends Event { + @JSProperty + double getPlaybackTime(); + + @JSProperty + AudioBuffer getInputBuffer(); + + @JSProperty + AudioBuffer getOutputBuffer(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java new file mode 100644 index 000000000..87445de1b --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java @@ -0,0 +1,59 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface AudioWorker extends JSObject { + @JSProperty + AudioWorkerParamDescriptor[] getParameters(); + + @JSProperty(value = "onmessage") + void setOnMessage(EventListener event); + + @JSProperty(value = "onmessage") + EventListener getOnMessage(); + + @JSProperty(value = "onloaded") + void setOnLoaded(EventListener event); + + @JSProperty(value = "onloaded") + EventListener getOnLoaded(); + + @JSMethod + void terminate(); + + @JSMethod + void postMessage(Object message, Object... transfer); + + @JSMethod + void postMessage(Object message); + + @JSMethod + AudioWorkerNode createNode(int numberOfInputs, int numberOfOutputs); + + @JSMethod + AudioParam addParameter(String name, float defaultValue); + + @JSMethod + void removeParameter(String name); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java new file mode 100644 index 000000000..878365bca --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java @@ -0,0 +1,50 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface AudioWorkerGlobalScope extends JSObject { + @JSProperty + float getSampleRate(); + + @JSProperty("onaudioprocess") + void setOnAudioProcess(EventListener event); + + @JSProperty("onaudioprocess") + EventListener getOnAudioProcess(); + + @JSProperty("onnodecreate") + void setOnNodeCreate(EventListener event); + + @JSProperty("onnodecreate") + EventListener getOnNodeCreate(); + + @JSProperty + AudioWorkerParamDescriptor[] getParameters(); + + @JSMethod + AudioParam addParameter(String name, float defaultValue); + + @JSMethod + void removeParameter(String name); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java new file mode 100644 index 000000000..19c75afb5 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java @@ -0,0 +1,38 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface AudioWorkerNode extends AudioNode { + @JSProperty("onmessage") + void setOnMessage(EventListener event); + + @JSProperty("onmessage") + EventListener getOnMessage(); + + @JSMethod + void postMessage(Object message, Object... transfer); + + @JSMethod + void postMessage(Object message); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java new file mode 100644 index 000000000..6368677d8 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java @@ -0,0 +1,35 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.core.JSArray; +import org.teavm.jso.dom.events.Event; + +/** + * + */ +public interface AudioWorkerNodeCreationEvent extends Event { + @JSProperty + AudioWorkerNodeProcessor getNode(); + + @JSProperty + JSArray getInputs(); + + @JSProperty + JSArray getOutputs(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java new file mode 100644 index 000000000..7d09115db --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java @@ -0,0 +1,38 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; +import org.teavm.jso.dom.events.EventTarget; + +/** + * + */ +public interface AudioWorkerNodeProcessor extends EventTarget { + @JSProperty("onmessage") + void setOnMessage(EventListener event); + + @JSProperty("onmessage") + EventListener getOnMessage(); + + @JSMethod + void postMessage(Object message, Object... transfer); + + @JSMethod + void postMessage(Object message); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java new file mode 100644 index 000000000..ee8833f20 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java @@ -0,0 +1,30 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface AudioWorkerParamDescriptor extends JSObject { + @JSProperty + String getName(); + + @JSProperty + float getDefaultValue(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java new file mode 100644 index 000000000..7d89e1f06 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java @@ -0,0 +1,55 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface BiquadFilterNode extends AudioNode { + String TYPE_LOW_PASS = "lowpass"; + String TYPE_LOW_SHELF = "lowshelf"; + String TYPE_HIGH_SHELF = "highshelf"; + String TYPE_HIGH_PASS = "highpass"; + String TYPE_BAND_PASS = "bandpass"; + String TYPE_PEAKING = "peaking"; + String TYPE_NOTCH = "notch"; + String TYPE_ALL_PASS = "allpass"; + + @JSProperty + void setType(String type); + + @JSProperty + String getType(); + + @JSProperty + AudioParam getFrequency(); + + @JSProperty + AudioParam getDetune(); + + @JSProperty("Q") + AudioParam getQ(); + + @JSProperty + AudioParam getGain(); + + @JSMethod + void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java new file mode 100644 index 000000000..f1d556df6 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +/** + * + */ +public interface ChannelMergerNode extends AudioNode { +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java new file mode 100644 index 000000000..0f768995c --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +/** + * + */ +public interface ChannelSplitterNode extends AudioNode { +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java new file mode 100644 index 000000000..bce7c0604 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java @@ -0,0 +1,36 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface ConvolverNode extends AudioNode { + @JSProperty + void setBuffer(AudioBuffer buffer); + + @JSProperty + AudioBuffer getBuffer(); + + @JSProperty + void setNormalize(boolean normalised); + + @JSProperty + boolean getNormalize(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java new file mode 100644 index 000000000..4a9e30b8d --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java @@ -0,0 +1,29 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; + +/** + * + */ +@JSFunctor +public interface DecodeErrorCallback extends JSObject { + @JSMethod + void onError(JSObject error); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java new file mode 100644 index 000000000..78ac8182c --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java @@ -0,0 +1,29 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; + +/** + * + */ +@JSFunctor +public interface DecodeSuccessCallback extends JSObject { + @JSMethod + void onSuccess(AudioBuffer decodedData); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java new file mode 100644 index 000000000..3d3fcb8ab --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java @@ -0,0 +1,26 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface DelayNode extends AudioNode { + @JSProperty + AudioParam getDelayTime(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java new file mode 100644 index 000000000..c541f3e70 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java @@ -0,0 +1,41 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface DynamicsCompressorNode extends AudioNode { + @JSProperty + AudioParam getThreshold(); + + @JSProperty + AudioParam getKnee(); + + @JSProperty + AudioParam getRatio(); + + @JSProperty + float getReduction(); + + @JSProperty + AudioParam getAttack(); + + @JSProperty + AudioParam getRelease(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java new file mode 100644 index 000000000..7c9806e3f --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface GainNode extends AudioNode { + @JSProperty + AudioParam getGain(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java new file mode 100644 index 000000000..ccc97a376 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java @@ -0,0 +1,28 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface IIRFilterNode extends AudioNode { + @JSMethod + void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java new file mode 100644 index 000000000..8adfcc5c5 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +/** + * + */ +public interface MediaElementAudioSourceNode extends AudioNode { +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java new file mode 100644 index 000000000..b662e3639 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java @@ -0,0 +1,25 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSObject; + +/** + * + */ +public interface MediaStream extends JSObject { +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java new file mode 100644 index 000000000..0a2392cd0 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface MediaStreamAudioDestinationNode extends AudioNode { + @JSProperty + MediaStream getStream(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java new file mode 100644 index 000000000..3f128c038 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java @@ -0,0 +1,23 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +/** + * + */ +public interface MediaStreamAudioSourceNode extends AudioNode { +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java new file mode 100644 index 000000000..d44cef8b5 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.Event; + +/** + * + */ +public interface OfflineAudioCompletionEvent extends Event { + @JSProperty + AudioBuffer getRenderedBuffer(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java new file mode 100644 index 000000000..1ba50820a --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java @@ -0,0 +1,40 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public abstract class OfflineAudioContext extends AudioContext { + @JSProperty("oncomplete") + public abstract void setOnComplete(EventListener event); + + @JSProperty("oncomplete") + public abstract EventListener getOnComplete(); + + @JSMethod + public abstract AudioBuffer startRendering(); + + @JSMethod + public abstract void resume(); + + @JSMethod + public abstract void suspend(double suspendTime); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java new file mode 100644 index 000000000..ea888d7fb --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java @@ -0,0 +1,64 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface OscillatorNode extends AudioNode { + String TYPE_SINE = "sine"; + String TYPE_SQUARE = "square"; + String TYPE_SAWTOOTH = "sawtooth"; + String TYPE_TRIANGLE = "triangle"; + String TYPE_CUSTOM = "custom"; + + @JSProperty + void setType(String type); + + @JSProperty + String getType(); + + @JSProperty + AudioParam getFrequency(); + + @JSProperty + AudioParam getDetune(); + + @JSProperty("onended") + void setOnEnded(EventListener listener); + + @JSProperty("onended") + EventListener getOnEnded(); + + @JSMethod + void start(double when); + + @JSMethod + void start(); + + @JSMethod + void stop(double when); + + @JSMethod + void stop(); + + @JSMethod + void setPeriodicWave(PeriodicWave periodicWave); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java new file mode 100644 index 000000000..f7972134b --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java @@ -0,0 +1,89 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSMethod; +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface PannerNode extends AudioNode { + String MODEL_EQUALPOWER = "equalpower"; + String MODEL_HRTF = "HRTF"; + + String DISTANCE_MODEL_LINEAR = "linear"; + String DISTANCE_MODEL_INVERSE = "inverse"; + String DISTANCE_MODEL_EXPONENTIAL = "exponential"; + + @JSProperty + void setPanningModel(String value); + + @JSProperty + String getPanningModel(); + + @JSProperty + void setDistanceModel(String value); + + @JSProperty + String getDistanceModel(); + + @JSProperty + void setRefDistance(float value); + + @JSProperty + float getRefDistance(); + + @JSProperty + void setMaxDistance(float value); + + @JSProperty + float getMaxDistance(); + + @JSProperty + void setRolloffFactor(float value); + + @JSProperty + float getRolloffFactor(); + + @JSProperty + void setConeInnerAngle(float value); + + @JSProperty + float getConeInnerAngle(); + + @JSProperty + void setConeOuterAngle(float value); + + @JSProperty + float getConeOuterAngle(); + + @JSProperty + void setConeOuterGain(float value); + + @JSProperty + float getConeOuterGain(); + + @JSMethod + void setPosition(float x, float y, float z); + + @JSMethod + void setOrientation(float x, float y, float z); + + @JSMethod + void setVelocity(float x, float y, float z); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java new file mode 100644 index 000000000..3809687d3 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java @@ -0,0 +1,24 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSObject; + +/** + * + */ +public interface PeriodicWave extends JSObject { +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java new file mode 100644 index 000000000..78663746b --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java @@ -0,0 +1,30 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface PeriodicWaveConstraints extends JSObject { + @JSProperty + void setDisableNormalization(boolean value); + + @JSProperty + boolean getDisableNormalization(); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java new file mode 100644 index 000000000..ba3cd0b77 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java @@ -0,0 +1,34 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventListener; + +/** + * + */ +public interface ScriptProcessorNode extends AudioNode { + @JSProperty("onaudioprocess") + EventListener getOnAudioProcess(); + + @JSProperty("onaudioprocess") + void setOnAudioProcess(EventListener event); + + @JSProperty + int getBufferSize(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java new file mode 100644 index 000000000..79d6733a9 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.JSProperty; + +/** + * + */ +public interface StereoPannerNode extends AudioNode { + @JSProperty + AudioParam getPan(); +} + diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java new file mode 100644 index 000000000..e517f418b --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java @@ -0,0 +1,41 @@ +/* + * Copyright 2015 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + + +import org.teavm.jso.JSProperty; +import org.teavm.jso.typedarrays.Float32Array; + +/** + * + */ +public interface WaveShaperNode extends AudioNode { + String OVERSAMPLE_NONE = "none"; + String OVERSAMPLE_2X = "2x"; + String OVERSAMPLE_4X = "4x"; + + @JSProperty + void setCurve(Float32Array value); + + @JSProperty + Float32Array getCurve(); + + @JSProperty + void setOversample(String value); + + @JSProperty + String getOversample(); +} From 36eb642e366e6e1d2aee12c9cb20078544df6ec0 Mon Sep 17 00:00:00 2001 From: Wolftein Date: Thu, 23 Jun 2016 17:53:27 -0300 Subject: [PATCH 2/3] Forgot to attach WheelEventTarget to HTMLELement. --- jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java index 6b57bee00..cd3b4d954 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java @@ -23,6 +23,7 @@ import org.teavm.jso.dom.events.FocusEventTarget; import org.teavm.jso.dom.events.KeyboardEventTarget; import org.teavm.jso.dom.events.LoadEventTarget; import org.teavm.jso.dom.events.MouseEventTarget; +import org.teavm.jso.dom.events.WheelEventTarget; import org.teavm.jso.dom.xml.Element; import org.teavm.jso.dom.xml.Node; import org.teavm.jso.dom.xml.NodeList; @@ -32,7 +33,7 @@ import org.teavm.jso.dom.xml.NodeList; * @author Alexey Andreev */ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget, FocusEventTarget, MouseEventTarget, - KeyboardEventTarget, LoadEventTarget { + WheelEventTarget, KeyboardEventTarget, LoadEventTarget { @Override NodeList getElementsByTagName(String name); From 88f49634954c208d7ef27498356461965a9a730b Mon Sep 17 00:00:00 2001 From: Wolftein Date: Thu, 23 Jun 2016 18:57:59 -0300 Subject: [PATCH 3/3] Fixed source. --- .../org/teavm/jso/dom/events/WheelEvent.java | 11 +++++----- .../jso/dom/events/WheelEventTarget.java | 5 +---- .../org/teavm/jso/typedarrays/DataView.java | 13 +++++------- .../org/teavm/jso/webaudio/AnalyserNode.java | 3 --- .../org/teavm/jso/webaudio/AudioBuffer.java | 5 +---- .../jso/webaudio/AudioBufferSourceNode.java | 9 +++----- .../org/teavm/jso/webaudio/AudioContext.java | 9 +++----- .../jso/webaudio/AudioDestinationNode.java | 5 +---- .../org/teavm/jso/webaudio/AudioListener.java | 5 +---- .../org/teavm/jso/webaudio/AudioNode.java | 5 +---- .../org/teavm/jso/webaudio/AudioParam.java | 5 +---- .../teavm/jso/webaudio/AudioProcessEvent.java | 5 +---- .../jso/webaudio/AudioProcessingEvent.java | 8 ++----- .../org/teavm/jso/webaudio/AudioWorker.java | 20 +++++++++--------- .../jso/webaudio/AudioWorkerGlobalScope.java | 13 +++++------- .../teavm/jso/webaudio/AudioWorkerNode.java | 17 ++++++++------- .../AudioWorkerNodeCreationEvent.java | 8 ++----- .../webaudio/AudioWorkerNodeProcessor.java | 18 +++++++++------- .../webaudio/AudioWorkerParamDescriptor.java | 5 +---- .../teavm/jso/webaudio/BiquadFilterNode.java | 5 +---- .../teavm/jso/webaudio/ChannelMergerNode.java | 5 +---- .../jso/webaudio/ChannelSplitterNode.java | 5 +---- .../org/teavm/jso/webaudio/ConvolverNode.java | 5 +---- .../jso/webaudio/DecodeErrorCallback.java | 5 +---- .../jso/webaudio/DecodeSuccessCallback.java | 5 +---- .../org/teavm/jso/webaudio/DelayNode.java | 5 +---- .../jso/webaudio/DynamicsCompressorNode.java | 5 +---- .../java/org/teavm/jso/webaudio/GainNode.java | 5 +---- .../org/teavm/jso/webaudio/IIRFilterNode.java | 5 +---- .../webaudio/MediaElementAudioSourceNode.java | 5 +---- .../org/teavm/jso/webaudio/MediaEvent.java | 21 +++++++++++++++++++ .../org/teavm/jso/webaudio/MediaStream.java | 5 +---- .../MediaStreamAudioDestinationNode.java | 5 +---- .../webaudio/MediaStreamAudioSourceNode.java | 5 +---- .../webaudio/OfflineAudioCompletionEvent.java | 8 ++----- .../jso/webaudio/OfflineAudioContext.java | 9 +++----- .../teavm/jso/webaudio/OscillatorNode.java | 9 +++----- .../org/teavm/jso/webaudio/PannerNode.java | 5 +---- .../org/teavm/jso/webaudio/PeriodicWave.java | 5 +---- .../jso/webaudio/PeriodicWaveConstraints.java | 5 +---- .../jso/webaudio/ScriptProcessorNode.java | 9 +++----- .../teavm/jso/webaudio/StereoPannerNode.java | 5 +---- .../teavm/jso/webaudio/WaveShaperNode.java | 6 +----- 43 files changed, 114 insertions(+), 207 deletions(-) create mode 100644 jso/apis/src/main/java/org/teavm/jso/webaudio/MediaEvent.java diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java index e45e2810d..8a56cfac2 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,11 @@ package org.teavm.jso.dom.events; import org.teavm.jso.JSProperty; -/** - * - */ public interface WheelEvent extends MouseEvent { + int DOM_DELTA_PIXEL = 0; + int DOM_DELTA_LINE = 1; + int DOM_DELTA_PAGE = 2; + @JSProperty double getDeltaX(); @@ -31,5 +32,5 @@ public interface WheelEvent extends MouseEvent { double getDeltaZ(); @JSProperty - long getDeltaMode(); + int getDeltaMode(); } diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java index 520ed69e4..743e9782c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/events/WheelEventTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,6 @@ */ package org.teavm.jso.dom.events; -/** - * - */ public interface WheelEventTarget extends EventTarget { default void listenWheel(EventListener listener) { addEventListener("wheel", listener); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java index a14ae51b1..b2d6cbdbd 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,6 @@ package org.teavm.jso.typedarrays; import org.teavm.jso.JSBody; import org.teavm.jso.JSMethod; -/** - * - */ public abstract class DataView extends ArrayBufferView { @JSMethod public abstract byte getInt8(int byteOffset); @@ -47,10 +44,10 @@ public abstract class DataView extends ArrayBufferView { public abstract int getInt32(int byteOffset, boolean littleEndian); @JSMethod - public abstract long getUInt32(int byteOffset); + public abstract int getUInt32(int byteOffset); @JSMethod - public abstract long getUInt32(int byteOffset, boolean littleEndian); + public abstract int getUInt32(int byteOffset, boolean littleEndian); @JSMethod public abstract float getFloat32(int byteOffset); @@ -89,10 +86,10 @@ public abstract class DataView extends ArrayBufferView { public abstract void setInt32(int byteOffset, int value, boolean littleEndian); @JSMethod - public abstract void setUInt32(int byteOffset, long value); + public abstract void setUInt32(int byteOffset, int value); @JSMethod - public abstract void setUInt32(int byteOffset, long value, boolean littleEndian); + public abstract void setUInt32(int byteOffset, int value, boolean littleEndian); @JSMethod public abstract void setFloat32(int byteOffset, float value); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java index 1a53fd42c..d4be152f5 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AnalyserNode.java @@ -20,9 +20,6 @@ import org.teavm.jso.JSProperty; import org.teavm.jso.typedarrays.Float32Array; import org.teavm.jso.typedarrays.Uint8Array; -/** - * - */ public interface AnalyserNode extends AudioNode { @JSProperty void setFftSize(int size); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java index d2baf4350..5ec06b463 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,6 @@ import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface AudioBuffer extends JSObject { @JSProperty float getSampleRate(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java index 374c9f313..738e88fc7 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioBufferSourceNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface AudioBufferSourceNode extends AudioNode { @JSProperty AudioBuffer getBuffer(); @@ -54,10 +51,10 @@ public interface AudioBufferSourceNode extends AudioNode { void setLoopEnd(double end); @JSProperty("onended") - void setOnEnded(EventListener ent); + void setOnEnded(EventListener ent); @JSProperty("onended") - EventListener getOnEnded(); + EventListener getOnEnded(); @JSMethod void start(double when, double offset, double duration); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java index b0f921214..3fec3c2e0 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,6 @@ import org.teavm.jso.dom.html.HTMLMediaElement; import org.teavm.jso.typedarrays.ArrayBuffer; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public abstract class AudioContext implements JSObject { String STATE_SUSPENDED = "suspended"; String STATE_RUNNING = "running"; @@ -48,10 +45,10 @@ public abstract class AudioContext implements JSObject { public abstract String getState(); @JSProperty("onstatechange") - public abstract void setOnStateChange(EventListener listener); + public abstract void setOnStateChange(EventListener listener); @JSProperty("onstatechange") - public abstract EventListener getOnStateChange(); + public abstract EventListener getOnStateChange(); @JSMethod public abstract void suspend(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java index 3136726ff..252e0d193 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioDestinationNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface AudioDestinationNode extends AudioNode { @JSProperty int getMaxChannelCount(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java index a3045218b..681fc4b03 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; -/** - * - */ public interface AudioListener extends JSObject { @JSProperty void setDopplerFactor(float value); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java index 806efee09..1aa9e48fc 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; -/** - * - */ public interface AudioNode extends JSObject { String CHANNEL_COUNT_MODE_MAX = "max"; String CHANNEL_COUNT_MODE_CLAMPED_MAX = "clamped-max"; diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java index 7cb6f2e1e..439d1ccd5 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioParam.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,6 @@ import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface AudioParam extends JSObject { @JSProperty float getValue(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java index 776bd7c86..134853412 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,6 @@ import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.Event; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface AudioProcessEvent extends Event { @JSProperty double getPlaybackTime(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java index 0b6035caf..de7a2105c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioProcessingEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,8 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.events.Event; -/** - * - */ -public interface AudioProcessingEvent extends Event { +public interface AudioProcessingEvent extends MediaEvent { @JSProperty double getPlaybackTime(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java index 87445de1b..9870042a1 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorker.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,33 +20,33 @@ import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface AudioWorker extends JSObject { @JSProperty AudioWorkerParamDescriptor[] getParameters(); @JSProperty(value = "onmessage") - void setOnMessage(EventListener event); + void setOnMessage(EventListener event); @JSProperty(value = "onmessage") - EventListener getOnMessage(); + EventListener getOnMessage(); @JSProperty(value = "onloaded") - void setOnLoaded(EventListener event); + void setOnLoaded(EventListener event); @JSProperty(value = "onloaded") - EventListener getOnLoaded(); + EventListener getOnLoaded(); @JSMethod void terminate(); @JSMethod - void postMessage(Object message, Object... transfer); + void postMessage(JSObject message, JSObject[] transfer); @JSMethod - void postMessage(Object message); + void postMessage(JSObject message, JSObject transfer); + + @JSMethod + void postMessage(JSObject message); @JSMethod AudioWorkerNode createNode(int numberOfInputs, int numberOfOutputs); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java index 878365bca..09d669517 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerGlobalScope.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,24 +20,21 @@ import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface AudioWorkerGlobalScope extends JSObject { @JSProperty float getSampleRate(); @JSProperty("onaudioprocess") - void setOnAudioProcess(EventListener event); + void setOnAudioProcess(EventListener event); @JSProperty("onaudioprocess") - EventListener getOnAudioProcess(); + EventListener getOnAudioProcess(); @JSProperty("onnodecreate") - void setOnNodeCreate(EventListener event); + void setOnNodeCreate(EventListener event); @JSProperty("onnodecreate") - EventListener getOnNodeCreate(); + EventListener getOnNodeCreate(); @JSProperty AudioWorkerParamDescriptor[] getParameters(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java index 19c75afb5..0362ab5d3 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,23 +16,24 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface AudioWorkerNode extends AudioNode { @JSProperty("onmessage") - void setOnMessage(EventListener event); + void setOnMessage(EventListener event); @JSProperty("onmessage") - EventListener getOnMessage(); + EventListener getOnMessage(); @JSMethod - void postMessage(Object message, Object... transfer); + void postMessage(JSObject message, JSObject[] transfer); @JSMethod - void postMessage(Object message); + void postMessage(JSObject message, JSObject transfer); + + @JSMethod + void postMessage(JSObject message); } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java index 6368677d8..45fb135f0 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeCreationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,8 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; import org.teavm.jso.core.JSArray; -import org.teavm.jso.dom.events.Event; -/** - * - */ -public interface AudioWorkerNodeCreationEvent extends Event { +public interface AudioWorkerNodeCreationEvent extends MediaEvent { @JSProperty AudioWorkerNodeProcessor getNode(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java index 7d09115db..f7ba0880a 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerNodeProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,23 +16,25 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSMethod; +import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; import org.teavm.jso.dom.events.EventTarget; -/** - * - */ public interface AudioWorkerNodeProcessor extends EventTarget { @JSProperty("onmessage") - void setOnMessage(EventListener event); + void setOnMessage(EventListener event); @JSProperty("onmessage") - EventListener getOnMessage(); + EventListener getOnMessage(); @JSMethod - void postMessage(Object message, Object... transfer); + void postMessage(JSObject message, JSObject[] transfer); @JSMethod - void postMessage(Object message); + void postMessage(JSObject message, JSObject transfer); + + @JSMethod + void postMessage(JSObject message); + } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java index ee8833f20..a6d4bd844 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/AudioWorkerParamDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; -/** - * - */ public interface AudioWorkerParamDescriptor extends JSObject { @JSProperty String getName(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java index 7d89e1f06..2c3aacb6d 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/BiquadFilterNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSProperty; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface BiquadFilterNode extends AudioNode { String TYPE_LOW_PASS = "lowpass"; String TYPE_LOW_SHELF = "lowshelf"; diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java index f1d556df6..4eb0d9128 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelMergerNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,5 @@ */ package org.teavm.jso.webaudio; -/** - * - */ public interface ChannelMergerNode extends AudioNode { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java index 0f768995c..1342ce2b9 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ChannelSplitterNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,5 @@ */ package org.teavm.jso.webaudio; -/** - * - */ public interface ChannelSplitterNode extends AudioNode { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java index bce7c0604..36e52d2c2 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ConvolverNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface ConvolverNode extends AudioNode { @JSProperty void setBuffer(AudioBuffer buffer); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java index 4a9e30b8d..6ba606ecb 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeErrorCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSFunctor; import org.teavm.jso.JSMethod; import org.teavm.jso.JSObject; -/** - * - */ @JSFunctor public interface DecodeErrorCallback extends JSObject { @JSMethod diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java index 78ac8182c..9db57057b 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DecodeSuccessCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSFunctor; import org.teavm.jso.JSMethod; import org.teavm.jso.JSObject; -/** - * - */ @JSFunctor public interface DecodeSuccessCallback extends JSObject { @JSMethod diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java index 3d3fcb8ab..3b287c56c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DelayNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface DelayNode extends AudioNode { @JSProperty AudioParam getDelayTime(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java index c541f3e70..1089cfa61 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/DynamicsCompressorNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface DynamicsCompressorNode extends AudioNode { @JSProperty AudioParam getThreshold(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java index 7c9806e3f..68cbdcb76 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/GainNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface GainNode extends AudioNode { @JSProperty AudioParam getGain(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java index ccc97a376..eb74c8886 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/IIRFilterNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSMethod; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface IIRFilterNode extends AudioNode { @JSMethod void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java index 8adfcc5c5..6133653ab 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaElementAudioSourceNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,5 @@ */ package org.teavm.jso.webaudio; -/** - * - */ public interface MediaElementAudioSourceNode extends AudioNode { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaEvent.java new file mode 100644 index 000000000..c68f6127f --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaEvent.java @@ -0,0 +1,21 @@ +/* + * Copyright 2016 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.webaudio; + +import org.teavm.jso.dom.events.Event; + +public interface MediaEvent extends Event { +} diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java index b662e3639..d1617683f 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSObject; -/** - * - */ public interface MediaStream extends JSObject { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java index 0a2392cd0..84b3026ab 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioDestinationNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface MediaStreamAudioDestinationNode extends AudioNode { @JSProperty MediaStream getStream(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java index 3f128c038..5082dde35 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/MediaStreamAudioSourceNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,6 @@ */ package org.teavm.jso.webaudio; -/** - * - */ public interface MediaStreamAudioSourceNode extends AudioNode { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java index d44cef8b5..64a87dd85 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioCompletionEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,8 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.events.Event; -/** - * - */ -public interface OfflineAudioCompletionEvent extends Event { +public interface OfflineAudioCompletionEvent extends MediaEvent { @JSProperty AudioBuffer getRenderedBuffer(); } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java index 1ba50820a..858c4d68b 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OfflineAudioContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,15 +19,12 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public abstract class OfflineAudioContext extends AudioContext { @JSProperty("oncomplete") - public abstract void setOnComplete(EventListener event); + public abstract void setOnComplete(EventListener event); @JSProperty("oncomplete") - public abstract EventListener getOnComplete(); + public abstract EventListener getOnComplete(); @JSMethod public abstract AudioBuffer startRendering(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java index ea888d7fb..c45259946 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/OscillatorNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +19,6 @@ import org.teavm.jso.JSMethod; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface OscillatorNode extends AudioNode { String TYPE_SINE = "sine"; String TYPE_SQUARE = "square"; @@ -42,10 +39,10 @@ public interface OscillatorNode extends AudioNode { AudioParam getDetune(); @JSProperty("onended") - void setOnEnded(EventListener listener); + void setOnEnded(EventListener listener); @JSProperty("onended") - EventListener getOnEnded(); + EventListener getOnEnded(); @JSMethod void start(double when); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java index f7972134b..d61d1f544 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PannerNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSMethod; import org.teavm.jso.JSProperty; -/** - * - */ public interface PannerNode extends AudioNode { String MODEL_EQUALPOWER = "equalpower"; String MODEL_HRTF = "HRTF"; diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java index 3809687d3..b6e238907 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWave.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,5 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSObject; -/** - * - */ public interface PeriodicWave extends JSObject { } diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java index 78663746b..986fa8672 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/PeriodicWaveConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; -/** - * - */ public interface PeriodicWaveConstraints extends JSObject { @JSProperty void setDisableNormalization(boolean value); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java index ba3cd0b77..fc600c64e 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/ScriptProcessorNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,15 +18,12 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; import org.teavm.jso.dom.events.EventListener; -/** - * - */ public interface ScriptProcessorNode extends AudioNode { @JSProperty("onaudioprocess") - EventListener getOnAudioProcess(); + EventListener getOnAudioProcess(); @JSProperty("onaudioprocess") - void setOnAudioProcess(EventListener event); + void setOnAudioProcess(EventListener event); @JSProperty int getBufferSize(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java index 79d6733a9..52cb015c4 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/StereoPannerNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,6 @@ package org.teavm.jso.webaudio; import org.teavm.jso.JSProperty; -/** - * - */ public interface StereoPannerNode extends AudioNode { @JSProperty AudioParam getPan(); diff --git a/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java b/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java index e517f418b..2b60a695a 100644 --- a/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java +++ b/jso/apis/src/main/java/org/teavm/jso/webaudio/WaveShaperNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,9 @@ */ package org.teavm.jso.webaudio; - import org.teavm.jso.JSProperty; import org.teavm.jso.typedarrays.Float32Array; -/** - * - */ public interface WaveShaperNode extends AudioNode { String OVERSAMPLE_NONE = "none"; String OVERSAMPLE_2X = "2x";