FMOD_ChannelGroup_GetGroup() private method

private FMOD_ChannelGroup_GetGroup ( IntPtr channelgroup, int index, IntPtr &group ) : RESULT
channelgroup System.IntPtr
index int
group System.IntPtr
return RESULT
Exemplo n.º 1
0
        public RESULT getGroup(int index, ref ChannelGroup group)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = ChannelGroup.FMOD_ChannelGroup_GetGroup(channelgroupraw, index, ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (group == null)
                {
                    ChannelGroup channelGroup = new ChannelGroup();
                    channelGroup.setRaw(raw);
                    group = channelGroup;
                }
                else
                {
                    group.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }