当前位置: 首页>>代码示例>>Java>>正文


Java Filter类代码示例

本文整理汇总了Java中com.jme3.audio.Filter的典型用法代码示例。如果您正苦于以下问题:Java Filter类的具体用法?Java Filter怎么用?Java Filter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Filter类属于com.jme3.audio包,在下文中一共展示了Filter类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateFilter

import com.jme3.audio.Filter; //导入依赖的package包/类
private void updateFilter(Filter f){
    int id = f.getId();
    if (id == -1){
        ib.position(0).limit(1);
        EFX10.alGenFilters(ib);
        id = ib.get(0);
        f.setId(id);
    }

    if (f instanceof LowPassFilter){
        LowPassFilter lpf = (LowPassFilter) f;
        EFX10.alFilteri(id, EFX10.AL_FILTER_TYPE,    EFX10.AL_FILTER_LOWPASS);
        EFX10.alFilterf(id, EFX10.AL_LOWPASS_GAIN,   lpf.getVolume());
        EFX10.alFilterf(id, EFX10.AL_LOWPASS_GAINHF, lpf.getHighFreqVolume());
    }else{
        throw new UnsupportedOperationException("Filter type unsupported: "+
                                                f.getClass().getName());
    }

    f.clearUpdateNeeded();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:22,代码来源:LwjglAudioRenderer.java

示例2: updateFilter

import com.jme3.audio.Filter; //导入依赖的package包/类
private void updateFilter(Filter f){
    int id = f.getId();
    if (id == -1){
        ib.position(0).limit(1);
        EFX10.alGenFilters(ib);
        id = ib.get(0);
        f.setId(id);
        
        objManager.registerForCleanup(f);
    }

    if (f instanceof LowPassFilter){
        LowPassFilter lpf = (LowPassFilter) f;
        EFX10.alFilteri(id, EFX10.AL_FILTER_TYPE,    EFX10.AL_FILTER_LOWPASS);
        EFX10.alFilterf(id, EFX10.AL_LOWPASS_GAIN,   lpf.getVolume());
        EFX10.alFilterf(id, EFX10.AL_LOWPASS_GAINHF, lpf.getHighFreqVolume());
    }else{
        throw new UnsupportedOperationException("Filter type unsupported: "+
                                                f.getClass().getName());
    }

    f.clearUpdateNeeded();
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:24,代码来源:LwjglAudioRenderer.java

示例3: createSheet

import com.jme3.audio.Filter; //导入依赖的package包/类
@Override
protected Sheet createSheet() {
    //TODO: multithreading..
    Sheet sheet = super.createSheet();
    Sheet.Set set = Sheet.createPropertiesSet();
    set.setDisplayName("AudioNode");
    set.setName(AudioNode.class.getName());
    AudioNode obj = node;//getLookup().lookup(Spatial.class);
    if (obj == null) {
        return sheet;
    }

    set.put(new AudioDataProperty(obj));
    set.put(makeProperty(obj, Vector3f.class, "getDirection", "setDirection", "Direction"));
    set.put(makeProperty(obj, boolean.class, "isDirectional", "setDirectional", "Directional"));
    set.put(makeProperty(obj, float.class, "getInnerAngle", "setInnerAngle", "Inner Angle"));
    set.put(makeProperty(obj, float.class, "getOuterAngle", "setOuterAngle", "Outer Angle"));
    set.put(makeProperty(obj, Filter.class, "getDryFilter", "setDryFilter", "Dry Filter"));
    set.put(makeProperty(obj, boolean.class, "isLooping", "setLooping", "Looping"));
    set.put(makeProperty(obj, float.class, "getMaxDistance", "setMaxDistance", "Max Distance"));

    set.put(makeProperty(obj, float.class, "getPitch", "setPitch", "Audio Pitch"));
    set.put(makeProperty(obj, boolean.class, "isPositional", "setPositional", "Positional"));

    set.put(makeProperty(obj, boolean.class, "isReverbEnabled", "setReverbEnabled", "Reverb"));
    set.put(makeProperty(obj, Filter.class, "getReverbFilter", "setReverbFilter", "Reverb Filter"));
    set.put(makeProperty(obj, float.class, "getRefDistance", "setRefDistance", "Ref Distance"));
    set.put(makeProperty(obj, float.class, "getTimeOffset", "setTimeOffset", "Time Offset"));

    set.put(makeProperty(obj, AudioSource.Status.class, "getStatus", "setStatus", "Status"));

    set.put(makeProperty(obj, float.class, "getVolume", "setVolume", "Volume"));
    set.put(makeProperty(obj, Vector3f.class, "getVelocity", "setVelocity", "Velocity"));
    sheet.put(set);
    return sheet;

}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:38,代码来源:JmeAudioNode.java

示例4: createSheet

import com.jme3.audio.Filter; //导入依赖的package包/类
@Override
protected Sheet createSheet() {
    //TODO: multithreading..
    Sheet sheet = super.createSheet();
    Sheet.Set set = Sheet.createPropertiesSet();
    set.setDisplayName("AudioNode");
    set.setName(AudioNode.class.getName());
    AudioNode obj = node;//getLookup().lookup(Spatial.class);
    if (obj == null) {
        return sheet;
    }

    set.put(new AudioDataProperty(obj));
    set.put(makeProperty(obj, Vector3f.class, "getDirection", "setDirection", "Direction"));
    set.put(makeProperty(obj, boolean.class, "isDirectional", "setDirectional", "Directional"));
    set.put(makeProperty(obj, float.class, "getInnerAngle", "setInnerAngle", "Inner Angle"));
    set.put(makeProperty(obj, float.class, "getOuterAngle", "setOuterAngle", "Outer Angle"));
    set.put(makeProperty(obj, Filter.class, "getDryFilter", "setDryFilter", "Dry Filter"));
    set.put(makeProperty(obj, boolean.class, "isLooping", "setLooping", "Looping"));
    set.put(makeProperty(obj, float.class, "getMaxDistance", "setMaxDistance", "Max Distance"));

    set.put(makeProperty(obj, float.class, "getPitch", "setPitch", "Audio Pitch"));
    set.put(makeProperty(obj, boolean.class, "isPositional", "setPositional", "Positional"));

    set.put(makeProperty(obj, boolean.class, "isReverbEnabled", "setReverbEnabled", "Reverb"));
    set.put(makeProperty(obj, Filter.class, "getReverbFilter", "setReverbFilter", "Reverb Filter"));
    set.put(makeProperty(obj, float.class, "getRefDistance", "setRefDistance", "Ref Distance"));
    set.put(makeProperty(obj, float.class, "getTimeOffset", "setTimeOffset", "Time Offset"));

    set.put(makeProperty(obj, Status.class, "getStatus", "setStatus", "Status"));

    set.put(makeProperty(obj, float.class, "getVolume", "setVolume", "Volume"));
    set.put(makeProperty(obj, Vector3f.class, "getVelocity", "setVelocity", "Velocity"));
    sheet.put(set);
    return sheet;

}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:38,代码来源:JmeAudioNode.java

示例5: deleteFilter

import com.jme3.audio.Filter; //导入依赖的package包/类
public void deleteFilter(Filter filter) {
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:3,代码来源:AndroidAudioRenderer.java

示例6: deleteFilter

import com.jme3.audio.Filter; //导入依赖的package包/类
public void deleteFilter(Filter filter) {
    int id = filter.getId();
    if (id != -1){
        EFX10.alDeleteFilters(id);
    }
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:7,代码来源:LwjglAudioRenderer.java


注:本文中的com.jme3.audio.Filter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。