Esempio n. 1
0
 public static FMOD_RESULT File_GetDiskBusy(IntBuffer busy) {
   if (busy != null && !busy.isDirect()) {
     throw new NonDirectBufferException();
   }
   int javaResult = FmodExJNI.FmodEx_File_GetDiskBusy(busy, BufferUtils.getPositionInBytes(busy));
   return FMOD_RESULT.get(javaResult);
 }
Esempio n. 2
0
 public static FMOD_RESULT Memory_Initialize(
     ByteBuffer poolmem,
     int poollen,
     FMOD_MEMORY_ALLOCCALLBACK useralloc,
     FMOD_MEMORY_REALLOCCALLBACK userrealloc,
     FMOD_MEMORY_FREECALLBACK userfree,
     int memtypeflags) {
   if (poolmem != null && !poolmem.isDirect()) {
     throw new NonDirectBufferException();
   }
   if (useralloc != null && userrealloc != null && userfree != null) {
     CallbackManager.addCallback(25, useralloc, 0);
     CallbackManager.addCallback(27, userrealloc, 0);
     CallbackManager.addCallback(26, userfree, 0);
   } else {
     useralloc = null;
     userrealloc = null;
     userfree = null;
   }
   int javaResult =
       FmodExJNI.FmodEx_Memory_Initialize(
           poolmem,
           BufferUtils.getPositionInBytes(poolmem),
           poollen,
           useralloc == null ? false : true,
           userrealloc == null ? false : true,
           userfree == null ? false : true,
           memtypeflags);
   return FMOD_RESULT.get(javaResult);
 }
Esempio n. 3
0
 public static FMOD_RESULT Debug_GetLevel(IntBuffer level) {
   if (level != null && !level.isDirect()) {
     throw new NonDirectBufferException();
   }
   int javaResult = FmodExJNI.FmodEx_Debug_GetLevel(level, BufferUtils.getPositionInBytes(level));
   return FMOD_RESULT.get(javaResult);
 }
Esempio n. 4
0
 public static FMOD_RESULT Memory_GetStats(
     IntBuffer currentalloced, IntBuffer maxalloced, boolean blocking) {
   if (currentalloced != null && !currentalloced.isDirect()) {
     throw new NonDirectBufferException();
   }
   if (maxalloced != null && !maxalloced.isDirect()) {
     throw new NonDirectBufferException();
   }
   int javaResult =
       FmodExJNI.FmodEx_Memory_GetStats(
           currentalloced,
           BufferUtils.getPositionInBytes(currentalloced),
           maxalloced,
           BufferUtils.getPositionInBytes(maxalloced),
           blocking);
   return FMOD_RESULT.get(javaResult);
 }