/[svn]/linuxsampler/trunk/src/effects/Effect.cpp
ViewVC logotype

Annotation of /linuxsampler/trunk/src/effects/Effect.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2135 - (hide annotations) (download)
Thu Sep 30 20:00:43 2010 UTC (13 years, 7 months ago) by schoenebeck
File size: 2996 byte(s)
* added and implemented a set of 19 new LSCP commands for controlling
  internal effects:
  - added LSCP command "GET AVAILABLE_EFFECTS"
  - added LSCP command "LIST AVAILABLE_EFFECTS"
  - added LSCP command "GET EFFECT INFO <effect-index>"
  - added LSCP command "CREATE EFFECT_INSTANCE <effect-index>"
  - added LSCP command
    "CREATE EFFECT_INSTANCE <effect-system> <module> <effect-name>"
  - added LSCP command "DESTROY EFFECT_INSTANCE <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCES"
  - added LSCP command "LIST EFFECT_INSTANCES"
  - added LSCP command "GET EFFECT_INSTANCE INFO <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCE_INPUT_CONTROL INFO
    <effect-instance> <input-control>"
  - added LSCP command "SET EFFECT_INSTANCE_INPUT_CONTROL <effect-instance>
    <input-control> <value>"
  - added LSCP command "GET MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "LIST MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "ADD MASTER_EFFECT_CHAIN <audio-device>"
  - added LSCP command
    "REMOVE MASTER_EFFECT_CHAIN <audio-device> <effect-chain>"
  - added LSCP command
    "GET MASTER_EFFECT_CHAIN INFO <audio-device> <effect-chain>"
  - added LSCP command "APPEND MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
  - added LSCP command "INSERT MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance> <effect-chain-pos>"
  - added LSCP command "REMOVE MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
* bumped version to 1.0.0.cvs7

1 schoenebeck 1722 /***************************************************************************
2     * *
3 schoenebeck 2124 * Copyright (C) 2008, 2010 Christian Schoenebeck *
4 schoenebeck 1722 * *
5     * This program is free software; you can redistribute it and/or modify *
6     * it under the terms of the GNU General Public License as published by *
7     * the Free Software Foundation; either version 2 of the License, or *
8     * (at your option) any later version. *
9     * *
10     * This program is distributed in the hope that it will be useful, *
11     * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13     * GNU General Public License for more details. *
14     * *
15     * You should have received a copy of the GNU General Public License *
16     * along with this program; if not, write to the Free Software *
17     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
18     * MA 02111-1307 USA *
19     ***************************************************************************/
20    
21     #include "Effect.h"
22    
23     namespace LinuxSampler {
24    
25 schoenebeck 2135 Effect::Effect() {
26     pParent = NULL;
27     iID = -1;
28     }
29    
30 schoenebeck 1722 Effect::~Effect() {
31     for (int i = 0; i < vInputChannels.size(); ++i)
32     delete vInputChannels[i];
33     for (int i = 0; i < vOutputChannels.size(); ++i)
34     delete vOutputChannels[i];
35 schoenebeck 2124 for (int i = 0; i < vInputControls.size(); ++i)
36     delete vInputControls[i];
37     for (int i = 0; i < vOutputControls.size(); ++i)
38     delete vOutputControls[i];
39 schoenebeck 1722 }
40    
41 schoenebeck 2124 void Effect::InitEffect(AudioOutputDevice* pDevice) throw (Exception) {
42 schoenebeck 1722 }
43    
44     AudioChannel* Effect::InputChannel(uint ChannelIndex) const {
45     if (ChannelIndex >= vInputChannels.size()) return NULL;
46     return vInputChannels[ChannelIndex];
47     }
48    
49     uint Effect::InputChannelCount() const {
50     return vInputChannels.size();
51     }
52    
53     AudioChannel* Effect::OutputChannel(uint ChannelIndex) const {
54     if (ChannelIndex >= vOutputChannels.size()) return NULL;
55     return vOutputChannels[ChannelIndex];
56     }
57    
58     uint Effect::OutputChannelCount() const {
59     return vOutputChannels.size();
60     }
61    
62 schoenebeck 2124 EffectControl* Effect::InputControl(uint ControlIndex) const {
63     if (ControlIndex >= vInputControls.size()) return NULL;
64     return vInputControls[ControlIndex];
65     }
66    
67     uint Effect::InputControlCount() const {
68     return vInputControls.size();
69     }
70    
71 schoenebeck 2135 void Effect::SetParent(void* pParent) {
72     this->pParent = pParent;
73     }
74    
75     void* Effect::Parent() const {
76     return pParent;
77     }
78    
79     void Effect::SetId(int id) {
80     iID = id;
81     }
82    
83     int Effect::ID() const {
84     return iID;
85     }
86    
87 schoenebeck 1722 } // namespace LinuxSampler

  ViewVC Help
Powered by ViewVC