本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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;
}
示例5: deleteFilter
import com.jme3.audio.Filter; //导入依赖的package包/类
public void deleteFilter(Filter filter) {
}
示例6: deleteFilter
import com.jme3.audio.Filter; //导入依赖的package包/类
public void deleteFilter(Filter filter) {
int id = filter.getId();
if (id != -1){
EFX10.alDeleteFilters(id);
}
}