From: <ma...@us...> - 2010-07-14 13:12:34
|
Revision: 3380 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3380&view=rev Author: matzon Date: 2010-07-14 13:12:24 +0000 (Wed, 14 Jul 2010) Log Message: ----------- OAL patches by Ciardhubh Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java trunk/LWJGL/src/java/org/lwjgl/test/openal/OpenALInfo.java trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c trunk/LWJGL/src/templates/org/lwjgl/openal/AL10.java Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java 2010-07-12 20:19:21 UTC (rev 3379) +++ trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java 2010-07-14 13:12:24 UTC (rev 3380) @@ -59,6 +59,9 @@ public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; public static final int ALC_CAPTURE_SAMPLES = 0x312; + public static final int ALC_MONO_SOURCES = 0x1010; + public static final int ALC_STEREO_SOURCES = 0x1011; + /** * The alcCaptureOpenDevice function allows the application to connect to a capture * device. To obtain a list of all available capture devices, use getCaptureDevices a list of all Modified: trunk/LWJGL/src/java/org/lwjgl/test/openal/OpenALInfo.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/openal/OpenALInfo.java 2010-07-12 20:19:21 UTC (rev 3379) +++ trunk/LWJGL/src/java/org/lwjgl/test/openal/OpenALInfo.java 2010-07-14 13:12:24 UTC (rev 3380) @@ -191,7 +191,7 @@ effects.put("Compressor", new Integer(EFX10.AL_EFFECT_COMPRESSOR)); effects.put("Equalizer", new Integer(EFX10.AL_EFFECT_EQUALIZER)); - entries = filters.entrySet(); + entries = effects.entrySet(); for(Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Entry) i.next(); int value = ((Integer)entry.getValue()).intValue(); Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2010-07-12 20:19:21 UTC (rev 3379) +++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2010-07-14 13:12:24 UTC (rev 3380) @@ -86,7 +86,7 @@ int length; int i=1; - if(alcString == NULL) { + if (alcString == NULL) { return NULL; } @@ -94,14 +94,21 @@ // These are encoded using \0 between elements and a finishing \0\0 switch(token) { case 0x1005: // ALC_DEVICE_SPECIFIER - case 0x310: // ALC_CAPTURE_DEVICE_SPECIFIER + case 0x310: // ALC_CAPTURE_DEVICE_SPECIFIER + // If deviceaddress is not 0, OpenAL returns a single device terminated by a + // single \0 character, if token is ALC_DEVICE_SPECIFIER or + // ALC_CAPTURE_DEVICE_SPECIFIER. + if (deviceaddress != 0) { + length = strlen(alcString); + break; + } case 0x1013: // ALC_ALL_DEVICES_SPECIFIER while (alcString[i - 1] != '\0' || alcString[i] != '\0') { i++; } length = i + 1; break; - default: + default: // e.g. ALC_DEFAULT_ALL_DEVICES_SPECIFIER length = strlen(alcString); } return NewStringNativeWithLength(env, alcString, length); Modified: trunk/LWJGL/src/templates/org/lwjgl/openal/AL10.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/openal/AL10.java 2010-07-12 20:19:21 UTC (rev 3379) +++ trunk/LWJGL/src/templates/org/lwjgl/openal/AL10.java 2010-07-14 13:12:24 UTC (rev 3380) @@ -250,35 +250,28 @@ int AL_FREQUENCY = 0x2001; /** - * Sound buffers: frequency, in units of Hertz [Hz]. - * This is the number of samples per second. Half of the - * sample frequency marks the maximum significant - * frequency component. + * Sound buffers: The number of bits per sample for the + * data contained in the buffer. */ int AL_BITS = 0x2002; /** - * Sound buffers: frequency, in units of Hertz [Hz]. - * This is the number of samples per second. Half of the - * sample frequency marks the maximum significant - * frequency component. + * Sound buffers: The number of channels for the data + * contained in the buffer. */ int AL_CHANNELS = 0x2003; /** - * Sound buffers: frequency, in units of Hertz [Hz]. - * This is the number of samples per second. Half of the - * sample frequency marks the maximum significant - * frequency component. + * Sound buffers: Size in bytes of the buffer data. */ int AL_SIZE = 0x2004; /** - * Sound buffers: frequency, in units of Hertz [Hz]. - * This is the number of samples per second. Half of the - * sample frequency marks the maximum significant - * frequency component. + * @deprecated This token is a relict of the early OpenAL days and is + * no longer supported. Neither the OpenAL spec nor OpenAL Soft define + * it. */ + @Deprecated int AL_DATA = 0x2005; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |