• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisión00effb1783ddd359c4b20c21fd7c3a0ba5986763 (tree)
Tiempo2013-02-28 08:18:44
Autorjulien.gouesse@gmail.com <julien.gouesse@gmai...>
Commiterjulien.gouesse@gmail.com

Log Message

Fixes some compile errors in JoalAudioRenderer (work in progress)

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10452 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Cambiar Resumen

Diferencia incremental

--- a/engine/src/jogl/com/jme3/audio/joal/JoalAudioRenderer.java
+++ b/engine/src/jogl/com/jme3/audio/joal/JoalAudioRenderer.java
@@ -202,14 +202,14 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
202202 //supportEfx = alc.alcIsExtensionPresent(device, "ALC_EXT_EFX");
203203 if (supportEfx) {
204204 ib.position(0).limit(1);
205- alc.alcGetIntegerv(device, AL.ALC_EFX_MAJOR_VERSION, 1, ib);
205+ alc.alcGetIntegerv(device, ALExtConstants.ALC_EFX_MAJOR_VERSION, 1, ib);
206206 int major = ib.get(0);
207207 ib.position(0).limit(1);
208- alc.alcGetIntegerv(device, AL.ALC_EFX_MINOR_VERSION, 1, ib);
208+ alc.alcGetIntegerv(device, ALExtConstants.ALC_EFX_MINOR_VERSION, 1, ib);
209209 int minor = ib.get(0);
210210 logger.log(Level.FINE, "Audio effect extension version: {0}.{1}", new Object[]{major, minor});
211211
212- alc.alcGetIntegerv(device, AL.ALC_MAX_AUXILIARY_SENDS, 1, ib);
212+ alc.alcGetIntegerv(device, ALExtConstants.ALC_MAX_AUXILIARY_SENDS, 1, ib);
213213 auxSends = ib.get(0);
214214 logger.log(Level.FINE, "Audio max auxilary sends: {0}", auxSends);
215215
@@ -222,10 +222,10 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
222222 ib.position(0).limit(1);
223223 al.alGenEffects(1, ib);
224224 reverbFx = ib.get(0);
225- al.alEffecti(reverbFx, AL.AL_EFFECT_TYPE, AL.AL_EFFECT_REVERB);
225+ al.alEffecti(reverbFx, ALExtConstants.AL_EFFECT_TYPE, ALExtConstants.AL_EFFECT_REVERB);
226226
227227 // attach reverb effect to effect slot
228- al.alAuxiliaryEffectSloti(reverbFxSlot, AL.AL_EFFECTSLOT_EFFECT, reverbFx);
228+ al.alAuxiliaryEffectSloti(reverbFxSlot, ALExtConstants.AL_EFFECTSLOT_EFFECT, reverbFx);
229229 } else {
230230 logger.log(Level.WARNING, "OpenAL EFX not available! Audio effects won't work.");
231231 }
@@ -297,9 +297,9 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
297297
298298 if (f instanceof LowPassFilter) {
299299 LowPassFilter lpf = (LowPassFilter) f;
300- al.alFilteri(id, AL.AL_FILTER_TYPE, AL.AL_FILTER_LOWPASS);
301- al.alFilterf(id, AL.AL_LOWPASS_GAIN, lpf.getVolume());
302- al.alFilterf(id, AL.AL_LOWPASS_GAINHF, lpf.getHighFreqVolume());
300+ al.alFilteri(id, ALExtConstants.AL_FILTER_TYPE, ALExtConstants.AL_FILTER_LOWPASS);
301+ al.alFilterf(id, ALExtConstants.AL_LOWPASS_GAIN, lpf.getVolume());
302+ al.alFilterf(id, ALExtConstants.AL_LOWPASS_GAINHF, lpf.getHighFreqVolume());
303303 } else {
304304 throw new UnsupportedOperationException("Filter type unsupported: "
305305 + f.getClass().getName());
@@ -373,7 +373,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
373373 return;
374374 }
375375
376- int filter = AL.AL_FILTER_NULL;
376+ int filter = ALExtConstants.AL_FILTER_NULL;
377377 if (src.getReverbFilter() != null) {
378378 Filter f = src.getReverbFilter();
379379 if (f.isUpdateNeeded()) {
@@ -381,7 +381,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
381381 }
382382 filter = f.getId();
383383 }
384- al.alSource3i(id, AL.AL_AUXILIARY_SEND_FILTER, reverbFxSlot, 0, filter);
384+ al.alSource3i(id, ALExtConstants.AL_AUXILIARY_SEND_FILTER, reverbFxSlot, 0, filter);
385385 break;
386386 case ReverbEnabled:
387387 if (!supportEfx || !src.isPositional()) {
@@ -391,7 +391,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
391391 if (src.isReverbEnabled()) {
392392 updateSourceParam(src, AudioParam.ReverbFilter);
393393 } else {
394- al.alSource3i(id, AL.AL_AUXILIARY_SEND_FILTER, 0, 0, AL.AL_FILTER_NULL);
394+ al.alSource3i(id, ALExtConstants.AL_AUXILIARY_SEND_FILTER, 0, 0, ALExtConstants.AL_FILTER_NULL);
395395 }
396396 break;
397397 case IsPositional:
@@ -402,7 +402,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
402402 al.alSource3f(id, ALConstants.AL_VELOCITY, 0, 0, 0);
403403
404404 // Disable reverb
405- al.alSource3i(id, AL.AL_AUXILIARY_SEND_FILTER, 0, 0, AL.AL_FILTER_NULL);
405+ al.alSource3i(id, ALExtConstants.AL_AUXILIARY_SEND_FILTER, 0, 0, ALExtConstants.AL_FILTER_NULL);
406406 } else {
407407 al.alSourcei(id, ALConstants.AL_SOURCE_RELATIVE, ALConstants.AL_FALSE);
408408 updateSourceParam(src, AudioParam.Position);
@@ -457,10 +457,10 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
457457 updateFilter(f);
458458
459459 // NOTE: must re-attach filter for changes to apply.
460- al.alSourcei(id, AL.AL_DIRECT_FILTER, f.getId());
460+ al.alSourcei(id, ALExtConstants.AL_DIRECT_FILTER, f.getId());
461461 }
462462 } else {
463- al.alSourcei(id, AL.AL_DIRECT_FILTER, AL.AL_FILTER_NULL);
463+ al.alSourcei(id, ALExtConstants.AL_DIRECT_FILTER, ALExtConstants.AL_FILTER_NULL);
464464 }
465465 break;
466466 case Looping:
@@ -493,7 +493,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
493493 al.alSourcei(id, ALConstants.AL_SOURCE_RELATIVE, ALConstants.AL_FALSE);
494494
495495 if (src.isReverbEnabled() && supportEfx) {
496- int filter = AL.AL_FILTER_NULL;
496+ int filter = ALExtConstants.AL_FILTER_NULL;
497497 if (src.getReverbFilter() != null) {
498498 Filter f = src.getReverbFilter();
499499 if (f.isUpdateNeeded()) {
@@ -501,7 +501,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
501501 }
502502 filter = f.getId();
503503 }
504- al.alSource3i(id, AL.AL_AUXILIARY_SEND_FILTER, reverbFxSlot, 0, filter);
504+ al.alSource3i(id, ALExtConstants.AL_AUXILIARY_SEND_FILTER, reverbFxSlot, 0, filter);
505505 }
506506 } else {
507507 // play in headspace
@@ -516,7 +516,7 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
516516 updateFilter(f);
517517
518518 // NOTE: must re-attach filter for changes to apply.
519- al.alSourcei(id, AL.AL_DIRECT_FILTER, f.getId());
519+ al.alSourcei(id, ALExtConstants.AL_DIRECT_FILTER, f.getId());
520520 }
521521 }
522522
@@ -627,21 +627,21 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
627627 return;
628628 }
629629
630- al.alEffectf(reverbFx, AL.AL_REVERB_DENSITY, env.getDensity());
631- al.alEffectf(reverbFx, AL.AL_REVERB_DIFFUSION, env.getDiffusion());
632- al.alEffectf(reverbFx, AL.AL_REVERB_GAIN, env.getGain());
633- al.alEffectf(reverbFx, AL.AL_REVERB_GAINHF, env.getGainHf());
634- al.alEffectf(reverbFx, AL.AL_REVERB_DECAY_TIME, env.getDecayTime());
635- al.alEffectf(reverbFx, AL.AL_REVERB_DECAY_HFRATIO, env.getDecayHFRatio());
636- al.alEffectf(reverbFx, AL.AL_REVERB_REFLECTIONS_GAIN, env.getReflectGain());
637- al.alEffectf(reverbFx, AL.AL_REVERB_REFLECTIONS_DELAY, env.getReflectDelay());
638- al.alEffectf(reverbFx, AL.AL_REVERB_LATE_REVERB_GAIN, env.getLateReverbGain());
639- al.alEffectf(reverbFx, AL.AL_REVERB_LATE_REVERB_DELAY, env.getLateReverbDelay());
640- al.alEffectf(reverbFx, AL.AL_REVERB_AIR_ABSORPTION_GAINHF, env.getAirAbsorbGainHf());
641- al.alEffectf(reverbFx, AL.AL_REVERB_ROOM_ROLLOFF_FACTOR, env.getRoomRolloffFactor());
630+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_DENSITY, env.getDensity());
631+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_DIFFUSION, env.getDiffusion());
632+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_GAIN, env.getGain());
633+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_GAINHF, env.getGainHf());
634+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_DECAY_TIME, env.getDecayTime());
635+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_DECAY_HFRATIO, env.getDecayHFRatio());
636+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_REFLECTIONS_GAIN, env.getReflectGain());
637+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_REFLECTIONS_DELAY, env.getReflectDelay());
638+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_LATE_REVERB_GAIN, env.getLateReverbGain());
639+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_LATE_REVERB_DELAY, env.getLateReverbDelay());
640+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_AIR_ABSORPTION_GAINHF, env.getAirAbsorbGainHf());
641+ al.alEffectf(reverbFx, ALExtConstants.AL_REVERB_ROOM_ROLLOFF_FACTOR, env.getRoomRolloffFactor());
642642
643643 // attach effect to slot
644- al.alAuxiliaryEffectSloti(reverbFxSlot, AL.AL_EFFECTSLOT_EFFECT, reverbFx);
644+ al.alAuxiliaryEffectSloti(reverbFxSlot, ALExtConstants.AL_EFFECTSLOT_EFFECT, reverbFx);
645645 }
646646 }
647647
@@ -747,12 +747,12 @@ public class JoalAudioRenderer implements AudioRenderer, Runnable {
747747
748748 if (src.getDryFilter() != null && supportEfx) {
749749 // detach filter
750- al.alSourcei(sourceId, AL.AL_DIRECT_FILTER, AL.AL_FILTER_NULL);
750+ al.alSourcei(sourceId, ALExtConstants.AL_DIRECT_FILTER, ALExtConstants.AL_FILTER_NULL);
751751 }
752752 if (src.isPositional()) {
753753 AudioSource pas = (AudioSource) src;
754754 if (pas.isReverbEnabled() && supportEfx) {
755- al.alSource3i(sourceId, AL.AL_AUXILIARY_SEND_FILTER, 0, 0, AL.AL_FILTER_NULL);
755+ al.alSource3i(sourceId, ALExtConstants.AL_AUXILIARY_SEND_FILTER, 0, 0, ALExtConstants.AL_FILTER_NULL);
756756 }
757757 }
758758