Ardour  8.7-15-gadf511264b
resampler.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2006-2012 Fons Adriaensen <fons@linuxaudio.org>
4 //
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 3 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, see <http://www.gnu.org/licenses/>.
17 //
18 // ----------------------------------------------------------------------------
19 
20 
21 #ifndef _ZITA_RESAMPLER_H_
22 #define _ZITA_RESAMPLER_H_
23 
26 
27 namespace ArdourZita {
28 
30 {
31 
32 public:
33 
34  Resampler (void);
35  ~Resampler (void);
36 
37  int setup (unsigned int fs_inp,
38  unsigned int fs_out,
39  unsigned int nchan,
40  unsigned int hlen);
41 
42  int setup (unsigned int fs_inp,
43  unsigned int fs_out,
44  unsigned int nchan,
45  unsigned int hlen,
46  double frel);
47 
48  void clear (void);
49  int reset (void);
50  int nchan (void) const { return _nchan; }
51  int inpsize (void) const;
52  double inpdist (void) const;
53  int process (void);
54 
55  unsigned int inp_count;
56  unsigned int out_count;
57  float *inp_data;
58  float *out_data;
59  void *inp_list;
60  void *out_list;
61 
62 private:
63 
65  unsigned int _nchan;
66  unsigned int _inmax;
67  unsigned int _index;
68  unsigned int _nread;
69  unsigned int _nzero;
70  unsigned int _phase;
71  unsigned int _pstep;
72  float *_buff;
73  void *_dummy [8];
74 };
75 
76 };
77 
78 #endif
unsigned int _nchan
Definition: resampler.h:65
unsigned int _phase
Definition: resampler.h:70
int inpsize(void) const
int nchan(void) const
Definition: resampler.h:50
Resampler_table * _table
Definition: resampler.h:64
unsigned int _index
Definition: resampler.h:67
int setup(unsigned int fs_inp, unsigned int fs_out, unsigned int nchan, unsigned int hlen, double frel)
int setup(unsigned int fs_inp, unsigned int fs_out, unsigned int nchan, unsigned int hlen)
unsigned int _pstep
Definition: resampler.h:71
unsigned int _inmax
Definition: resampler.h:66
unsigned int inp_count
Definition: resampler.h:55
unsigned int out_count
Definition: resampler.h:56
double inpdist(void) const
unsigned int _nread
Definition: resampler.h:68
unsigned int _nzero
Definition: resampler.h:69
#define LIBZRESAMPLER_API