FMOD_Studio_System_LoadBankMemory() приватный Метод

private FMOD_Studio_System_LoadBankMemory ( IntPtr studiosystem, IntPtr buffer, int length, LOAD_MEMORY_MODE mode, LOAD_BANK_FLAGS flags, IntPtr &bank ) : RESULT
studiosystem System.IntPtr
buffer System.IntPtr
length int
mode LOAD_MEMORY_MODE
flags LOAD_BANK_FLAGS
bank System.IntPtr
Результат RESULT
Пример #1
0
        public RESULT loadBankMemory(byte[] buffer, LOAD_BANK_FLAGS flags, out Bank bank)
        {
            bank = null;
            IntPtr raw    = 0;
            RESULT rESULT = System.FMOD_Studio_System_LoadBankMemory(this.rawPtr, buffer, buffer.Length, LOAD_MEMORY_MODE.LOAD_MEMORY, flags, out raw);

            if (rESULT != RESULT.OK)
            {
                return(rESULT);
            }
            bank = new Bank(raw);
            return(rESULT);
        }
Пример #2
0
        public RESULT loadBankMemory(byte[] buffer, LOAD_BANK_FLAGS flags, out Bank bank)
        {
            bank = null;
            IntPtr   raw      = 0;
            GCHandle gCHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
            IntPtr   buffer2  = gCHandle.AddrOfPinnedObject();
            RESULT   rESULT   = System.FMOD_Studio_System_LoadBankMemory(this.rawPtr, buffer2, buffer.Length, LOAD_MEMORY_MODE.LOAD_MEMORY, flags, out raw);

            gCHandle.Free();
            if (rESULT != RESULT.OK)
            {
                return(rESULT);
            }
            bank = new Bank(raw);
            return(rESULT);
        }