~ubuntu-branches/ubuntu/hoary/jamin/hoary

« back to all changes in this revision

Viewing changes to src/plugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Jordens
  • Date: 2004-01-17 12:14:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040117121437-3idr2e2m3k5jnm9n
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2003 Steve Harris
 
3
 *
 
4
 *  This program is free software; you can redistribute it and/or modify
 
5
 *  it under the terms of the GNU General Public License as published by
 
6
 *  the Free Software Foundation; either version 2 of the License, or
 
7
 *  (at your option) any later version.
 
8
 *
 
9
 *  This program is distributed in the hope that it will be useful,
 
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *  GNU General Public License for more details.
 
13
 *
 
14
 *  $Id: plugin.h,v 1.2 2003/11/19 15:28:17 theno23 Exp $
 
15
 */
 
16
 
 
17
#ifndef PLUGIN_H
 
18
#define PLUGIN_H
 
19
 
 
20
#include "ladspa.h"
 
21
 
 
22
typedef struct {
 
23
        void *dl;
 
24
        LADSPA_Descriptor *descriptor;
 
25
} plugin;
 
26
 
 
27
void plugin_init();
 
28
 
 
29
plugin *plugin_load(char *file);
 
30
 
 
31
LADSPA_Handle plugin_instantiate(plugin *p, unsigned long fs);
 
32
 
 
33
static inline void plugin_connect_port(plugin *p, LADSPA_Handle h, unsigned
 
34
                long port, LADSPA_Data *data);
 
35
 
 
36
static inline void plugin_run(plugin *p, LADSPA_Handle *h, unsigned long
 
37
                sample_count);
 
38
 
 
39
static inline void plugin_connect_port(plugin *p, LADSPA_Handle h, unsigned
 
40
                long port, LADSPA_Data *data)
 
41
{
 
42
        (*p->descriptor->connect_port)(h, port, data);
 
43
}
 
44
 
 
45
static inline void plugin_run(plugin *p, LADSPA_Handle *h, unsigned long
 
46
                sample_count)
 
47
{
 
48
        (*p->descriptor->run)(h, sample_count);
 
49
}
 
50
 
 
51
#endif