FMOD_Sound_GetSoundGroup() private method

private FMOD_Sound_GetSoundGroup ( IntPtr sound, IntPtr &soundgroup ) : RESULT
sound System.IntPtr
soundgroup System.IntPtr
return RESULT
示例#1
0
        public RESULT getSoundGroup(ref SoundGroup soundgroup)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

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

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (soundgroup == null)
                {
                    SoundGroup soundGroup = new SoundGroup();
                    soundGroup.setRaw(raw);
                    soundgroup = soundGroup;
                }
                else
                {
                    soundgroup.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }