Example #1
0
// Process a block of audio (audio thread, must be RT safe).
static void
run(LV2_Handle instance, uint32_t n_samples)
{
	ecl_import_current_thread(ECL_NIL, ECL_NIL);
	// Do something
	ecl_release_current_thread();
}
Example #2
0
static void *
thread_entry_point(void *data)
{
        cl_object form = (cl_object)data;

        /*
         * This is the entry point of the threads we have created.
         * These threads have no valid lisp environment. The following
         * routine initializes the lisp and makes it ready for working
         * in this thread.
         */
        ecl_import_current_thread(ECL_NIL, ECL_NIL);

        /*
         * Here we execute some lisp code code.
         */
        cl_eval(form);

        /*
         * Finally, when we exit the thread we have to release the
         * resources allocated by the lisp environment.
         */
        ecl_release_current_thread();
        return NULL;
}
Example #3
0
// Connect a port to a buffer (audio thread, must be RT safe).
static void
connect_port(LV2_Handle instance,
             uint32_t   port,
             void*      data)
{
	int lv2_handle_index;
	HandleDescAssoc *handle_assoc = NULL;

	ecl_import_current_thread(ECL_NIL, ECL_NIL);

	// reverse map the handle back to a pointer to the HandleDesc
	// handle_assoc = get_handle_desc_address(instance);

	// stuff

	ecl_release_current_thread();
}