All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.openal.EXTStaticBuffer Maven / Gradle / Ivy

Go to download

A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.openal;

import java.nio.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;

/**
 * Native bindings to the {@code AL_EXT_static_buffer} extension.
 * 
 * 

This extension provides a means for the caller to avoid the overhead associated with the {@link AL10#alBufferData BufferData} call which performs a physical copy of the * data provided by the caller to internal buffers. When using the {@code AL_EXT_static_buffer} extension, OpenAL's internal buffers use the data pointer provided by * the caller for all data access.

*/ public class EXTStaticBuffer { protected EXTStaticBuffer() { throw new UnsupportedOperationException(); } static boolean isAvailable(ALCapabilities caps) { return checkFunctions( caps.alBufferDataStatic ); } // --- [ alBufferDataStatic ] --- /** * Unsafe version of: {@link #alBufferDataStatic BufferDataStatic} * * @param len the data buffer size, in bytes */ public static void nalBufferDataStatic(int buffer, int format, long data, int len, int freq) { long __functionAddress = AL.getICD().alBufferDataStatic; if (CHECKS) { check(__functionAddress); } invokePV(__functionAddress, buffer, format, data, len, freq); } /** * Sets the sample data of the specified buffer. * * @param buffer the buffer handle * @param format the data format * @param data the sample data * @param freq the data frequency */ public static void alBufferDataStatic(int buffer, int format, ByteBuffer data, int freq) { nalBufferDataStatic(buffer, format, memAddress(data), data.remaining(), freq); } /** * Sets the sample data of the specified buffer. * * @param buffer the buffer handle * @param format the data format * @param data the sample data * @param freq the data frequency */ public static void alBufferDataStatic(int buffer, int format, ShortBuffer data, int freq) { nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 1, freq); } /** * Sets the sample data of the specified buffer. * * @param buffer the buffer handle * @param format the data format * @param data the sample data * @param freq the data frequency */ public static void alBufferDataStatic(int buffer, int format, IntBuffer data, int freq) { nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 2, freq); } /** * Sets the sample data of the specified buffer. * * @param buffer the buffer handle * @param format the data format * @param data the sample data * @param freq the data frequency */ public static void alBufferDataStatic(int buffer, int format, FloatBuffer data, int freq) { nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 2, freq); } /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ public static void alBufferDataStatic(int buffer, int format, short[] data, int freq) { long __functionAddress = AL.getICD().alBufferDataStatic; if (CHECKS) { check(__functionAddress); } invokePV(__functionAddress, buffer, format, data, data.length << 1, freq); } /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ public static void alBufferDataStatic(int buffer, int format, int[] data, int freq) { long __functionAddress = AL.getICD().alBufferDataStatic; if (CHECKS) { check(__functionAddress); } invokePV(__functionAddress, buffer, format, data, data.length << 2, freq); } /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ public static void alBufferDataStatic(int buffer, int format, float[] data, int freq) { long __functionAddress = AL.getICD().alBufferDataStatic; if (CHECKS) { check(__functionAddress); } invokePV(__functionAddress, buffer, format, data, data.length << 2, freq); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy