示例#1
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);
 }
示例#2
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);
 }
示例#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);
 }
示例#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);
 }
示例#5
0
 public static FMOD_RESULT Debug_SetLevel(int level) {
   int javaResult = FmodExJNI.FmodEx_Debug_SetLevel(level);
   return FMOD_RESULT.get(javaResult);
 }
示例#6
0
 public static String FMOD_ErrorString(FMOD_RESULT errCode) {
   return FmodExJNI.FMOD_ErrorString(errCode.asInt());
 }
示例#7
0
 public static FMOD_RESULT System_Create(System system) {
   int javaResult = FmodExJNI.FmodEx_System_Create(system);
   return FMOD_RESULT.get(javaResult);
 }
示例#8
0
 public static FMOD_RESULT File_SetDiskBusy(int busy) {
   int javaResult = FmodExJNI.FmodEx_File_SetDiskBusy(busy);
   return FMOD_RESULT.get(javaResult);
 }