FMOD.Sound.FMOD_Sound_GetSubSound C# (CSharp) Method

FMOD_Sound_GetSubSound() private method

private FMOD_Sound_GetSubSound ( IntPtr sound, int index, IntPtr &subsound ) : RESULT
sound System.IntPtr
index int
subsound System.IntPtr
return RESULT
        private static extern RESULT FMOD_Sound_GetSubSound             (IntPtr sound, int index, out IntPtr subsound);
        [DllImport(VERSION.dll)]

Usage Example

示例#1
0
        public RESULT getSubSound(int index, ref Sound subsound)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = Sound.FMOD_Sound_GetSubSound(soundraw, index, ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (subsound == null)
                {
                    Sound sound = new Sound();
                    sound.setRaw(raw);
                    subsound = sound;
                }
                else
                {
                    subsound.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }
Sound