Logo Search packages:      
Sourcecode: jalv version File versions  Download package

jalv_internal.h

/*
  Copyright 2007-2011 David Robillard <http://drobilla.net>

  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
  copyright notice and this permission notice appear in all copies.

  THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef JALV_INTERNAL_H
#define JALV_INTERNAL_H

#include <semaphore.h>

#include <jack/jack.h>
#include <jack/ringbuffer.h>

#include "lilv/lilv.h"

#include "suil/suil.h"

#include "symap.h"

#ifdef __cplusplus
extern "C" {
#endif

#define JALV_UI_UPDATE_HZ 15

00037 typedef struct {
00038       LilvWorld*         world;         /**< Lilv World */
00039       Symap*             symap;         /**< Symbol (URI) map */
00040       jack_client_t*     jack_client;   /**< Jack client */
00041       jack_ringbuffer_t* ui_events;     /**< Port events from UI */
00042       jack_ringbuffer_t* plugin_events; /**< Port events from plugin */
00043       sem_t*             done;          /**< Exit semaphore */
00044       const LilvPlugin*  plugin;        /**< Plugin class (RDF data) */
00045       const LilvUI*      ui;            /**< Plugin UI (RDF data) */
00046       LilvInstance*      instance;      /**< Plugin instance (shared library) */
00047       SuilInstance*      ui_instance;   /**< Plugin UI instance (shared library) */
00048       struct Port*       ports;         /**< Port array of size num_ports */
00049       uint32_t           num_ports;     /**< Size of the two following arrays: */
00050       jack_nframes_t     sample_rate;   /**< Sample rate */
00051       jack_nframes_t     event_delta_t; /**< Frames since last update sent to UI */
00052       LilvNode*          input_class;   /**< Input port class (URI) */
00053       LilvNode*          output_class;  /**< Output port class (URI) */
00054       LilvNode*          control_class; /**< Control port class (URI) */
00055       LilvNode*          audio_class;   /**< Audio port class (URI) */
00056       LilvNode*          event_class;   /**< Event port class (URI) */
00057       LilvNode*          midi_class;    /**< MIDI event class (URI) */
00058       LilvNode*          optional;      /**< lv2:connectionOptional port property */
00059       uint32_t           midi_event_id; /**< MIDI event class ID */
} Jalv;

void
jalv_init(int* argc, char*** argv);

LilvNode*
jalv_native_ui_type(Jalv* jalv);

int
jalv_open_ui(Jalv*         jalv,
             SuilInstance* instance);

bool
jalv_emit_ui_events(Jalv* jalv);


#ifdef __cplusplus
} // extern "C"
#endif

#endif // JALV_INTERNAL_H

Generated by  Doxygen 1.6.0   Back to index