commit
e90720de30
File diff suppressed because it is too large
Load Diff
@ -1,67 +0,0 @@ |
||||
package com.jme3.audio.android; |
||||
|
||||
import com.jme3.asset.AssetKey; |
||||
import com.jme3.audio.AudioData; |
||||
import com.jme3.audio.AudioRenderer; |
||||
import com.jme3.util.NativeObject; |
||||
|
||||
public class AndroidAudioData extends AudioData { |
||||
|
||||
protected AssetKey<?> assetKey; |
||||
protected float currentVolume = 0f; |
||||
|
||||
public AndroidAudioData(){ |
||||
super(); |
||||
} |
||||
|
||||
protected AndroidAudioData(int id){ |
||||
super(id); |
||||
} |
||||
|
||||
public AssetKey<?> getAssetKey() { |
||||
return assetKey; |
||||
} |
||||
|
||||
public void setAssetKey(AssetKey<?> assetKey) { |
||||
this.assetKey = assetKey; |
||||
} |
||||
|
||||
@Override |
||||
public DataType getDataType() { |
||||
return DataType.Buffer; |
||||
} |
||||
|
||||
@Override |
||||
public float getDuration() { |
||||
return 0; // TODO: ???
|
||||
} |
||||
|
||||
@Override |
||||
public void resetObject() { |
||||
this.id = -1; |
||||
setUpdateNeeded(); |
||||
} |
||||
|
||||
@Override |
||||
public void deleteObject(Object rendererObject) { |
||||
((AudioRenderer)rendererObject).deleteAudioData(this); |
||||
} |
||||
|
||||
public float getCurrentVolume() { |
||||
return currentVolume; |
||||
} |
||||
|
||||
public void setCurrentVolume(float currentVolume) { |
||||
this.currentVolume = currentVolume; |
||||
} |
||||
|
||||
@Override |
||||
public NativeObject createDestructableClone() { |
||||
return new AndroidAudioData(id); |
||||
} |
||||
|
||||
@Override |
||||
public long getUniqueId() { |
||||
return ((long)OBJTYPE_AUDIOBUFFER << 32) | ((long)id); |
||||
} |
||||
} |
@ -0,0 +1,53 @@ |
||||
package com.jme3.audio.ios; |
||||
|
||||
import com.jme3.audio.openal.AL; |
||||
import java.nio.ByteBuffer; |
||||
import java.nio.FloatBuffer; |
||||
import java.nio.IntBuffer; |
||||
|
||||
public final class IosAL implements AL { |
||||
|
||||
public IosAL() { |
||||
} |
||||
|
||||
public native String alGetString(int parameter); |
||||
|
||||
public native int alGenSources(); |
||||
|
||||
public native int alGetError(); |
||||
|
||||
public native void alDeleteSources(int numSources, IntBuffer sources); |
||||
|
||||
public native void alGenBuffers(int numBuffers, IntBuffer buffers); |
||||
|
||||
public native void alDeleteBuffers(int numBuffers, IntBuffer buffers); |
||||
|
||||
public native void alSourceStop(int source); |
||||
|
||||
public native void alSourcei(int source, int param, int value); |
||||
|
||||
public native void alBufferData(int buffer, int format, ByteBuffer data, int size, int frequency); |
||||
|
||||
public native void alSourcePlay(int source); |
||||
|
||||
public native void alSourcePause(int source); |
||||
|
||||
public native void alSourcef(int source, int param, float value); |
||||
|
||||
public native void alSource3f(int source, int param, float value1, float value2, float value3); |
||||
|
||||
public native int alGetSourcei(int source, int param); |
||||
|
||||
public native void alSourceUnqueueBuffers(int source, int numBuffers, IntBuffer buffers); |
||||
|
||||
public native void alSourceQueueBuffers(int source, int numBuffers, IntBuffer buffers); |
||||
|
||||
public native void alListener(int param, FloatBuffer data); |
||||
|
||||
public native void alListenerf(int param, float value); |
||||
|
||||
public native void alListener3f(int param, float value1, float value2, float value3); |
||||
|
||||
public native void alSource3i(int source, int param, int value1, int value2, int value3); |
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
package com.jme3.audio.ios; |
||||
|
||||
import com.jme3.audio.openal.ALC; |
||||
import java.nio.IntBuffer; |
||||
|
||||
public final class IosALC implements ALC { |
||||
|
||||
public IosALC() { |
||||
} |
||||
|
||||
public native void createALC(); |
||||
|
||||
public native void destroyALC(); |
||||
|
||||
public native boolean isCreated(); |
||||
|
||||
public native String alcGetString(int parameter); |
||||
|
||||
public native boolean alcIsExtensionPresent(String extension); |
||||
|
||||
public native void alcGetInteger(int param, IntBuffer buffer, int size); |
||||
|
||||
public native void alcDevicePauseSOFT(); |
||||
|
||||
public native void alcDeviceResumeSOFT(); |
||||
} |
@ -0,0 +1,32 @@ |
||||
package com.jme3.audio.ios; |
||||
|
||||
import com.jme3.audio.openal.EFX; |
||||
import java.nio.IntBuffer; |
||||
|
||||
public class IosEFX implements EFX { |
||||
|
||||
public IosEFX() { |
||||
} |
||||
|
||||
public native void alGenAuxiliaryEffectSlots(int numSlots, IntBuffer buffers); |
||||
|
||||
public native void alGenEffects(int numEffects, IntBuffer buffers); |
||||
|
||||
public native void alEffecti(int effect, int param, int value); |
||||
|
||||
public native void alAuxiliaryEffectSloti(int effectSlot, int param, int value); |
||||
|
||||
public native void alDeleteEffects(int numEffects, IntBuffer buffers); |
||||
|
||||
public native void alDeleteAuxiliaryEffectSlots(int numEffectSlots, IntBuffer buffers); |
||||
|
||||
public native void alGenFilters(int numFilters, IntBuffer buffers); |
||||
|
||||
public native void alFilteri(int filter, int param, int value); |
||||
|
||||
public native void alFilterf(int filter, int param, float value); |
||||
|
||||
public native void alDeleteFilters(int numFilters, IntBuffer buffers); |
||||
|
||||
public native void alEffectf(int effect, int param, float value); |
||||
} |
@ -1,20 +0,0 @@ |
||||
package com.jme3.audio.plugins; |
||||
|
||||
import com.jme3.asset.AssetInfo; |
||||
import com.jme3.asset.AssetLoader; |
||||
import com.jme3.audio.android.AndroidAudioData; |
||||
import java.io.IOException; |
||||
|
||||
/** |
||||
* <code>AndroidAudioLoader</code> will create an |
||||
* {@link AndroidAudioData} object with the specified asset key. |
||||
*/ |
||||
public class AndroidAudioLoader implements AssetLoader { |
||||
|
||||
@Override |
||||
public Object load(AssetInfo assetInfo) throws IOException { |
||||
AndroidAudioData result = new AndroidAudioData(); |
||||
result.setAssetKey(assetInfo.getKey()); |
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
INCLUDE com/jme3/asset/General.cfg |
||||
|
||||
# IOS specific loaders |
||||
LOADER com.jme3.system.ios.IosImageLoader : jpg, bmp, gif, png, jpeg |
||||
LOADER com.jme3.material.plugins.J3MLoader : j3m, j3md |
||||
LOADER com.jme3.shader.plugins.GLSLLoader : vert, frag, glsl, glsllib |
||||
LOADER com.jme3.export.binary.BinaryImporter : j3o |
||||
LOADER com.jme3.font.plugins.BitmapFontLoader : fnt |
Loading…
Reference in new issue