~ubuntu-branches/ubuntu/hardy/lmms/hardy

« back to all changes in this revision

Viewing changes to plugins/ladspa_effect/ladspa_effect.h

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Doerffel
  • Date: 2007-09-17 15:00:24 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070917150024-mo0zk4ks81jawqii
Tags: 0.3.0-1ubuntu1
* Resynchronized with Debian (LP: #139759, LP: #90806, LP: #102639,
  LP: #113447, LP: #121172, LP: #124890)
* reverted changes from 0.2.1-1.1ubuntu1 as upstream merged/included them

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ladspa_effect.h - class for handling LADSPA effect plugins
 
3
 *
 
4
 * Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
 
5
 * 
 
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public
 
19
 * License along with this program (see COPYING); if not, write to the
 
20
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
 * Boston, MA 02110-1301 USA.
 
22
 *
 
23
 */
 
24
 
 
25
#ifndef _LADSPA_EFFECT_H
 
26
#define _LADSPA_EFFECT_H
 
27
 
 
28
#ifdef HAVE_CONFIG_H
 
29
#include <config.h>
 
30
#endif
 
31
 
 
32
#include "qt3support.h"
 
33
 
 
34
#include "effect.h"
 
35
#include "engine.h"
 
36
#include "ladspa_2_lmms.h"
 
37
#include "mixer.h"
 
38
#include "ladspa_control.h"
 
39
#include "ladspa_control_dialog.h"
 
40
#include "ladspa_base.h"
 
41
#include "main_window.h"
 
42
 
 
43
 
 
44
typedef vvector<port_desc_t *> multi_proc_t;
 
45
 
 
46
class ladspaEffect : public effect
 
47
{
 
48
public:
 
49
        ladspaEffect( const descriptor::subPluginFeatures::key * _key );
 
50
        virtual ~ladspaEffect();
 
51
 
 
52
        virtual bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf,
 
53
                                                        const fpp_t _frames );
 
54
        
 
55
        void FASTCALL setControl( Uint16 _control, LADSPA_Data _data );
 
56
 
 
57
        inline const multi_proc_t & getControls( void )
 
58
        {
 
59
                return( m_controls );
 
60
        }
 
61
 
 
62
        virtual inline QString publicName( void ) const
 
63
        {
 
64
                return( m_effName );
 
65
        }
 
66
        
 
67
        inline void setPublicName( const QString & _name )
 
68
        {
 
69
                m_effName = _name;
 
70
        }
 
71
 
 
72
        virtual inline effectControlDialog * createControlDialog(
 
73
                                                                track * _track )
 
74
        {
 
75
                return( new ladspaControlDialog(
 
76
                                        engine::getMainWindow()->workspace(),
 
77
                                                        this, _track ) );
 
78
        }
 
79
 
 
80
        inline virtual QString nodeName( void ) const
 
81
        {
 
82
                return( "ladspaeffect" );
 
83
        }
 
84
 
 
85
 
 
86
private:
 
87
        QString m_effName;
 
88
        ladspa_key_t m_key;
 
89
        ladspa2LMMS * m_ladspa;
 
90
        Uint16 m_effectChannels;
 
91
        Uint16 m_portCount;
 
92
        fpp_t m_bufferSize;
 
93
                        
 
94
        const LADSPA_Descriptor * m_descriptor;
 
95
        vvector<LADSPA_Handle> m_handles;
 
96
 
 
97
        vvector<multi_proc_t> m_ports;
 
98
        multi_proc_t m_controls;
 
99
} ;
 
100
 
 
101
#endif