]> git.0d.be Git - jack_mixer.git/blob - scale.h
Merge branch 'master' into mergebranch
[jack_mixer.git] / scale.h
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
3  *
4  *   This file is part of jack_mixer
5  *
6  *   Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name>
7  *
8  *   This program is free software; you can redistribute it and/or modify
9  *   it under the terms of the GNU General Public License as published by
10  *   the Free Software Foundation; version 2 of the License
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  *****************************************************************************/
22
23 #ifndef JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
24 #define JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED
25
26 typedef void * jack_mixer_scale_t;
27
28 jack_mixer_scale_t
29 scale_create();
30
31 bool
32 scale_add_threshold(
33   jack_mixer_scale_t scale,
34   float db,
35   float scale_value);
36
37 void
38 scale_calculate_coefficients(
39   jack_mixer_scale_t scale);
40
41 double
42 scale_db_to_scale(
43   jack_mixer_scale_t scale,
44   double db);
45
46 double
47 scale_scale_to_db(
48   jack_mixer_scale_t scale,
49   double scale_value);
50
51 void
52 scale_destroy(
53   jack_mixer_scale_t scale);
54
55 #endif /* #ifndef JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */