FMOD_Studio_Bus_GetPath() private method

private FMOD_Studio_Bus_GetPath ( IntPtr bus, [ path, int size, int &retrieved ) : RESULT
bus System.IntPtr
path [
size int
retrieved int
return RESULT
Esempio n. 1
0
        public RESULT getPath(out string path)
        {
            path = null;
            byte[] array  = new byte[256];
            int    num    = 0;
            RESULT rESULT = Bus.FMOD_Studio_Bus_GetPath(this.rawPtr, array, array.Length, out num);

            if (rESULT == RESULT.ERR_TRUNCATED)
            {
                array  = new byte[num];
                rESULT = Bus.FMOD_Studio_Bus_GetPath(this.rawPtr, array, array.Length, out num);
            }
            if (rESULT == RESULT.OK)
            {
                path = Encoding.UTF8.GetString(array, 0, num - 1);
            }
            return(rESULT);
        }