Exemplo n.º 1
0
        private void OnResponseCallback(
            ReaPi.ResponseHandle response,
            ReaPi.ConnectionIdentifier connection,
            ReaPi.ECommandId commandid,
            ReaPi.EErrorCode errorCode,
            IntPtr context)
        {
            int         error       = 0;
            ErrorStatus errorStatus = ReaPi.GetErrorStatus(response, out error);

            switch (commandid)
            {
            case ReaPi.ECommandId.CMD_SUBSCRIBEJOBSET:
                CmdSubscribeJobSetResponse(true);
                break;

            case ReaPi.ECommandId.CMD_UNSUBSCRIBEJOBSET:
                CmdSubscribeJobSetResponse(false);
                break;

            case ReaPi.ECommandId.CMD_GETIOCONFIGURATION:
                CmdGetIOConfigurationResponse(ReaPi.GetIOConfigurationFilename(response, out error));
                break;

            case ReaPi.ECommandId.CMD_GETIOOUTPUTLEVEL:
                CmdGetOutputLevelResponse(response, new GetIOOutputLevelResponseEventArgs(connection, response, commandid, ReaPi.GetErrorStatus(response, out error)));
                break;

            case ReaPi.ECommandId.CMD_SETIOOUTPUTLEVEL:
                CmdSetOutputLevelResponse();
                break;

            default:
                break;
            }
            ShowResponseError(response, connection, commandid.ToString(), errorCode);
        }