Exemplo n.º 1
0
        /// <summary>
        /// Sets the callback function for the specified cExternalMessageInterface component instance.
        /// The function will get called whenever the component receives a message.
        /// </summary>
        /// <param name="componentName">Instance name of the cExternalMessageInterface component for which to set the callback.</param>
        /// <exception cref="ObjectDisposedException">
        /// Thrown if the object has already been disposed.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Thrown if openSMILE has not been initialized yet.
        /// </exception>
        /// <exception cref="OpenSmileException">
        /// Thrown for internal openSMILE errors.
        /// </exception>
        public void ExternalMessageInterfaceSetJsonCallback(string componentName, ExternalMessageInterfaceJsonCallback callback)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(typeof(OpenSMILE).FullName);
            }
            if (smileObj == IntPtr.Zero)
            {
                throw new InvalidOperationException("openSMILE must be initialized first.");
            }

            CheckSmileResult(OpenSmileApi.Smile_extmsginterface_set_json_msg_callback(smileObj, componentName, callback, IntPtr.Zero));
        }
Exemplo n.º 2
0
 public static extern OpenSmileResult Smile_extmsginterface_set_json_msg_callback(IntPtr smileobj, string componentName, ExternalMessageInterfaceJsonCallback callback, IntPtr param);