當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。