/[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 3054 - (hide annotations) (download)
Thu Dec 15 12:47:45 2016 UTC (7 years, 4 months ago) by schoenebeck
File size: 3017 byte(s)
* Fixed numerous compiler warnings.
* Bumped version (2.0.0.svn32).

1 schoenebeck 1722 /***************************************************************************
2     * *
3 schoenebeck 3054 * Copyright (C) 2008 - 2016 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 schoenebeck 3054 return (uint) vInputChannels.size();
51 schoenebeck 1722 }
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 schoenebeck 3054 return (uint) vOutputChannels.size();
60 schoenebeck 1722 }
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 schoenebeck 3054 return (uint) vInputControls.size();
69 schoenebeck 2124 }
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