CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Processing
Synthesis
IFFT_base.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
23
#ifndef _IFFT_base_
24
#define _IFFT_base_
25
26
#include <typeinfo>
// for bad_cast definition
27
#include "
Processing.hxx
"
28
#include "
InPort.hxx
"
29
#include "
AudioOutPort.hxx
"
30
#include "
ProcessingData.hxx
"
31
#include "
DataTypes.hxx
"
32
#include "
Spectrum.hxx
"
33
34
#include "
IFFTConfig.hxx
"
35
36
namespace
CLAM {
37
38
class
Audio;
39
class
Spectrum;
40
42
class
IFFT_base
:
public
Processing
43
{
44
protected
:
45
enum
{
CLAM_DEFAULT_IFFT_SIZE
=1024};
46
48
IFFTConfig
mConfig
;
50
int
mSize
;
51
52
InPort<Spectrum>
mInput
;
53
AudioOutPort
mOutput
;
54
55
// Control change callback function
56
void
ChangeSize
(
int
n);
57
int
GetSize
() {
return
mSize
;}
58
59
virtual
bool
ConcreteConfigure
(
const
ProcessingConfig
&) = 0;
60
61
public
:
62
63
IFFT_base
();
64
65
virtual
~IFFT_base
();
66
67
const
char
*
GetClassName
()
const
{
return
"IFFT"
;}
68
71
virtual
const
ProcessingConfig
&
GetConfig
()
const
{
return
mConfig
;}
72
75
virtual
bool
Do
(
void
) = 0;
76
80
virtual
bool
Do
(
const
Spectrum
& in,
Audio
&out)
const
= 0;
81
82
// Input/Output configuration methods
83
85
virtual
bool
SetPrototypes
(
const
Spectrum
& in,
const
Audio
&out) = 0;
86
88
virtual
bool
SetPrototypes
() {
return
false
;}
89
91
virtual
bool
UnsetPrototypes
() {
return
false
;}
92
93
// Enable/Disable methods. Maybe we should not be deriving
94
// these ones in IFFT subclasses. (IFFT implementations will
95
// probably be always memoryless.
96
97
virtual
bool
MayDisableExecution
()
const
{
return
false
;}
98
99
};
100
}
101
102
#endif // _IFFT_base_
103
Generated by
1.8.1