LMMS
Loading...
Searching...
No Matches
resampler-table.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2//
3// Copyright (C) 2006-2023 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 __RESAMPLER_TABLE_H
22#define __RESAMPLER_TABLE_H
23
24
25#include "CarlaDefines.h"
26
27#include <pthread.h>
28
29
31{
32private:
33
34 friend class Resampler_table;
35
36 Resampler_mutex (void) { pthread_mutex_init (&_mutex, nullptr); }
37 ~Resampler_mutex (void) { pthread_mutex_destroy (&_mutex); }
38 void lock (void) { pthread_mutex_lock (&_mutex); }
39 void unlock (void) { pthread_mutex_unlock (&_mutex); }
40
41 pthread_mutex_t _mutex;
42};
43
44
46{
47private:
48
49 Resampler_table (double fr, unsigned int hl, unsigned int np);
51
52 friend class Resampler;
53 friend class VResampler;
54
56 unsigned int _refc;
57 float *_ctab;
58 double _fr;
59 unsigned int _hl;
60 unsigned int _np;
61
62 static Resampler_table *create (double fr, unsigned int hl, unsigned int np);
63 static void destroy (Resampler_table *T);
64
67};
68
69
70#endif
Definition resampler-table.h:31
void lock(void)
Definition resampler-table.h:38
Resampler_mutex(void)
Definition resampler-table.h:36
~Resampler_mutex(void)
Definition resampler-table.h:37
void unlock(void)
Definition resampler-table.h:39
friend class Resampler_table
Definition resampler-table.h:34
pthread_mutex_t _mutex
Definition resampler-table.h:41
static Resampler_mutex _mutex
Definition resampler-table.h:66
Resampler_table * _next
Definition resampler-table.h:55
double _fr
Definition resampler-table.h:58
friend class Resampler
Definition resampler-table.h:52
static void destroy(Resampler_table *T)
unsigned int _hl
Definition resampler-table.h:59
~Resampler_table(void)
Resampler_table(double fr, unsigned int hl, unsigned int np)
unsigned int _refc
Definition resampler-table.h:56
static Resampler_table * create(double fr, unsigned int hl, unsigned int np)
friend class VResampler
Definition resampler-table.h:53
unsigned int _np
Definition resampler-table.h:60
static Resampler_table * _list
Definition resampler-table.h:65
float * _ctab
Definition resampler-table.h:57