Java 类com.badlogic.gdx.Audio 实例源码

项目:GDX-Engine    文件:AssetLoader.java   
@SuppressWarnings("unchecked")
public static <T> T load(Class<T> type, String filepath,
        Object... parameters) {
    T output = null;
    setAssetClass(type);
    try {
        if (gameAsset == null)
            gameAsset = new DefaultGameAsset();
        if (type == Texture.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadTexture(filepath);
            else if (parameters.length == 1) {
                output = (T) gameAsset.loadTexture(filepath,
                        (Format) parameters[0], true);
            } else if (parameters.length == 2) {
                output = (T) gameAsset.loadTexture(filepath,
                        (Format) parameters[0], (Boolean) parameters[1]);
            } else {
                throw new GdxRuntimeException("Parameters is not valid!");
            }
        } else if (type == BitmapFont.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadBitmapFont(filepath);
            else if (parameters.length == 1) {
                output = (T) gameAsset.loadBitmapFont(filepath,
                        (String) parameters[0]);
            } else {
                throw new GdxRuntimeException("Parameters is not valid!");
            }
        } else if (type == TextureRegion.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadTextureRegion(filepath);
            else if (parameters.length == 1) {
                output = (T) gameAsset.loadTextureRegion(filepath,
                        (Rectangle) parameters[0]);
            } else if (parameters.length == 2) {
                output = (T) gameAsset.loadTextureRegion(
                        (Texture) parameters[0], (Rectangle) parameters[1]);
            } else {
                throw new GdxRuntimeException("Parameters is not valid!");
            }
        } else if (type == Music.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadMusic(filepath);
            else if (parameters.length == 1) {
                output = (T) gameAsset.loadMusic(filepath,
                        (Float) parameters[0]);
            } else {
                throw new GdxRuntimeException("Parameters is not valid!");
            }
        } else if (type == Audio.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadSound(filepath);
        } else if (type == ShaderProgram.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadShader(filepath);
            else if (parameters.length == 1) {
                output = (T) gameAsset.loadShader(filepath,
                        (String) parameters[0]);
            } else {
                throw new GdxRuntimeException("Parameters is not valid!");
            }
        } else if (type == StillModel.class) {
            if (parameters.length == 0)
                output = (T) gameAsset.loadModel(filepath);
        }
    } catch (Exception ex) {
        throw new GdxRuntimeException("Invalid parameters you passed");
    }

    return output;
}
项目:ZombieInvadersVR    文件:CardBoardAndroidApplication.java   
@Override
public Audio getAudio () {
   return audio;
}
项目:thunderboard-android    文件:GdxDemoActivity.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:nvlist    文件:GdxAppStub.java   
@Override
public Audio getAudio() {
    return Gdx.audio;
}
项目:teavm-libgdx    文件:TeaVMApplication.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:libgdxcn    文件:JglfwApplication.java   
public Audio getAudio () {
    return null;
}
项目:libgdxcn    文件:GwtApplication.java   
@Override
public Audio getAudio () {
    return Gdx.audio;
}
项目:libgdxcn    文件:HeadlessApplication.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:libgdxcn    文件:IOSApplication.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:LwjglCanvas.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:LwjglAWTCanvas.java   
@Override
public Audio getAudio () {
    return Gdx.audio;
}
项目:libgdxcn    文件:LwjglApplication.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:AndroidApplication.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:AndroidLiveWallpaper.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:AndroidFragmentApplication.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:libgdxcn    文件:AndroidDaydream.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:TinyVoxel    文件:GwtApplication.java   
@Override
public Audio getAudio () {
    return Gdx.audio;
}
项目:vtm    文件:GwtApplication.java   
@Override
public Audio getAudio() {
    return Gdx.audio;
}
项目:ead    文件:MockApplication.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:LibGDXServer    文件:ServerApplication.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:shadow-engine    文件:ShadowJglfwApplication.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:mini2Dx    文件:AndroidMini2DxGame.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:mini2Dx    文件:DesktopMini2DxGame.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:mini2Dx    文件:IOSMini2DxGame.java   
@Override
public Audio getAudio () {
    return audio;
}
项目:mini2Dx    文件:HeadlessMini2DxGame.java   
@Override
public Audio getAudio() {
    return audio;
}
项目:ingress-indonesia-dev    文件:AndroidApplication.java   
public Audio getAudio()
{
  return this.audio;
}