summaryrefslogtreecommitdiff
path: root/songdbj/org/tritonus/share/sampled/TVolumeUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'songdbj/org/tritonus/share/sampled/TVolumeUtils.java')
-rw-r--r--songdbj/org/tritonus/share/sampled/TVolumeUtils.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/songdbj/org/tritonus/share/sampled/TVolumeUtils.java b/songdbj/org/tritonus/share/sampled/TVolumeUtils.java
deleted file mode 100644
index 0eaf1388da..0000000000
--- a/songdbj/org/tritonus/share/sampled/TVolumeUtils.java
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * TVolumeUtils.java
3 *
4 * This file is part of Tritonus: http://www.tritonus.org/
5 */
6
7/*
8 * Copyright (c) 1999 by Matthias Pfisterer
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Library General Public License as published
12 * by the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * You should have received a copy of the GNU Library General Public
21 * License along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25/*
26|<--- this code is formatted to fit into 80 columns --->|
27*/
28
29package org.tritonus.share.sampled;
30
31
32
33public class TVolumeUtils
34{
35 private static final double FACTOR1 = 20.0 / Math.log(10.0);
36 private static final double FACTOR2 = 1 / 20.0;
37
38
39
40 public static double lin2log(double dLinear)
41 {
42 return FACTOR1 * Math.log(dLinear);
43 }
44
45
46
47 public static double log2lin(double dLogarithmic)
48 {
49 return Math.pow(10.0, dLogarithmic * FACTOR2);
50 }
51}
52
53
54
55/*** TVolumeUtils.java ***/