Ardour  8.7-15-gadf511264b
resampler-table.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_TABLE_H_
22 #define _ZITA_RESAMPLER_TABLE_H_
23 
24 #include <pthread.h>
26 
27 namespace ArdourZita {
28 
30 {
31 private:
32 
33  friend class Resampler_table;
34 
35  Resampler_mutex (void) { pthread_mutex_init (&_mutex, 0); }
36  ~Resampler_mutex (void) { pthread_mutex_destroy (&_mutex); }
37  void lock (void) { pthread_mutex_lock (&_mutex); }
38  void unlock (void) { pthread_mutex_unlock (&_mutex); }
39 
40  pthread_mutex_t _mutex;
41 };
42 
43 
45 {
46 private:
47  Resampler_table (double fr, unsigned int hl, unsigned int np);
49 
50  friend class Resampler;
51  friend class VResampler;
52  friend class VMResampler;
53 
55  unsigned int _refc;
56  float *_ctab;
57  double _fr;
58  unsigned int _hl;
59  unsigned int _np;
60 
61  static Resampler_table *create (double fr, unsigned int hl, unsigned int np);
62  static void destroy (Resampler_table *T);
63 
66 };
67 
68 };
69 
70 #endif
static void destroy(Resampler_table *T)
static Resampler_table * _list
static Resampler_mutex _mutex
static Resampler_table * create(double fr, unsigned int hl, unsigned int np)
Resampler_table(double fr, unsigned int hl, unsigned int np)
#define LIBZRESAMPLER_API