OAL patches by Ciardhubh

This commit is contained in:
Brian Matzon 2010-07-14 13:12:24 +00:00
parent be84d03799
commit 6d72727f0a
4 changed files with 23 additions and 20 deletions

View file

@ -59,6 +59,9 @@ public final class ALC11 {
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

View file

@ -191,7 +191,7 @@ public class OpenALInfo {
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();

View file

@ -86,7 +86,7 @@ static jstring JNICALL Java_org_lwjgl_openal_ALC10_nalcGetString (JNIEnv *env, j
int length;
int i=1;
if(alcString == NULL) {
if (alcString == NULL) {
return NULL;
}
@ -94,14 +94,21 @@ static jstring JNICALL Java_org_lwjgl_openal_ALC10_nalcGetString (JNIEnv *env, j
// 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);

View file

@ -250,35 +250,28 @@ public interface AL10 {
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;
/**