no message

This commit is contained in:
Brian Matzon 2002-12-14 12:38:39 +00:00
parent b7de8b69dc
commit 8c0c280a12
1 changed files with 68 additions and 68 deletions

View File

@ -29,7 +29,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.openal;
package org.lwjgl.openal;
/**
* $Id$
@ -41,106 +41,106 @@
* @version $Revision$
*/
public class ALUT {
/** Has the ALUT object been created? */
protected static boolean created;
protected static boolean created;
static {
initialize();
}
/** Creates a new instance of ALUT */
public ALUT() {
}
/**
* Override to provide any initialization code after creation.
*/
/** Creates a new instance of ALUT */
public ALUT() {
}
/**
* Override to provide any initialization code after creation.
*/
protected void init() {
}
/**
* Static initialization
*/
private static void initialize() {
System.loadLibrary(org.lwjgl.Sys.getLibraryName());
}
/**
* Creates the ALUT instance
*
* @throws Exception if a failiure occured in the ALUT creation process
*/
/**
* Creates the ALUT instance
*
* @throws Exception if a failiure occured in the ALUT creation process
*/
public void create() throws Exception {
if (created) {
return;
}
}
if (!nCreate()) {
throw new Exception("ALUT instance could not be created.");
}
}
created = true;
init();
init();
}
/**
* Native method to create ALUT instance
*
* @return true if the ALUT creation process succeeded
*/
protected native boolean nCreate();
/**
* Calls whatever destruction rutines that are needed
*/
public void destroy() {
if (!created) {
return;
}
created = false;
nDestroy();
}
created = false;
nDestroy();
}
/**
* Native method the destroy the ALUT
*/
protected native void nDestroy();
/**
* Initializes the OpenAL engine
*
* @param args String array of arguments to engine
*/
public native void init(String[] args);
/**
* Loads a wave file into memory
*
* @param file name of file to load (in current working directory)
* @return ALUTLoadWAVData object containing information regarding wave data loaded
*/
public native ALUTLoadWAVData loadWAVFile(String file);
/**
* Loads a byte buffer into memory
*
* @param buffer buffer address containing file
* @return ALUTLoadWAVData object containing information regarding wave data loaded
*/
public native ALUTLoadWAVData loadWAVMemory(int buffer);
/**
* Unloads the specified file from memory
*
* @param format OpenAL format specifier
* @param data address of data (pointer)
* @param size size of the data in bytes
* @param freq frequency of the data
*/
public native void unloadWAV(int format, int data, int size, int freq);
/**
* Deinitializes the OpenAL engine
*/
public native void exit();
protected native void nDestroy();
/**
* Initializes the OpenAL engine
*
* @param args String array of arguments to engine
*/
public native void init(String[] args);
/**
* Loads a wave file into memory
*
* @param file name of file to load (in current working directory)
* @return ALUTLoadWAVData object containing information regarding wave data loaded
*/
public native ALUTLoadWAVData loadWAVFile(String file);
/**
* Loads a byte buffer into memory
*
* @param buffer buffer address containing file
* @return ALUTLoadWAVData object containing information regarding wave data loaded
*/
public native ALUTLoadWAVData loadWAVMemory(int buffer);
/**
* Unloads the specified file from memory
*
* @param format OpenAL format specifier
* @param data address of data (pointer)
* @param size size of the data in bytes
* @param freq frequency of the data
*/
public native void unloadWAV(int format, int data, int size, int freq);
/**
* Deinitializes the OpenAL engine
*/
public native void exit();
}