Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff08db3e44 | |||
| 7431550d61 | |||
| 448910b8d7 | |||
| 991c4fbf8e | |||
| ced0aaa597 | |||
| 498247c793 | |||
| ad5c3808cd | |||
| c658dc6a50 | |||
|
|
100adec397 | ||
|
|
f4b793574d | ||
| d8c52575fb | |||
| 1b2945d9c4 | |||
| 1244bd60ed | |||
| b566b9e89e | |||
| 4a4d7f2a38 | |||
| f7848228a2 | |||
| 8c22315b15 | |||
| 718c982578 | |||
| be0f6a9f56 | |||
| 35874f5ca2 | |||
| a7fdfce094 | |||
| 5947c9a020 | |||
| 05408915b1 | |||
| 4635b5af0f | |||
| b362217d75 | |||
| cc48d49b5c | |||
| 391e54b993 | |||
| 49b6a92865 | |||
| fbe05367fa | |||
| eaf3080859 | |||
| 6ceec9ef85 | |||
| ac73711122 | |||
| 3cb0471027 | |||
| 38e7434730 | |||
| d8cd72809c |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
13
README.md
13
README.md
@@ -27,6 +27,7 @@ From here on much is controlled by key presses.
|
||||
* Press and hold "R" to record a new phrase - the screen flashes red while it's recording. The phrase is
|
||||
appended to the currently selected chapter, or to the last chapter if none is selected.
|
||||
* Press and hold "T" to record a new phrase that is the start of a new paragraph. This adds the "post paragraph" gap to the previous sentence. Otherwise it does the same as "R".
|
||||
* Press and hold "F" to record a "continuation" phrase. This sets the previous phrase's post-gap to be the "short" gap instead of the normal length gap.
|
||||
* Press "D" to delete the last phrase you recorded.
|
||||
* Press "E" to re-record the currently selected phrase.
|
||||
|
||||
@@ -71,3 +72,15 @@ files) is placed.
|
||||
|
||||
When you export the book as MP3 a new folder "export" is created within the book's folder where the MP3 files are placed.
|
||||
MP3 files are all tagged with the book title, chapter title, chapter number and comment.
|
||||
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
1. Check out this repo
|
||||
2. Install `ant` and `default-jdk`
|
||||
3. Install [git LFS support](https://help.github.com/articles/installing-git-large-file-storage/)
|
||||
4. Pull the large files with `git lfs pull`
|
||||
5. Build with `ant build`
|
||||
6. Run with `java -jar ./AudiobookRecorder.jar`
|
||||
|
||||
|
||||
Binary file not shown.
BIN
deps/mp3agic-0.9.1.jar
vendored
BIN
deps/mp3agic-0.9.1.jar
vendored
Binary file not shown.
BIN
deps/sphinx4-core-5prealpha-SNAPSHOT.jar
vendored
BIN
deps/sphinx4-core-5prealpha-SNAPSHOT.jar
vendored
Binary file not shown.
BIN
deps/sphinx4-data-5prealpha-SNAPSHOT.jar
vendored
BIN
deps/sphinx4-data-5prealpha-SNAPSHOT.jar
vendored
Binary file not shown.
13
dist/linux/audiobookrecorder.desktop
vendored
Normal file
13
dist/linux/audiobookrecorder.desktop
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=AudiobookRecorder
|
||||
GenericName=Audiobook Recorder
|
||||
X-GNOME-FullName=AudiobookRecorder
|
||||
Comment=Record audiobooks with ease
|
||||
Keywords=audio
|
||||
Exec=AudiobookRecorder
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=AudiobookRecorder
|
||||
Categories=AudioVideo;Audio;Recorder;
|
||||
X-AppStream-Ignore=true
|
||||
76
iircoeff
76
iircoeff
@@ -1,76 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Math::Trig;
|
||||
|
||||
my $fs = 96000;
|
||||
|
||||
printCo(0, 20, 25, $fs);
|
||||
printCo(20, 25, 31.5, $fs);
|
||||
printCo(25, 31.5, 40, $fs);
|
||||
printCo(31.5, 40, 50, $fs);
|
||||
printCo(40, 50, 63, $fs);
|
||||
printCo(50, 63, 80, $fs);
|
||||
printCo(63, 80, 100, $fs);
|
||||
printCo(80, 100, 125, $fs);
|
||||
printCo(100, 125, 160, $fs);
|
||||
printCo(125, 160, 200, $fs);
|
||||
printCo(160, 200, 250, $fs);
|
||||
printCo(200, 250, 315, $fs);
|
||||
printCo(250, 315, 400, $fs);
|
||||
printCo(315, 400, 500, $fs);
|
||||
printCo(400, 500, 630, $fs);
|
||||
printCo(500, 630, 800, $fs);
|
||||
printCo(630, 800, 1000, $fs);
|
||||
printCo(800, 1000, 1250, $fs);
|
||||
printCo(1000, 1250, 1600, $fs);
|
||||
printCo(1250, 1600, 2000, $fs);
|
||||
printCo(1600, 2000, 2500, $fs);
|
||||
printCo(2000, 2500, 3150, $fs);
|
||||
printCo(2500, 3150, 4000, $fs);
|
||||
printCo(3150, 4000, 5000, $fs);
|
||||
printCo(4000, 5000, 6300, $fs);
|
||||
printCo(5000, 6300, 8000, $fs);
|
||||
printCo(6300, 8000, 10000, $fs);
|
||||
printCo(8000, 10000, 12500, $fs);
|
||||
printCo(10000, 12500, 16000, $fs);
|
||||
printCo(12500, 16000, 20000, $fs);
|
||||
printCo(16000, 20000, $fs / 2, $fs);
|
||||
|
||||
sub printCo($$$$) {
|
||||
my $fl = shift;
|
||||
my $f0 = shift;
|
||||
my $fh = shift;
|
||||
my $fs = shift;
|
||||
|
||||
my $f1 = $f0 - (($f0 - $fl) / 2);
|
||||
my $f2 = $f0 + (($fh - $f0) / 2);
|
||||
|
||||
@coeff = coefficient($f0, $fs, $f1, $f2);
|
||||
print "/* $f0 Hz */\n";
|
||||
printf("new IIRCoefficients(%.10e, %.10e, %.10e),\n" , $coeff[1] * 2, $coeff[0] * 2, $coeff[2] * 2);
|
||||
}
|
||||
|
||||
|
||||
sub coefficient($$$$) {
|
||||
my $f0 = shift;
|
||||
my $fs = shift;
|
||||
my $f1 = shift;
|
||||
my $f2 = shift;
|
||||
|
||||
my $q = $f0 / ($f2 - $f1);
|
||||
|
||||
my $pi = 3.141592653;
|
||||
|
||||
my $theta0 = 2 * $pi * ($f0 / $fs);
|
||||
|
||||
my $thetaOverTwoQ = $theta0 / (2 * $q);
|
||||
|
||||
my $beta = 0.5 * ((1 - tan($thetaOverTwoQ)) / (1 + tan($thetaOverTwoQ)));
|
||||
|
||||
my $gamma = (0.5 + $beta) * cos($theta0);
|
||||
|
||||
my $alpha = (0.5 - $beta) / 2;
|
||||
|
||||
return ($alpha, $beta, $gamma);
|
||||
}
|
||||
|
||||
133
iircoeff.c
Normal file
133
iircoeff.c
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2006 Felipe Rivera <liebremx at users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*
|
||||
* Coefficient stuff
|
||||
*
|
||||
* $Id: iir_cfs.c,v 1.2 2006/01/15 00:17:46 liebremx Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
static const double band_f031[] =
|
||||
{ 20,25,31.5,40,50,63,80,100,125,160,200,250,315,400,500,630,800,
|
||||
1000,1250,1600,2000,2500,3150,4000,5000,6300,8000,10000,12500,16000,20000
|
||||
};
|
||||
|
||||
#define GAIN_F0 1.0
|
||||
#define GAIN_F1 GAIN_F0 / M_SQRT2
|
||||
|
||||
#define SAMPLING_FREQ 44100.0
|
||||
#define TETA(f) (2*M_PI*(double)f/sample_frequency)
|
||||
#define TWOPOWER(value) (value * value)
|
||||
|
||||
#define BETA2(tf0, tf) \
|
||||
(TWOPOWER(GAIN_F1)*TWOPOWER(cos(tf0)) \
|
||||
- 2.0 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \
|
||||
+ TWOPOWER(GAIN_F1) \
|
||||
- TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf)))
|
||||
#define BETA1(tf0, tf) \
|
||||
(2.0 * TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf)) \
|
||||
+ TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf0)) \
|
||||
- 2.0 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \
|
||||
- TWOPOWER(GAIN_F1) + TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf)))
|
||||
#define BETA0(tf0, tf) \
|
||||
(0.25 * TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf0)) \
|
||||
- 0.5 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \
|
||||
+ 0.25 * TWOPOWER(GAIN_F1) \
|
||||
- 0.25 * TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf)))
|
||||
|
||||
#define GAMMA(beta, tf0) ((0.5 + beta) * cos(tf0))
|
||||
#define ALPHA(beta) ((0.5 - beta)/2.0)
|
||||
|
||||
/*************
|
||||
* Functions *
|
||||
*************/
|
||||
|
||||
/* Get the band_f031 at both sides of F0. These will be cut at -3dB */
|
||||
static void find_f1_and_f2(double f0, double octave_percent, double *f1, double *f2)
|
||||
{
|
||||
double octave_factor = pow(2.0, octave_percent/2.0);
|
||||
*f1 = f0/octave_factor;
|
||||
*f2 = f0*octave_factor;
|
||||
}
|
||||
|
||||
/* Find the quadratic root
|
||||
* Always return the smallest root */
|
||||
static int find_root(double a, double b, double c, double *x0) {
|
||||
double k = c-((b*b)/(4.*a));
|
||||
double h = -(b/(2.*a));
|
||||
double x1 = 0.;
|
||||
if (-(k/a) < 0.)
|
||||
return -1;
|
||||
*x0 = h - sqrt(-(k/a));
|
||||
x1 = h + sqrt(-(k/a));
|
||||
if (x1 < *x0)
|
||||
*x0 = x1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void calc_coeffs(double sample_frequency)
|
||||
{
|
||||
int i, n;
|
||||
double f1, f2;
|
||||
double x0;
|
||||
|
||||
printf(" public final static IIRCoefficients iir_cf31_%d[] = {\n", (int)sample_frequency);
|
||||
for (i = 0; i < 31; i++) {
|
||||
|
||||
/* Find -3dB frequencies for the center freq */
|
||||
find_f1_and_f2(band_f031[i], 1.0/3.0, &f1, &f2);
|
||||
/* Find Beta */
|
||||
if ( find_root(
|
||||
BETA2(TETA(band_f031[i]), TETA(f1)),
|
||||
BETA1(TETA(band_f031[i]), TETA(f1)),
|
||||
BETA0(TETA(band_f031[i]), TETA(f1)),
|
||||
&x0) == 0)
|
||||
{
|
||||
/* Got a solution, now calculate the rest of the factors */
|
||||
/* Take the smallest root always (find_root returns the smallest one)
|
||||
*
|
||||
* NOTE: The IIR equation is
|
||||
* y[n] = 2 * (alpha*(x[n]-x[n-2]) + gamma*y[n-1] - beta*y[n-2])
|
||||
* Now the 2 factor has been distributed in the coefficients
|
||||
*/
|
||||
/* Now store the coefficients */
|
||||
printf(" /* %.1f Hz */\n", band_f031[i]);
|
||||
printf(" new IIRCoefficients(%.10e, %010e, %.10e),\n",
|
||||
(double)(2.0 * x0),
|
||||
(double)(2.0 * ALPHA(x0)),
|
||||
(double)(2.0 * GAMMA(x0, TETA(band_f031[i])))
|
||||
);
|
||||
} else {
|
||||
printf(" **** Where are the roots?\n");
|
||||
}
|
||||
}// for i
|
||||
printf(" };\n");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (argc != 2) {
|
||||
printf("Usage: iircoeff <sample frequency>\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
double f = strtod(argv[1], NULL);
|
||||
calc_coeffs(f);
|
||||
}
|
||||
76
iircoeff.pl
Executable file
76
iircoeff.pl
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Math::Trig;
|
||||
|
||||
my $fs = 48000;
|
||||
my $q = 1.414;
|
||||
|
||||
printCo(20, $fs, $q);
|
||||
printCo(25, $fs, $q);
|
||||
printCo(31.5, $fs, $q);
|
||||
printCo(40, $fs, $q);
|
||||
printCo(50, $fs, $q);
|
||||
printCo(63, $fs, $q);
|
||||
printCo(80, $fs, $q);
|
||||
printCo(100, $fs, $q);
|
||||
printCo(125, $fs, $q);
|
||||
printCo(160, $fs, $q);
|
||||
printCo(200, $fs, $q);
|
||||
printCo(250, $fs, $q);
|
||||
printCo(315, $fs, $q);
|
||||
printCo(400, $fs, $q);
|
||||
printCo(500, $fs, $q);
|
||||
printCo(630, $fs, $q);
|
||||
printCo(800, $fs, $q);
|
||||
printCo(1000, $fs, $q);
|
||||
printCo(1250, $fs, $q);
|
||||
printCo(1600, $fs, $q);
|
||||
printCo(2000, $fs, $q);
|
||||
printCo(2500, $fs, $q);
|
||||
printCo(3150, $fs, $q);
|
||||
printCo(4000, $fs, $q);
|
||||
printCo(5000, $fs, $q);
|
||||
printCo(6300, $fs, $q);
|
||||
printCo(8000, $fs, $q);
|
||||
printCo(10000, $fs, $q);
|
||||
printCo(12500, $fs, $q);
|
||||
printCo(16000, $fs, $q);
|
||||
printCo(20000, $fs, $q);
|
||||
|
||||
sub printCo($$$$) {
|
||||
my $f0 = shift;
|
||||
my $fs = shift;
|
||||
my $q = shift;
|
||||
|
||||
|
||||
@coeff = coefficient($f0, $fs, $q);
|
||||
print "/* $f0 Hz */\n";
|
||||
printf("new IIRCoefficients(%.10e, %.10e, %.10e),\n" , $coeff[1] * 2, $coeff[0] * 2, $coeff[2] * 2);
|
||||
}
|
||||
|
||||
|
||||
sub coefficient($$$$) {
|
||||
my $f0 = shift;
|
||||
my $fs = shift;
|
||||
my $q = shift;
|
||||
|
||||
my $q2 = $q * $q;
|
||||
|
||||
my $f1 = $f0 * (sqrt(1 + (1 / (4 * $q2))) - (1 / (2 * $q)));
|
||||
my $f2 = $f0 * (sqrt(1 + (1 / (4 * $q2))) + (1 / (2 * $q)));
|
||||
|
||||
my $pi = 3.141592653;
|
||||
|
||||
my $theta0 = 2 * $pi * ($f0 / $fs);
|
||||
|
||||
my $thetaOverTwoQ = $theta0 / (2 * $q);
|
||||
|
||||
my $beta = 0.5 * ((1 - tan($thetaOverTwoQ)) / (1 + tan($thetaOverTwoQ)));
|
||||
|
||||
my $gamma = (0.5 + $beta) * cos($theta0);
|
||||
|
||||
my $alpha = (0.5 - $beta) / 2;
|
||||
|
||||
return ($alpha, $beta, $gamma);
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
504
licenses/jeq/lgpl.txt
Normal file
504
licenses/jeq/lgpl.txt
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
version=0.0.9
|
||||
version=0.1.2
|
||||
|
||||
BIN
resources/uk/co/majenko/audiobookrecorder/icons/attention.png
Normal file
BIN
resources/uk/co/majenko/audiobookrecorder/icons/attention.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 952 B |
BIN
resources/uk/co/majenko/audiobookrecorder/icons/dollar.png
Normal file
BIN
resources/uk/co/majenko/audiobookrecorder/icons/dollar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 1.2 KiB |
@@ -26,453 +26,461 @@ package davaguine.jeq.core;
|
||||
public class IIRBase {
|
||||
/* BETA, ALPHA, GAMMA */
|
||||
public final static IIRCoefficients iir_cf10_11k_11025[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.8758524689e-01, 6.2073765555e-03, 1.9872750693e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.7532461998e-01, 1.2337690008e-02, 1.9740916593e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 3k Hz*/
|
||||
new IIRCoefficients(3.1012671838e-01, 3.4493664081e-01, -1.8141012760e-01),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01),
|
||||
/* 5.5k Hz*/
|
||||
new IIRCoefficients(3.3453245058e-01, 3.3273377471e-01, -1.3344985880e+00)
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.8758524689e-01, 6.2073765555e-03, 1.9872750693e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.7532461998e-01, 1.2337690008e-02, 1.9740916593e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 3k Hz*/
|
||||
new IIRCoefficients(3.1012671838e-01, 3.4493664081e-01, -1.8141012760e-01),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01),
|
||||
/* 5.5k Hz*/
|
||||
new IIRCoefficients(3.3453245058e-01, 3.3273377471e-01, -1.3344985880e+00)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf10_22k_22050[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9377323686e-01, 3.1133815717e-03, 1.9936954495e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.8758524689e-01, 6.2073765555e-03, 1.9872750693e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.7512812040e-01, 1.2435939802e-02, 1.9738753198e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01),
|
||||
/* 11k Hz*/
|
||||
new IIRCoefficients(3.3453245058e-01, 3.3273377471e-01, -1.3344985880e+00)
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9377323686e-01, 3.1133815717e-03, 1.9936954495e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.8758524689e-01, 6.2073765555e-03, 1.9872750693e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.7512812040e-01, 1.2435939802e-02, 1.9738753198e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01),
|
||||
/* 11k Hz*/
|
||||
new IIRCoefficients(3.3453245058e-01, 3.3273377471e-01, -1.3344985880e+00)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf10_44100[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9688176273e-01, 1.5591186337e-03, 1.9968622855e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.9377323686e-01, 3.1133815717e-03, 1.9936954495e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.8748575691e-01, 6.2571215431e-03, 1.9871705722e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.7512812040e-01, 1.2435939802e-02, 1.9738753198e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf10_48000[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9713475915e-01, 1.4326204244e-03, 1.9971183163e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.9427771143e-01, 2.8611442874e-03, 1.9942120343e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.8849666727e-01, 5.7516663664e-03, 1.9882304829e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.7712566171e-01, 1.1437169144e-02, 1.9760670839e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.5477456091e-01, 2.2612719547e-02, 1.9505892385e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.1159452679e-01, 4.4202736607e-02, 1.8952405706e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(8.3100647694e-01, 8.4496761532e-02, 1.7686164442e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(6.9062328809e-01, 1.5468835596e-01, 1.4641227157e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(4.7820368352e-01, 2.6089815824e-01, 7.3910184176e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(2.5620076154e-01, 3.7189961923e-01, -6.2810038077e-01)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf15_44100[] = {
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9834072702e-01, 8.2963648917e-04, 1.9983280505e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9734652663e-01, 1.3267366865e-03, 1.9973140908e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9582396353e-01, 2.0880182333e-03, 1.9957435641e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9337951306e-01, 3.3102434709e-03, 1.9931771947e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.8942832039e-01, 5.2858398053e-03, 1.9889114258e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.8353109588e-01, 8.2344520610e-03, 1.9822729654e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.7378088082e-01, 1.3109559588e-02, 1.9705764276e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.5901979676e-01, 2.0490101620e-02, 1.9511333590e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.3574903986e-01, 3.2125480071e-02, 1.9161350100e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(8.9923630641e-01, 5.0381846793e-02, 1.8501014162e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(8.4722457681e-01, 7.6387711593e-02, 1.7312785699e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(7.6755471307e-01, 1.1622264346e-01, 1.4881981417e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(6.6125377473e-01, 1.6937311263e-01, 1.0357747868e+00),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(5.2683267950e-01, 2.3658366025e-01, 2.2218349322e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(4.0179628792e-01, 2.9910185604e-01, -9.1248032613e-01)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf15_48000[] = {
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9847546664e-01, 7.6226668143e-04, 1.9984647656e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9756184654e-01, 1.2190767289e-03, 1.9975344645e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9616261379e-01, 1.9186931041e-03, 1.9960947369e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9391578543e-01, 3.0421072865e-03, 1.9937449618e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9028307215e-01, 4.8584639242e-03, 1.9898465702e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.8485897264e-01, 7.5705136795e-03, 1.9837962543e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.7588512657e-01, 1.2057436715e-02, 1.9731772447e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.6228521814e-01, 1.8857390928e-02, 1.9556164694e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.4080933132e-01, 2.9595334338e-02, 1.9242054384e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.0702059196e-01, 4.6489704022e-02, 1.8653476166e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(8.5868004289e-01, 7.0659978553e-02, 1.7600401337e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(7.8409610788e-01, 1.0795194606e-01, 1.5450725522e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(6.8332861002e-01, 1.5833569499e-01, 1.1426447155e+00),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(5.5267518228e-01, 2.2366240886e-01, 4.0186190803e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(4.1811888447e-01, 2.9094055777e-01, -7.0905944223e-01)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf25_44100[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9934037157e-01, 3.2981421662e-04, 1.9993322545e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9896129025e-01, 5.1935487310e-04, 1.9989411587e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9868118265e-01, 6.5940867495e-04, 1.9986487252e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9835175161e-01, 8.2412419683e-04, 1.9983010452e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9736411067e-01, 1.3179446674e-03, 1.9972343673e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9670622662e-01, 1.6468866919e-03, 1.9965035707e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9588448566e-01, 2.0577571681e-03, 1.9955679690e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9473519326e-01, 2.6324033689e-03, 1.9942169198e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9178600786e-01, 4.1069960678e-03, 1.9905226414e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.8966154150e-01, 5.1692292513e-03, 1.9876580847e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8689036168e-01, 6.5548191616e-03, 1.9836646251e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8364027156e-01, 8.1798642207e-03, 1.9786090689e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7395577681e-01, 1.3022111597e-02, 1.9611472340e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.6755437936e-01, 1.6222810321e-02, 1.9476180811e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.5961458750e-01, 2.0192706249e-02, 1.9286193446e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.4861481164e-01, 2.5692594182e-02, 1.8982024567e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2095325455e-01, 3.9523372724e-02, 1.8003794694e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0153642498e-01, 4.9231787512e-02, 1.7132251201e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.7685876255e-01, 6.1570618727e-02, 1.5802270232e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.4886734822e-01, 7.5566325889e-02, 1.3992391376e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.7175298860e-01, 1.1412350570e-01, 7.4018523020e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.2627049462e-01, 1.3686475269e-01, 2.5120552756e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.7674787974e-01, 1.6162606013e-01, -3.4978377639e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.2482197550e-01, 1.8758901225e-01, -1.0576558797e+00),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.1776148240e-01, 1.9111925880e-01, -1.5492465594e+00)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf25_48000[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9939388451e-01, 3.0305774630e-04, 1.9993870327e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9904564663e-01, 4.7717668529e-04, 1.9990286528e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9878827195e-01, 6.0586402557e-04, 1.9987608731e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9848556942e-01, 7.5721528829e-04, 1.9984427652e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9757801538e-01, 1.2109923088e-03, 1.9974684869e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9697343933e-01, 1.5132803374e-03, 1.9968023538e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9621823598e-01, 1.8908820086e-03, 1.9959510180e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9516191728e-01, 2.4190413595e-03, 1.9947243453e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9245085008e-01, 3.7745749576e-03, 1.9913840669e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.9049749914e-01, 4.7512504310e-03, 1.9888056233e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8794899744e-01, 6.0255012789e-03, 1.9852245824e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8495930023e-01, 7.5203498850e-03, 1.9807093500e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7604570090e-01, 1.1977149551e-02, 1.9652207158e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.7014963927e-01, 1.4925180364e-02, 1.9532947360e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.6283181641e-01, 1.8584091793e-02, 1.9366149237e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.5268463224e-01, 2.3657683878e-02, 1.9100137880e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2711765003e-01, 3.6441174983e-02, 1.8248457659e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0912548757e-01, 4.5437256213e-02, 1.7491177803e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.8619860800e-01, 5.6900696000e-02, 1.6334959111e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.6010264114e-01, 6.9948679430e-02, 1.4757186436e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.8757448309e-01, 1.0621275845e-01, 8.9378724155e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.4415362476e-01, 1.2792318762e-01, 4.5142017567e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.9581428034e-01, 1.5209285983e-01, -1.1091156053e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.4120506488e-01, 1.7939746756e-01, -8.2060253244e-01),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.0884213704e-01, 1.9557893148e-01, -1.3932981614e+00)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf31_44100[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9934037157e-01, 3.2981421662e-04, 1.9993322545e+00),
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9917555233e-01, 4.1222383516e-04, 1.9991628705e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9896129025e-01, 5.1935487310e-04, 1.9989411587e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9868118265e-01, 6.5940867495e-04, 1.9986487252e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9835175161e-01, 8.2412419683e-04, 1.9983010452e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9792365217e-01, 1.0381739160e-03, 1.9978431682e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9736411067e-01, 1.3179446674e-03, 1.9972343673e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9670622662e-01, 1.6468866919e-03, 1.9965035707e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9588448566e-01, 2.0577571681e-03, 1.9955679690e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9473519326e-01, 2.6324033689e-03, 1.9942169198e+00),
|
||||
/* 200 Hz*/
|
||||
new IIRCoefficients(9.9342335280e-01, 3.2883236020e-03, 1.9926141028e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9178600786e-01, 4.1069960678e-03, 1.9905226414e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.8966154150e-01, 5.1692292513e-03, 1.9876580847e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8689036168e-01, 6.5548191616e-03, 1.9836646251e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8364027156e-01, 8.1798642207e-03, 1.9786090689e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.7943153305e-01, 1.0284233476e-02, 1.9714629236e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7395577681e-01, 1.3022111597e-02, 1.9611472340e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.6755437936e-01, 1.6222810321e-02, 1.9476180811e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.5961458750e-01, 2.0192706249e-02, 1.9286193446e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.4861481164e-01, 2.5692594182e-02, 1.8982024567e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(9.3620971896e-01, 3.1895140519e-02, 1.8581325022e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2095325455e-01, 3.9523372724e-02, 1.8003794694e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0153642498e-01, 4.9231787512e-02, 1.7132251201e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.7685876255e-01, 6.1570618727e-02, 1.5802270232e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.4886734822e-01, 7.5566325889e-02, 1.3992391376e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(8.1417575446e-01, 9.2912122771e-02, 1.1311200817e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.7175298860e-01, 1.1412350570e-01, 7.4018523020e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.2627049462e-01, 1.3686475269e-01, 2.5120552756e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.7674787974e-01, 1.6162606013e-01, -3.4978377639e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.2482197550e-01, 1.8758901225e-01, -1.0576558797e+00),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.1776148240e-01, 1.9111925880e-01, -1.5492465594e+00)
|
||||
};
|
||||
public final static IIRCoefficients iir_cf31_48000[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9939388451e-01, 3.0305774630e-04, 1.9993870327e+00),
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9924247917e-01, 3.7876041632e-04, 1.9992317740e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9904564663e-01, 4.7717668529e-04, 1.9990286528e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9878827195e-01, 6.0586402557e-04, 1.9987608731e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9848556942e-01, 7.5721528829e-04, 1.9984427652e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9809219264e-01, 9.5390367779e-04, 1.9980242502e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9757801538e-01, 1.2109923088e-03, 1.9974684869e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9697343933e-01, 1.5132803374e-03, 1.9968023538e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9621823598e-01, 1.8908820086e-03, 1.9959510180e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9516191728e-01, 2.4190413595e-03, 1.9947243453e+00),
|
||||
/* 200 Hz*/
|
||||
new IIRCoefficients(9.9395607757e-01, 3.0219612131e-03, 1.9932727986e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9245085008e-01, 3.7745749576e-03, 1.9913840669e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.9049749914e-01, 4.7512504310e-03, 1.9888056233e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8794899744e-01, 6.0255012789e-03, 1.9852245824e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8495930023e-01, 7.5203498850e-03, 1.9807093500e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.8108651246e-01, 9.4567437704e-03, 1.9743538683e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7604570090e-01, 1.1977149551e-02, 1.9652207158e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.7014963927e-01, 1.4925180364e-02, 1.9532947360e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.6283181641e-01, 1.8584091793e-02, 1.9366149237e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.5268463224e-01, 2.3657683878e-02, 1.9100137880e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(9.4122788957e-01, 2.9386055213e-02, 1.8750821533e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2711765003e-01, 3.6441174983e-02, 1.8248457659e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0912548757e-01, 4.5437256213e-02, 1.7491177803e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.8619860800e-01, 5.6900696000e-02, 1.6334959111e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.6010264114e-01, 6.9948679430e-02, 1.4757186436e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(8.2760520925e-01, 8.6197395374e-02, 1.2405797786e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.8757448309e-01, 1.0621275845e-01, 8.9378724155e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.4415362476e-01, 1.2792318762e-01, 4.5142017567e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.9581428034e-01, 1.5209285983e-01, -1.1091156053e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.4120506488e-01, 1.7939746756e-01, -8.2060253244e-01),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.0884213704e-01, 1.9557893148e-01, -1.3932981614e+00),
|
||||
};
|
||||
public final static IIRCoefficients iir_cf31_96000[] = {
|
||||
/* 20 Hz */
|
||||
new IIRCoefficients(9.9918221139e-01, 4.0889430323e-04, 1.9991804986e+00),
|
||||
/* 25 Hz */
|
||||
new IIRCoefficients(9.9962373418e-01, 1.8813291151e-04, 1.9996210574e+00),
|
||||
/* 31.5 Hz */
|
||||
new IIRCoefficients(9.9950924659e-01, 2.4537670644e-04, 1.9995049971e+00),
|
||||
/* 40 Hz */
|
||||
new IIRCoefficients(9.9939477210e-01, 3.0261394841e-04, 1.9993879203e+00),
|
||||
/* 50 Hz */
|
||||
new IIRCoefficients(9.9924760988e-01, 3.7619506167e-04, 1.9992369047e+00),
|
||||
/* 63 Hz */
|
||||
new IIRCoefficients(9.9901873389e-01, 4.9063305250e-04, 1.9990017403e+00),
|
||||
/* 80 Hz */
|
||||
new IIRCoefficients(9.9878991029e-01, 6.0504485723e-04, 1.9987625114e+00),
|
||||
/* 100 Hz */
|
||||
new IIRCoefficients(9.9852846169e-01, 7.3576915625e-04, 1.9984856565e+00),
|
||||
/* 125 Hz */
|
||||
new IIRCoefficients(9.9803842973e-01, 9.8078513561e-04, 1.9979715632e+00),
|
||||
/* 160 Hz */
|
||||
new IIRCoefficients(9.9754863778e-01, 1.2256811083e-03, 1.9974391109e+00),
|
||||
/* 200 Hz */
|
||||
new IIRCoefficients(9.9705908562e-01, 1.4704571921e-03, 1.9968879927e+00),
|
||||
/* 250 Hz */
|
||||
new IIRCoefficients(9.9624369754e-01, 1.8781512307e-03, 1.9959764762e+00),
|
||||
/* 315 Hz */
|
||||
new IIRCoefficients(9.9510327003e-01, 2.4483649847e-03, 1.9946792773e+00),
|
||||
/* 400 Hz */
|
||||
new IIRCoefficients(9.9396414160e-01, 3.0179291997e-03, 1.9932808599e+00),
|
||||
/* 500 Hz */
|
||||
new IIRCoefficients(9.9250145198e-01, 3.7492740081e-03, 1.9914346418e+00),
|
||||
/* 630 Hz */
|
||||
new IIRCoefficients(9.9023040090e-01, 4.8847995509e-03, 1.9885387521e+00),
|
||||
/* 800 Hz */
|
||||
new IIRCoefficients(9.8796449555e-01, 6.0177522243e-03, 1.9852400593e+00),
|
||||
/* 1000 Hz */
|
||||
new IIRCoefficients(9.8538116034e-01, 7.3094198292e-03, 1.9811303069e+00),
|
||||
/* 1250 Hz */
|
||||
new IIRCoefficients(9.8055531891e-01, 9.7223405432e-03, 1.9739308353e+00),
|
||||
/* 1600 Hz */
|
||||
new IIRCoefficients(9.7575264994e-01, 1.2123675032e-02, 1.9649292702e+00),
|
||||
/* 2000 Hz */
|
||||
new IIRCoefficients(9.7097292946e-01, 1.4513535269e-02, 1.9541109828e+00),
|
||||
/* 2500 Hz */
|
||||
new IIRCoefficients(9.6305712557e-01, 1.8471437214e-02, 1.9368372235e+00),
|
||||
/* 3150 Hz */
|
||||
new IIRCoefficients(9.5207914671e-01, 2.3960426645e-02, 1.9107394812e+00),
|
||||
/* 4000 Hz */
|
||||
new IIRCoefficients(9.4122023318e-01, 2.9389883411e-02, 1.8750747578e+00),
|
||||
/* 5000 Hz */
|
||||
new IIRCoefficients(9.2742950588e-01, 3.6285247058e-02, 1.8251410716e+00),
|
||||
/* 6300 Hz */
|
||||
new IIRCoefficients(9.0634716904e-01, 4.6826415482e-02, 1.7465723184e+00),
|
||||
/* 8000 Hz */
|
||||
new IIRCoefficients(8.8569806727e-01, 5.7150966366e-02, 1.6330624302e+00),
|
||||
/* 10000 Hz */
|
||||
new IIRCoefficients(8.6260593228e-01, 6.8697033860e-02, 1.4777046382e+00),
|
||||
/* 12500 Hz */
|
||||
new IIRCoefficients(8.2067879086e-01, 8.9660604570e-02, 1.2446020061e+00),
|
||||
/* 16000 Hz */
|
||||
new IIRCoefficients(7.8040765969e-01, 1.0979617015e-01, 8.9020383015e-01),
|
||||
/* 20000 Hz */
|
||||
new IIRCoefficients(2.6794919254e-01, 3.6602540373e-01, 3.2816939955e-01),
|
||||
|
||||
public final static IIRCoefficients iir_cf10_44100[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9688176273e-01, 1.5591186337e-03, 1.9968622855e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.9377323686e-01, 3.1133815717e-03, 1.9936954495e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.8748575691e-01, 6.2571215431e-03, 1.9871705722e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.7512812040e-01, 1.2435939802e-02, 1.9738753198e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.5087485437e-01, 2.4562572817e-02, 1.9459267562e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.0416308662e-01, 4.7918456688e-02, 1.8848691023e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(8.1751373987e-01, 9.1243130064e-02, 1.7442229115e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(6.6840529852e-01, 1.6579735074e-01, 1.4047189863e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(4.4858358977e-01, 2.7570820511e-01, 6.0517475334e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(2.4198119087e-01, 3.7900940457e-01, -8.0845085113e-01)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf10_48000[] = {
|
||||
/* 31 Hz*/
|
||||
new IIRCoefficients(9.9713475915e-01, 1.4326204244e-03, 1.9971183163e+00),
|
||||
/* 62 Hz*/
|
||||
new IIRCoefficients(9.9427771143e-01, 2.8611442874e-03, 1.9942120343e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.8849666727e-01, 5.7516663664e-03, 1.9882304829e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.7712566171e-01, 1.1437169144e-02, 1.9760670839e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.5477456091e-01, 2.2612719547e-02, 1.9505892385e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.1159452679e-01, 4.4202736607e-02, 1.8952405706e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(8.3100647694e-01, 8.4496761532e-02, 1.7686164442e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(6.9062328809e-01, 1.5468835596e-01, 1.4641227157e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(4.7820368352e-01, 2.6089815824e-01, 7.3910184176e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(2.5620076154e-01, 3.7189961923e-01, -6.2810038077e-01)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf15_44100[] = {
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9834072702e-01, 8.2963648917e-04, 1.9983280505e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9734652663e-01, 1.3267366865e-03, 1.9973140908e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9582396353e-01, 2.0880182333e-03, 1.9957435641e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9337951306e-01, 3.3102434709e-03, 1.9931771947e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.8942832039e-01, 5.2858398053e-03, 1.9889114258e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.8353109588e-01, 8.2344520610e-03, 1.9822729654e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.7378088082e-01, 1.3109559588e-02, 1.9705764276e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.5901979676e-01, 2.0490101620e-02, 1.9511333590e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.3574903986e-01, 3.2125480071e-02, 1.9161350100e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(8.9923630641e-01, 5.0381846793e-02, 1.8501014162e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(8.4722457681e-01, 7.6387711593e-02, 1.7312785699e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(7.6755471307e-01, 1.1622264346e-01, 1.4881981417e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(6.6125377473e-01, 1.6937311263e-01, 1.0357747868e+00),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(5.2683267950e-01, 2.3658366025e-01, 2.2218349322e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(4.0179628792e-01, 2.9910185604e-01, -9.1248032613e-01)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf15_48000[] = {
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9847546664e-01, 7.6226668143e-04, 1.9984647656e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9756184654e-01, 1.2190767289e-03, 1.9975344645e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9616261379e-01, 1.9186931041e-03, 1.9960947369e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9391578543e-01, 3.0421072865e-03, 1.9937449618e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9028307215e-01, 4.8584639242e-03, 1.9898465702e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.8485897264e-01, 7.5705136795e-03, 1.9837962543e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.7588512657e-01, 1.2057436715e-02, 1.9731772447e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.6228521814e-01, 1.8857390928e-02, 1.9556164694e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.4080933132e-01, 2.9595334338e-02, 1.9242054384e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.0702059196e-01, 4.6489704022e-02, 1.8653476166e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(8.5868004289e-01, 7.0659978553e-02, 1.7600401337e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(7.8409610788e-01, 1.0795194606e-01, 1.5450725522e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(6.8332861002e-01, 1.5833569499e-01, 1.1426447155e+00),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(5.5267518228e-01, 2.2366240886e-01, 4.0186190803e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(4.1811888447e-01, 2.9094055777e-01, -7.0905944223e-01)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf25_44100[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9934037157e-01, 3.2981421662e-04, 1.9993322545e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9896129025e-01, 5.1935487310e-04, 1.9989411587e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9868118265e-01, 6.5940867495e-04, 1.9986487252e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9835175161e-01, 8.2412419683e-04, 1.9983010452e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9736411067e-01, 1.3179446674e-03, 1.9972343673e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9670622662e-01, 1.6468866919e-03, 1.9965035707e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9588448566e-01, 2.0577571681e-03, 1.9955679690e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9473519326e-01, 2.6324033689e-03, 1.9942169198e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9178600786e-01, 4.1069960678e-03, 1.9905226414e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.8966154150e-01, 5.1692292513e-03, 1.9876580847e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8689036168e-01, 6.5548191616e-03, 1.9836646251e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8364027156e-01, 8.1798642207e-03, 1.9786090689e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7395577681e-01, 1.3022111597e-02, 1.9611472340e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.6755437936e-01, 1.6222810321e-02, 1.9476180811e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.5961458750e-01, 2.0192706249e-02, 1.9286193446e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.4861481164e-01, 2.5692594182e-02, 1.8982024567e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2095325455e-01, 3.9523372724e-02, 1.8003794694e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0153642498e-01, 4.9231787512e-02, 1.7132251201e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.7685876255e-01, 6.1570618727e-02, 1.5802270232e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.4886734822e-01, 7.5566325889e-02, 1.3992391376e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.7175298860e-01, 1.1412350570e-01, 7.4018523020e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.2627049462e-01, 1.3686475269e-01, 2.5120552756e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.7674787974e-01, 1.6162606013e-01, -3.4978377639e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.2482197550e-01, 1.8758901225e-01, -1.0576558797e+00),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.1776148240e-01, 1.9111925880e-01, -1.5492465594e+00)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf25_48000[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9939388451e-01, 3.0305774630e-04, 1.9993870327e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9904564663e-01, 4.7717668529e-04, 1.9990286528e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9878827195e-01, 6.0586402557e-04, 1.9987608731e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9848556942e-01, 7.5721528829e-04, 1.9984427652e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9757801538e-01, 1.2109923088e-03, 1.9974684869e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9697343933e-01, 1.5132803374e-03, 1.9968023538e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9621823598e-01, 1.8908820086e-03, 1.9959510180e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9516191728e-01, 2.4190413595e-03, 1.9947243453e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9245085008e-01, 3.7745749576e-03, 1.9913840669e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.9049749914e-01, 4.7512504310e-03, 1.9888056233e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8794899744e-01, 6.0255012789e-03, 1.9852245824e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8495930023e-01, 7.5203498850e-03, 1.9807093500e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7604570090e-01, 1.1977149551e-02, 1.9652207158e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.7014963927e-01, 1.4925180364e-02, 1.9532947360e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.6283181641e-01, 1.8584091793e-02, 1.9366149237e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.5268463224e-01, 2.3657683878e-02, 1.9100137880e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2711765003e-01, 3.6441174983e-02, 1.8248457659e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0912548757e-01, 4.5437256213e-02, 1.7491177803e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.8619860800e-01, 5.6900696000e-02, 1.6334959111e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.6010264114e-01, 6.9948679430e-02, 1.4757186436e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.8757448309e-01, 1.0621275845e-01, 8.9378724155e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.4415362476e-01, 1.2792318762e-01, 4.5142017567e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.9581428034e-01, 1.5209285983e-01, -1.1091156053e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.4120506488e-01, 1.7939746756e-01, -8.2060253244e-01),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.0884213704e-01, 1.9557893148e-01, -1.3932981614e+00)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf31_44100[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9934037157e-01, 3.2981421662e-04, 1.9993322545e+00),
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9917555233e-01, 4.1222383516e-04, 1.9991628705e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9896129025e-01, 5.1935487310e-04, 1.9989411587e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9868118265e-01, 6.5940867495e-04, 1.9986487252e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9835175161e-01, 8.2412419683e-04, 1.9983010452e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9792365217e-01, 1.0381739160e-03, 1.9978431682e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9736411067e-01, 1.3179446674e-03, 1.9972343673e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9670622662e-01, 1.6468866919e-03, 1.9965035707e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9588448566e-01, 2.0577571681e-03, 1.9955679690e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9473519326e-01, 2.6324033689e-03, 1.9942169198e+00),
|
||||
/* 200 Hz*/
|
||||
new IIRCoefficients(9.9342335280e-01, 3.2883236020e-03, 1.9926141028e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9178600786e-01, 4.1069960678e-03, 1.9905226414e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.8966154150e-01, 5.1692292513e-03, 1.9876580847e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8689036168e-01, 6.5548191616e-03, 1.9836646251e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8364027156e-01, 8.1798642207e-03, 1.9786090689e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.7943153305e-01, 1.0284233476e-02, 1.9714629236e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7395577681e-01, 1.3022111597e-02, 1.9611472340e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.6755437936e-01, 1.6222810321e-02, 1.9476180811e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.5961458750e-01, 2.0192706249e-02, 1.9286193446e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.4861481164e-01, 2.5692594182e-02, 1.8982024567e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(9.3620971896e-01, 3.1895140519e-02, 1.8581325022e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2095325455e-01, 3.9523372724e-02, 1.8003794694e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0153642498e-01, 4.9231787512e-02, 1.7132251201e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.7685876255e-01, 6.1570618727e-02, 1.5802270232e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.4886734822e-01, 7.5566325889e-02, 1.3992391376e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(8.1417575446e-01, 9.2912122771e-02, 1.1311200817e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.7175298860e-01, 1.1412350570e-01, 7.4018523020e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.2627049462e-01, 1.3686475269e-01, 2.5120552756e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.7674787974e-01, 1.6162606013e-01, -3.4978377639e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.2482197550e-01, 1.8758901225e-01, -1.0576558797e+00),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.1776148240e-01, 1.9111925880e-01, -1.5492465594e+00)
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf31_48000[] = {
|
||||
/* 20 Hz*/
|
||||
new IIRCoefficients(9.9939388451e-01, 3.0305774630e-04, 1.9993870327e+00),
|
||||
/* 25 Hz*/
|
||||
new IIRCoefficients(9.9924247917e-01, 3.7876041632e-04, 1.9992317740e+00),
|
||||
/* 31.5 Hz*/
|
||||
new IIRCoefficients(9.9904564663e-01, 4.7717668529e-04, 1.9990286528e+00),
|
||||
/* 40 Hz*/
|
||||
new IIRCoefficients(9.9878827195e-01, 6.0586402557e-04, 1.9987608731e+00),
|
||||
/* 50 Hz*/
|
||||
new IIRCoefficients(9.9848556942e-01, 7.5721528829e-04, 1.9984427652e+00),
|
||||
/* 63 Hz*/
|
||||
new IIRCoefficients(9.9809219264e-01, 9.5390367779e-04, 1.9980242502e+00),
|
||||
/* 80 Hz*/
|
||||
new IIRCoefficients(9.9757801538e-01, 1.2109923088e-03, 1.9974684869e+00),
|
||||
/* 100 Hz*/
|
||||
new IIRCoefficients(9.9697343933e-01, 1.5132803374e-03, 1.9968023538e+00),
|
||||
/* 125 Hz*/
|
||||
new IIRCoefficients(9.9621823598e-01, 1.8908820086e-03, 1.9959510180e+00),
|
||||
/* 160 Hz*/
|
||||
new IIRCoefficients(9.9516191728e-01, 2.4190413595e-03, 1.9947243453e+00),
|
||||
/* 200 Hz*/
|
||||
new IIRCoefficients(9.9395607757e-01, 3.0219612131e-03, 1.9932727986e+00),
|
||||
/* 250 Hz*/
|
||||
new IIRCoefficients(9.9245085008e-01, 3.7745749576e-03, 1.9913840669e+00),
|
||||
/* 315 Hz*/
|
||||
new IIRCoefficients(9.9049749914e-01, 4.7512504310e-03, 1.9888056233e+00),
|
||||
/* 400 Hz*/
|
||||
new IIRCoefficients(9.8794899744e-01, 6.0255012789e-03, 1.9852245824e+00),
|
||||
/* 500 Hz*/
|
||||
new IIRCoefficients(9.8495930023e-01, 7.5203498850e-03, 1.9807093500e+00),
|
||||
/* 630 Hz*/
|
||||
new IIRCoefficients(9.8108651246e-01, 9.4567437704e-03, 1.9743538683e+00),
|
||||
/* 800 Hz*/
|
||||
new IIRCoefficients(9.7604570090e-01, 1.1977149551e-02, 1.9652207158e+00),
|
||||
/* 1k Hz*/
|
||||
new IIRCoefficients(9.7014963927e-01, 1.4925180364e-02, 1.9532947360e+00),
|
||||
/* 1.25k Hz*/
|
||||
new IIRCoefficients(9.6283181641e-01, 1.8584091793e-02, 1.9366149237e+00),
|
||||
/* 1.6k Hz*/
|
||||
new IIRCoefficients(9.5268463224e-01, 2.3657683878e-02, 1.9100137880e+00),
|
||||
/* 2k Hz*/
|
||||
new IIRCoefficients(9.4122788957e-01, 2.9386055213e-02, 1.8750821533e+00),
|
||||
/* 2.5k Hz*/
|
||||
new IIRCoefficients(9.2711765003e-01, 3.6441174983e-02, 1.8248457659e+00),
|
||||
/* 3.15k Hz*/
|
||||
new IIRCoefficients(9.0912548757e-01, 4.5437256213e-02, 1.7491177803e+00),
|
||||
/* 4k Hz*/
|
||||
new IIRCoefficients(8.8619860800e-01, 5.6900696000e-02, 1.6334959111e+00),
|
||||
/* 5k Hz*/
|
||||
new IIRCoefficients(8.6010264114e-01, 6.9948679430e-02, 1.4757186436e+00),
|
||||
/* 6.3k Hz*/
|
||||
new IIRCoefficients(8.2760520925e-01, 8.6197395374e-02, 1.2405797786e+00),
|
||||
/* 8k Hz*/
|
||||
new IIRCoefficients(7.8757448309e-01, 1.0621275845e-01, 8.9378724155e-01),
|
||||
/* 10k Hz*/
|
||||
new IIRCoefficients(7.4415362476e-01, 1.2792318762e-01, 4.5142017567e-01),
|
||||
/* 12.5k Hz*/
|
||||
new IIRCoefficients(6.9581428034e-01, 1.5209285983e-01, -1.1091156053e-01),
|
||||
/* 16k Hz*/
|
||||
new IIRCoefficients(6.4120506488e-01, 1.7939746756e-01, -8.2060253244e-01),
|
||||
/* 20k Hz*/
|
||||
new IIRCoefficients(6.0884213704e-01, 1.9557893148e-01, -1.3932981614e+00),
|
||||
};
|
||||
|
||||
public final static IIRCoefficients iir_cf31_96000[] = {
|
||||
/* 20.0 Hz */
|
||||
new IIRCoefficients(9.9969659208e-01, 1.517040e-04, 1.9996948789e+00),
|
||||
/* 25.0 Hz */
|
||||
new IIRCoefficients(9.9962116126e-01, 1.894194e-04, 1.9996184845e+00),
|
||||
/* 31.5 Hz */
|
||||
new IIRCoefficients(9.9952283343e-01, 2.385833e-04, 1.9995185840e+00),
|
||||
/* 40.0 Hz */
|
||||
new IIRCoefficients(9.9939398196e-01, 3.030090e-04, 1.9993871301e+00),
|
||||
/* 50.0 Hz */
|
||||
new IIRCoefficients(9.9924251688e-01, 3.787416e-04, 1.9992318117e+00),
|
||||
/* 63.0 Hz */
|
||||
new IIRCoefficients(9.9904565182e-01, 4.771741e-04, 1.9990286580e+00),
|
||||
/* 80.0 Hz */
|
||||
new IIRCoefficients(9.9878828573e-01, 6.058571e-04, 1.9987608868e+00),
|
||||
/* 100.0 Hz */
|
||||
new IIRCoefficients(9.9848557077e-01, 7.572146e-04, 1.9984427665e+00),
|
||||
/* 125.0 Hz */
|
||||
new IIRCoefficients(9.9810732562e-01, 9.463372e-04, 1.9980404568e+00),
|
||||
/* 160.0 Hz */
|
||||
new IIRCoefficients(9.9757801618e-01, 1.210992e-03, 1.9974684877e+00),
|
||||
/* 200.0 Hz */
|
||||
new IIRCoefficients(9.9697343858e-01, 1.513281e-03, 1.9968023530e+00),
|
||||
/* 250.0 Hz */
|
||||
new IIRCoefficients(9.9621823615e-01, 1.890882e-03, 1.9959510182e+00),
|
||||
/* 315.0 Hz */
|
||||
new IIRCoefficients(9.9523733132e-01, 2.381334e-03, 1.9948133101e+00),
|
||||
/* 400.0 Hz */
|
||||
new IIRCoefficients(9.9395607744e-01, 3.021961e-03, 1.9932727985e+00),
|
||||
/* 500.0 Hz */
|
||||
new IIRCoefficients(9.9245084999e-01, 3.774575e-03, 1.9913840669e+00),
|
||||
/* 630.0 Hz */
|
||||
new IIRCoefficients(9.9049749915e-01, 4.751250e-03, 1.9888056234e+00),
|
||||
/* 800.0 Hz */
|
||||
new IIRCoefficients(9.8794899744e-01, 6.025501e-03, 1.9852245824e+00),
|
||||
/* 1000.0 Hz */
|
||||
new IIRCoefficients(9.8495930024e-01, 7.520350e-03, 1.9807093500e+00),
|
||||
/* 1250.0 Hz */
|
||||
new IIRCoefficients(9.8123517675e-01, 9.382412e-03, 1.9746084192e+00),
|
||||
/* 1600.0 Hz */
|
||||
new IIRCoefficients(9.7604570090e-01, 1.197715e-02, 1.9652207158e+00),
|
||||
/* 2000.0 Hz */
|
||||
new IIRCoefficients(9.7014963927e-01, 1.492518e-02, 1.9532947360e+00),
|
||||
/* 2500.0 Hz */
|
||||
new IIRCoefficients(9.6283181641e-01, 1.858409e-02, 1.9366149237e+00),
|
||||
/* 3150.0 Hz */
|
||||
new IIRCoefficients(9.5340564248e-01, 2.329718e-02, 1.9120378855e+00),
|
||||
/* 4000.0 Hz */
|
||||
new IIRCoefficients(9.4122788957e-01, 2.938606e-02, 1.8750821533e+00),
|
||||
/* 5000.0 Hz */
|
||||
new IIRCoefficients(9.2711765003e-01, 3.644117e-02, 1.8248457659e+00),
|
||||
/* 6300.0 Hz */
|
||||
new IIRCoefficients(9.0912548757e-01, 4.543726e-02, 1.7491177803e+00),
|
||||
/* 8000.0 Hz */
|
||||
new IIRCoefficients(8.8619860800e-01, 5.690070e-02, 1.6334959111e+00),
|
||||
/* 10000.0 Hz */
|
||||
new IIRCoefficients(8.6010264114e-01, 6.994868e-02, 1.4757186436e+00),
|
||||
/* 12500.0 Hz */
|
||||
new IIRCoefficients(8.2882509035e-01, 8.558745e-02, 1.2501707535e+00),
|
||||
/* 16000.0 Hz */
|
||||
new IIRCoefficients(7.8757448309e-01, 1.062128e-01, 8.9378724155e-01),
|
||||
/* 20000.0 Hz */
|
||||
new IIRCoefficients(7.4415362476e-01, 1.279232e-01, 4.5142017567e-01),
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@ public class Book extends DefaultMutableTreeNode {
|
||||
String author;
|
||||
String genre;
|
||||
String comment;
|
||||
String ACX;
|
||||
|
||||
int sampleRate;
|
||||
int channels;
|
||||
@@ -32,31 +33,18 @@ public class Book extends DefaultMutableTreeNode {
|
||||
super(bookname);
|
||||
name = bookname;
|
||||
equaliser = new Equaliser();
|
||||
AudiobookRecorder.window.setTitle("AudioBook Recorder :: " + name);
|
||||
}
|
||||
|
||||
public void setAuthor(String a) {
|
||||
author = a;
|
||||
}
|
||||
public void setAuthor(String a) { author = a; }
|
||||
public void setGenre(String g) { genre = g; }
|
||||
public void setComment(String c) { comment = c; }
|
||||
public void setACX(String c) { ACX = c; }
|
||||
|
||||
public void setGenre(String g) {
|
||||
genre = g;
|
||||
}
|
||||
|
||||
public void setComment(String c) {
|
||||
comment = c;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public String getGenre() {
|
||||
return genre;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
public String getAuthor() { return author; }
|
||||
public String getGenre() { return genre; }
|
||||
public String getComment() { return comment; }
|
||||
public String getACX() { if (ACX == null) return ""; return ACX; }
|
||||
|
||||
public Chapter getClosingCredits() {
|
||||
return getChapterById("close");
|
||||
@@ -124,23 +112,28 @@ public class Book extends DefaultMutableTreeNode {
|
||||
public void setUserObject(Object o) {
|
||||
if (o instanceof String) {
|
||||
String newName = (String)o;
|
||||
if (newName.equals(name)) return;
|
||||
renameBook(newName);
|
||||
}
|
||||
}
|
||||
|
||||
File oldDir = new File(Options.get("path.storage"), name);
|
||||
File newDir = new File(Options.get("path.storage"), newName);
|
||||
public void renameBook(String newName) {
|
||||
File oldDir = new File(Options.get("path.storage"), name);
|
||||
File newDir = new File(Options.get("path.storage"), newName);
|
||||
|
||||
if (newDir.exists()) {
|
||||
JOptionPane.showMessageDialog(AudiobookRecorder.window, "Book already exists", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (newDir.exists()) {
|
||||
JOptionPane.showMessageDialog(AudiobookRecorder.window, "Book already exists", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (oldDir.exists() && oldDir.isDirectory()) {
|
||||
oldDir.renameTo(newDir);
|
||||
name = newName;
|
||||
AudiobookRecorder.window.saveBookStructure();
|
||||
AudiobookRecorder.window.bookTreeModel.reload(this);
|
||||
Options.set("path.last-book", name);
|
||||
Options.savePreferences();
|
||||
}
|
||||
if (oldDir.exists() && oldDir.isDirectory()) {
|
||||
oldDir.renameTo(newDir);
|
||||
name = newName;
|
||||
AudiobookRecorder.window.saveBookStructure();
|
||||
AudiobookRecorder.window.bookTreeModel.reload(this);
|
||||
Options.set("path.last-book", name);
|
||||
Options.savePreferences();
|
||||
AudiobookRecorder.window.setTitle("AudioBook Recorder :: " + name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class BookInfoPanel extends JPanel {
|
||||
|
||||
@@ -11,8 +12,9 @@ public class BookInfoPanel extends JPanel {
|
||||
JTextField author;
|
||||
JTextField genre;
|
||||
JTextField comment;
|
||||
JTextField acx;
|
||||
|
||||
public BookInfoPanel(String t, String a, String g, String c) {
|
||||
public BookInfoPanel(String t, String a, String g, String c, String x) {
|
||||
super();
|
||||
setLayout(new GridBagLayout());
|
||||
GridBagConstraints con = new GridBagConstraints();
|
||||
@@ -56,37 +58,36 @@ public class BookInfoPanel extends JPanel {
|
||||
con.gridx = 0;
|
||||
con.gridy++;
|
||||
|
||||
add(new JLabel("AXC Code:"), con);
|
||||
con.gridx = 1;
|
||||
acx = new JTextField(x);
|
||||
acx.setPreferredSize(new Dimension(200, 20));
|
||||
add(acx, con);
|
||||
|
||||
con.gridx = 0;
|
||||
con.gridy++;
|
||||
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title.getText();
|
||||
public String getTitle() { return title.getText(); }
|
||||
public String getAuthor() { return author.getText(); }
|
||||
public String getGenre() { return genre.getText(); }
|
||||
public String getComment() { return comment.getText(); }
|
||||
|
||||
public String getACX() {
|
||||
Pattern p = Pattern.compile("\\/titleview\\/([A-Z0-9]{14})");
|
||||
Matcher m = p.matcher(acx.getText());
|
||||
if (m.find()) {
|
||||
System.err.println(m);
|
||||
return m.group(1);
|
||||
}
|
||||
return acx.getText();
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author.getText();
|
||||
}
|
||||
public void setTitle(String t) { title.setText(t); }
|
||||
public void setAuthor(String a) { author.setText(a); }
|
||||
public void setGenre(String g) { genre.setText(g); }
|
||||
public void setComment(String c) { comment.setText(c); }
|
||||
public void setACX(String a) { acx.setText(a); }
|
||||
|
||||
public String getGenre() {
|
||||
return genre.getText();
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment.getText();
|
||||
}
|
||||
|
||||
public void setTitle(String t) {
|
||||
title.setText(t);
|
||||
}
|
||||
|
||||
public void setAuthor(String a) {
|
||||
author.setText(a);
|
||||
}
|
||||
|
||||
public void setGenre(String g) {
|
||||
genre.setText(g);
|
||||
}
|
||||
|
||||
public void setComment(String c) {
|
||||
comment.setText(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,24 +28,48 @@ public class BookPanel extends JPanel {
|
||||
|
||||
boolean highlight = false;
|
||||
|
||||
public BookPanel(Properties p, ImageIcon i) {
|
||||
loadBookData(p, i);
|
||||
}
|
||||
|
||||
public BookPanel(File r) {
|
||||
try {
|
||||
root = r;
|
||||
Properties props = new Properties();
|
||||
props.loadFromXML(new FileInputStream(new File(root, "audiobook.abk")));
|
||||
loadBookData(props, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void loadBookData(Properties props, ImageIcon i) {
|
||||
try {
|
||||
name = props.getProperty("book.name");
|
||||
author = props.getProperty("book.author");
|
||||
genre = props.getProperty("book.genre");
|
||||
comment = props.getProperty("book.comment");
|
||||
File icon = new File(root, "coverart.png");
|
||||
if (icon.exists()) {
|
||||
cover = new ImageIcon(icon.getAbsolutePath());
|
||||
if (i == null) {
|
||||
File icon = new File(root, "coverart.png");
|
||||
if (!icon.exists()) {
|
||||
icon = new File(root, "coverart.jpg");
|
||||
}
|
||||
if (!icon.exists()) {
|
||||
icon = new File(root, "coverart.gif");
|
||||
}
|
||||
if (icon.exists()) {
|
||||
cover = new ImageIcon(icon.getAbsolutePath());
|
||||
resizedCover = Utils.getScaledImage(cover.getImage(), 75, 75);
|
||||
iconLabel = new JLabel(new ImageIcon(resizedCover));
|
||||
} else {
|
||||
cover = null;
|
||||
resizedCover = null;
|
||||
iconLabel = new JLabel("");
|
||||
}
|
||||
} else {
|
||||
cover = i;
|
||||
resizedCover = Utils.getScaledImage(cover.getImage(), 75, 75);
|
||||
iconLabel = new JLabel(new ImageIcon(resizedCover));
|
||||
} else {
|
||||
cover = null;
|
||||
resizedCover = null;
|
||||
iconLabel = new JLabel("");
|
||||
}
|
||||
|
||||
iconLabel.setSize(new Dimension(75, 75));
|
||||
|
||||
@@ -11,8 +11,11 @@ public class BookTreeRenderer extends DefaultTreeCellRenderer {
|
||||
if (value instanceof Sentence) {
|
||||
Sentence s = (Sentence)value;
|
||||
|
||||
if (s.isLocked()) {
|
||||
ret.setForeground(new Color(0x20, 0x00, 0x00));
|
||||
if (s.getAttentionFlag()) {
|
||||
ret.setForeground(new Color(0xFF, 0xFF, 0x00));
|
||||
ret.setIcon(Icons.attention);
|
||||
} else if (s.isLocked()) {
|
||||
ret.setForeground(new Color(0x00, 0x80, 0xFF));
|
||||
ret.setIcon(Icons.locked);
|
||||
} else if (s.getStartOffset() == 0) {
|
||||
ret.setIcon(Icons.important);
|
||||
@@ -23,6 +26,7 @@ public class BookTreeRenderer extends DefaultTreeCellRenderer {
|
||||
if (s.isInSample()) {
|
||||
ret.setIcon(Icons.star);
|
||||
}
|
||||
|
||||
} else if (value instanceof Chapter) {
|
||||
ret.setIcon(Icons.chapter);
|
||||
} else if (value instanceof Book) {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Chapter extends DefaultMutableTreeNode {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void exportChapter(ExportDialog exportDialog) throws
|
||||
public void exportChapter(ProgressDialog exportDialog) throws
|
||||
FileNotFoundException, IOException, InputFormatException, NotSupportedException,
|
||||
EncoderException, UnsupportedTagException, InvalidDataException {
|
||||
|
||||
@@ -200,4 +200,18 @@ public class Chapter extends DefaultMutableTreeNode {
|
||||
wavFile.delete();
|
||||
}
|
||||
|
||||
public double getChapterLength() {
|
||||
double totalTime = Options.getInteger("audio.recording.pre-chapter") / 1000d;
|
||||
for (Enumeration s = children(); s.hasMoreElements();) {
|
||||
Sentence sentence = (Sentence)s.nextElement();
|
||||
totalTime += sentence.getLength();
|
||||
if (s.hasMoreElements()) {
|
||||
totalTime += (sentence.getPostGap() / 1000d);
|
||||
} else {
|
||||
totalTime += Options.getInteger("audio.recording.post-chapter") / 1000d;
|
||||
}
|
||||
}
|
||||
return totalTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
51
src/uk/co/majenko/audiobookrecorder/DonationPanel.java
Normal file
51
src/uk/co/majenko/audiobookrecorder/DonationPanel.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package uk.co.majenko.audiobookrecorder;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.border.*;
|
||||
import java.net.*;
|
||||
|
||||
public class DonationPanel extends JPanel {
|
||||
public DonationPanel() {
|
||||
super();
|
||||
setLayout(new BorderLayout());
|
||||
JLabel icon = new JLabel(Icons.dollar);
|
||||
icon.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
add(icon, BorderLayout.WEST);
|
||||
|
||||
JTextArea label = new JTextArea(
|
||||
"Thank you for using AudiobookRecorder by\n" +
|
||||
"Majenko Technologies. This software is\n" +
|
||||
"Free Open Source Software (FOSS). It is\n" +
|
||||
"created and maintained voluntarily with\n" +
|
||||
"no possibility of any profits from it.\n" +
|
||||
"If you enjoy using this software and end\n" +
|
||||
"up making millions of dollars from using\n" +
|
||||
"it we hope that you would maybe kindly\n" +
|
||||
"donate a couple of those dollars to the\n" +
|
||||
"developer to help with the costs of maintaining\n" +
|
||||
"the software.\n" +
|
||||
"\n" +
|
||||
"You can donate by going to:\n" +
|
||||
"\n" +
|
||||
"https://paypal.me/majenko"
|
||||
);
|
||||
|
||||
label.setEditable(false);
|
||||
label.setFocusable(false);
|
||||
label.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
add(label, BorderLayout.CENTER);
|
||||
|
||||
JButton donate = new JButton("Donate!");
|
||||
donate.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Utils.browse("https://paypal.me/majenko");
|
||||
}
|
||||
});
|
||||
|
||||
add(donate, BorderLayout.SOUTH);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,4 +30,6 @@ public class Icons {
|
||||
static public final ImageIcon mic = new ImageIcon(Icons.class.getResource("icons/mic.png"));
|
||||
static public final ImageIcon zoomIn = new ImageIcon(Icons.class.getResource("icons/zoom-in.png"));
|
||||
static public final ImageIcon zoomOut = new ImageIcon(Icons.class.getResource("icons/zoom-out.png"));
|
||||
static public final ImageIcon dollar = new ImageIcon(Icons.class.getResource("icons/dollar.png"));
|
||||
static public final ImageIcon attention = new ImageIcon(Icons.class.getResource("icons/attention.png"));
|
||||
}
|
||||
|
||||
21
src/uk/co/majenko/audiobookrecorder/JButtonSpacePlay.java
Normal file
21
src/uk/co/majenko/audiobookrecorder/JButtonSpacePlay.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package uk.co.majenko.audiobookrecorder;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
public class JButtonSpacePlay extends JButton {
|
||||
public JButtonSpacePlay(ImageIcon i, String tt, ActionListener al) {
|
||||
super(i);
|
||||
getInputMap(JComponent.WHEN_FOCUSED).put(
|
||||
KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0),
|
||||
"startPlayback"
|
||||
);
|
||||
|
||||
setToolTipText(tt);
|
||||
addActionListener(al);
|
||||
setFocusPainted(false);
|
||||
setFocusable(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package uk.co.majenko.audiobookrecorder;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
public class JToggleButtonSpacePlay extends JToggleButton {
|
||||
public JToggleButtonSpacePlay(ImageIcon i, String tt, ActionListener al) {
|
||||
super(i);
|
||||
getInputMap(JComponent.WHEN_FOCUSED).put(
|
||||
KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0),
|
||||
"startPlayback"
|
||||
);
|
||||
|
||||
setToolTipText(tt);
|
||||
addActionListener(al);
|
||||
setFocusPainted(false);
|
||||
setFocusable(false);
|
||||
}
|
||||
}
|
||||
@@ -7,15 +7,15 @@ import java.awt.event.*;
|
||||
|
||||
public class MainToolBar extends JToolBar {
|
||||
|
||||
JButton newBook;
|
||||
JButton openBook;
|
||||
JButton saveBook;
|
||||
JButton newChapter;
|
||||
JButton recordRoomNoise;
|
||||
JButton playSentence;
|
||||
JButton playonSentence;
|
||||
JButton stopPlaying;
|
||||
JButton eq;
|
||||
JButtonSpacePlay newBook;
|
||||
JButtonSpacePlay openBook;
|
||||
JButtonSpacePlay saveBook;
|
||||
JButtonSpacePlay newChapter;
|
||||
JButtonSpacePlay recordRoomNoise;
|
||||
JButtonSpacePlay playSentence;
|
||||
JButtonSpacePlay playonSentence;
|
||||
JButtonSpacePlay stopPlaying;
|
||||
JButtonSpacePlay eq;
|
||||
JToggleButton mic;
|
||||
|
||||
AudiobookRecorder root;
|
||||
@@ -25,27 +25,21 @@ public class MainToolBar extends JToolBar {
|
||||
|
||||
root = r;
|
||||
|
||||
newBook = new JButton(Icons.newBook);
|
||||
newBook.setToolTipText("New Book");
|
||||
newBook.addActionListener(new ActionListener() {
|
||||
newBook = new JButtonSpacePlay(Icons.newBook, "New Book", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.createNewBook();
|
||||
}
|
||||
});
|
||||
add(newBook);
|
||||
|
||||
openBook = new JButton(Icons.openBook);
|
||||
openBook.setToolTipText("Open Book");
|
||||
openBook.addActionListener(new ActionListener() {
|
||||
openBook = new JButtonSpacePlay(Icons.openBook, "Open Book", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.openBook();
|
||||
}
|
||||
});
|
||||
add(openBook);
|
||||
|
||||
saveBook = new JButton(Icons.save);
|
||||
saveBook.setToolTipText("Save Book");
|
||||
saveBook.addActionListener(new ActionListener() {
|
||||
saveBook = new JButtonSpacePlay(Icons.save, "Save Book", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.saveBookStructure();
|
||||
}
|
||||
@@ -54,18 +48,14 @@ public class MainToolBar extends JToolBar {
|
||||
|
||||
addSeparator();
|
||||
|
||||
newChapter = new JButton(Icons.newChapter);
|
||||
newChapter.setToolTipText("New Chapter");
|
||||
newChapter.addActionListener(new ActionListener() {
|
||||
newChapter = new JButtonSpacePlay(Icons.newChapter, "New Chapter", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.addChapter();
|
||||
}
|
||||
});
|
||||
add(newChapter);
|
||||
|
||||
recordRoomNoise = new JButton(Icons.recordRoom);
|
||||
recordRoomNoise.setToolTipText("Record Room Noise");
|
||||
recordRoomNoise.addActionListener(new ActionListener() {
|
||||
recordRoomNoise = new JButtonSpacePlay(Icons.recordRoom, "Record Room Noise", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.recordRoomNoise();
|
||||
}
|
||||
@@ -74,27 +64,21 @@ public class MainToolBar extends JToolBar {
|
||||
|
||||
addSeparator();
|
||||
|
||||
playSentence = new JButton(Icons.play);
|
||||
playSentence.setToolTipText("Play sentence");
|
||||
playSentence.addActionListener(new ActionListener() {
|
||||
playSentence = new JButtonSpacePlay(Icons.play, "Play sentence", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.playSelectedSentence();
|
||||
}
|
||||
});
|
||||
add(playSentence);
|
||||
|
||||
playonSentence = new JButton(Icons.playon);
|
||||
playonSentence.setToolTipText("Play from sentence");
|
||||
playonSentence.addActionListener(new ActionListener() {
|
||||
playonSentence = new JButtonSpacePlay(Icons.playon, "Play from sentence", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.playFromSelectedSentence();
|
||||
}
|
||||
});
|
||||
add(playonSentence);
|
||||
|
||||
stopPlaying = new JButton(Icons.stop);
|
||||
stopPlaying.setToolTipText("Stop playing / recording");
|
||||
stopPlaying.addActionListener(new ActionListener() {
|
||||
stopPlaying = new JButtonSpacePlay(Icons.stop, "Stop playing", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.stopPlaying();
|
||||
}
|
||||
@@ -102,9 +86,7 @@ public class MainToolBar extends JToolBar {
|
||||
add(stopPlaying);
|
||||
|
||||
addSeparator();
|
||||
eq = new JButton(Icons.eq);
|
||||
eq.setToolTipText("Equaliser");
|
||||
eq.addActionListener(new ActionListener() {
|
||||
eq = new JButtonSpacePlay(Icons.eq, "Equaliser", new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
root.showEqualiser();
|
||||
}
|
||||
@@ -114,17 +96,24 @@ public class MainToolBar extends JToolBar {
|
||||
|
||||
addSeparator();
|
||||
|
||||
mic = new JToggleButton(Icons.mic);
|
||||
mic.setToolTipText("Enable/disable microphone");
|
||||
mic.addActionListener(new ActionListener() {
|
||||
mic = new JToggleButtonSpacePlay(Icons.mic, "Enable / disable microphone", new ActionListener() {
|
||||
Color bgCol = null;
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JToggleButton b = (JToggleButton)e.getSource();
|
||||
if (b.isSelected()) {
|
||||
if (!root.enableMicrophone()) {
|
||||
b.setSelected(false);
|
||||
} else {
|
||||
if (bgCol == null) {
|
||||
bgCol = b.getBackground();
|
||||
}
|
||||
b.setBackground(Color.RED);
|
||||
}
|
||||
} else {
|
||||
root.disableMicrophone();
|
||||
if (bgCol != null) {
|
||||
b.setBackground(bgCol);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -135,31 +124,4 @@ public class MainToolBar extends JToolBar {
|
||||
setFloatable(false);
|
||||
}
|
||||
|
||||
public void enableBook() {
|
||||
newChapter.setEnabled(true);
|
||||
recordRoomNoise.setEnabled(true);
|
||||
}
|
||||
|
||||
public void disableBook() {
|
||||
newChapter.setEnabled(false);
|
||||
recordRoomNoise.setEnabled(false);
|
||||
}
|
||||
|
||||
public void enableSentence() {
|
||||
playSentence.setEnabled(true);
|
||||
playonSentence.setEnabled(true);
|
||||
}
|
||||
|
||||
public void disableSentence() {
|
||||
playSentence.setEnabled(false);
|
||||
playonSentence.setEnabled(false);
|
||||
}
|
||||
|
||||
public void enableStop() {
|
||||
stopPlaying.setEnabled(true);
|
||||
}
|
||||
|
||||
public void disableStop() {
|
||||
stopPlaying.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,13 @@ public class Options extends JDialog {
|
||||
JComboBox<KVPair> channelList;
|
||||
JComboBox<KVPair> rateList;
|
||||
JComboBox<KVPair> bitDepth;
|
||||
JComboBox<KVPair> trimMethod;
|
||||
JTextField storageFolder;
|
||||
JTextField archiveFolder;
|
||||
JSpinner preChapterGap;
|
||||
JSpinner postChapterGap;
|
||||
JSpinner postSentenceGap;
|
||||
JSpinner shortSentenceGap;
|
||||
JSpinner postParagraphGap;
|
||||
JTextField ffmpegLocation;
|
||||
JComboBox<KVPair> bitRate;
|
||||
@@ -247,18 +250,21 @@ public class Options extends JDialog {
|
||||
channelList = addDropdown(optionsPanel, "Channels:", getChannelCountList(), get("audio.recording.channels"));
|
||||
rateList = addDropdown(optionsPanel, "Sample rate:", getSampleRateList(), get("audio.recording.samplerate"));
|
||||
bitDepth = addDropdown(optionsPanel, "Sample resolution:", getResolutionList(), get("audio.recording.resolution"));
|
||||
trimMethod = addDropdown(optionsPanel, "Auto-trim method:", getTrimMethods(), get("audio.recording.trim"));
|
||||
|
||||
addSeparator(optionsPanel);
|
||||
|
||||
playbackList = addDropdown(optionsPanel, "Playback device:", getPlaybackMixerList(), get("audio.playback.device"));
|
||||
addSeparator(optionsPanel);
|
||||
storageFolder = addFilePath(optionsPanel, "Storage folder:", get("path.storage"), true);
|
||||
archiveFolder = addFilePath(optionsPanel, "Archive folder:", get("path.archive"), true);
|
||||
|
||||
addSeparator(optionsPanel);
|
||||
|
||||
preChapterGap = addSpinner(optionsPanel, "Default pre-chapter gap:", 0, 5000, 100, getInteger("catenation.pre-chapter"), "ms");
|
||||
postChapterGap = addSpinner(optionsPanel, "Default post-chapter gap:", 0, 5000, 100, getInteger("catenation.post-chapter"), "ms");
|
||||
postSentenceGap = addSpinner(optionsPanel, "Default post-sentence gap:", 0, 5000, 100, getInteger("catenation.post-sentence"), "ms");
|
||||
shortSentenceGap = addSpinner(optionsPanel, "Short post-sentence gap:", 0, 5000, 100, getInteger("catenation.short-sentence"), "ms");
|
||||
postParagraphGap = addSpinner(optionsPanel, "Default post-paragraph gap:", 0, 5000, 100, getInteger("catenation.post-paragraph"), "ms");
|
||||
|
||||
addSeparator(optionsPanel);
|
||||
@@ -277,28 +283,20 @@ public class Options extends JDialog {
|
||||
cacheSize = addSpinner(optionsPanel, "Cache size:", 0, 5000, 1, getInteger("cache.size"), "");
|
||||
|
||||
addSeparator(optionsPanel);
|
||||
|
||||
tabs.add("Options", optionsPanel);
|
||||
|
||||
tabs.add("Options", new JScrollPane(optionsPanel));
|
||||
equaliser = new Equaliser();
|
||||
|
||||
for (int i = 0; i < 31; i++) {
|
||||
equaliser.setChannel(i, Options.getFloat("audio.eq." + i));
|
||||
}
|
||||
|
||||
tabs.add("Default EQ", equaliser);
|
||||
tabs.add("Default EQ", new JScrollPane(equaliser));
|
||||
|
||||
JPanel startScript = new JPanel();
|
||||
startScript.setLayout(new BorderLayout());
|
||||
startupScript = new JTextArea(get("scripts.startup"));
|
||||
startScript.add(startupScript, BorderLayout.CENTER);
|
||||
|
||||
tabs.add("Startup Script", startScript);
|
||||
|
||||
add(tabs, BorderLayout.CENTER);
|
||||
|
||||
|
||||
|
||||
setTitle("Options");
|
||||
|
||||
setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
||||
@@ -444,6 +442,7 @@ public class Options extends JDialog {
|
||||
defaultPrefs.put("audio.recording.channels", "2");
|
||||
defaultPrefs.put("audio.recording.samplerate", "44100");
|
||||
defaultPrefs.put("audio.recording.resolution", "16");
|
||||
defaultPrefs.put("audio.recording.trim", "peak");
|
||||
if (playbackMixers.length > 0) {
|
||||
defaultPrefs.put("audio.playback.device", playbackMixers[0].key);
|
||||
} else {
|
||||
@@ -453,9 +452,11 @@ public class Options extends JDialog {
|
||||
defaultPrefs.put("catenation.pre-chapter", "1000");
|
||||
defaultPrefs.put("catenation.post-chapter", "1500");
|
||||
defaultPrefs.put("catenation.post-sentence", "1000");
|
||||
defaultPrefs.put("catenation.short-sentence", "100");
|
||||
defaultPrefs.put("catenation.post-paragraph", "2000");
|
||||
|
||||
defaultPrefs.put("path.storage", (new File(System.getProperty("user.home"), "Recordings")).toString());
|
||||
defaultPrefs.put("path.archive", (new File(new File(System.getProperty("user.home"), "Recordings"),"archive")).toString());
|
||||
defaultPrefs.put("path.ffmpeg", "");
|
||||
|
||||
defaultPrefs.put("audio.export.bitrate", "256000");
|
||||
@@ -589,12 +590,15 @@ public class Options extends JDialog {
|
||||
set("audio.recording.channels", ((KVPair)channelList.getSelectedItem()).key);
|
||||
set("audio.recording.samplerate", ((KVPair)rateList.getSelectedItem()).key);
|
||||
set("audio.recording.resolution", ((KVPair)bitDepth.getSelectedItem()).key);
|
||||
set("audio.recording.trim", ((KVPair)trimMethod.getSelectedItem()).key);
|
||||
set("audio.playback.device", ((KVPair)playbackList.getSelectedItem()).key);
|
||||
set("path.storage", storageFolder.getText());
|
||||
set("path.archive", archiveFolder.getText());
|
||||
set("path.ffmpeg", ffmpegLocation.getText());
|
||||
set("catenation.pre-chapter", preChapterGap.getValue());
|
||||
set("catenation.post-chapter", postChapterGap.getValue());
|
||||
set("catenation.post-sentence", postSentenceGap.getValue());
|
||||
set("catenation.short-sentence", shortSentenceGap.getValue());
|
||||
set("catenation.post-paragraph", postParagraphGap.getValue());
|
||||
set("audio.export.bitrate", ((KVPair)bitRate.getSelectedItem()).key);
|
||||
set("audio.export.samplerate", ((KVPair)exportRate.getSelectedItem()).key);
|
||||
@@ -652,4 +656,11 @@ public class Options extends JDialog {
|
||||
pairs[0] = new KVPair("16", "16 Bit");
|
||||
return pairs;
|
||||
}
|
||||
|
||||
public static KVPair[] getTrimMethods() {
|
||||
KVPair[] pairs = new KVPair[2];
|
||||
pairs[0] = new KVPair("peak", "Peak Amplitude");
|
||||
pairs[1] = new KVPair("fft", "FFT Analysis");
|
||||
return pairs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.awt.event.*;
|
||||
import java.util.*;
|
||||
import it.sauronsoftware.jave.*;
|
||||
|
||||
public class ExportDialog extends JDialog implements EncoderProgressListener {
|
||||
public class ProgressDialog extends JDialog implements EncoderProgressListener {
|
||||
JLabel message;
|
||||
JLabel icon;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class ExportDialog extends JDialog implements EncoderProgressListener {
|
||||
|
||||
|
||||
|
||||
public ExportDialog(String m) {
|
||||
public ProgressDialog(String m) {
|
||||
super();
|
||||
|
||||
setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
||||
@@ -32,9 +32,12 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
boolean recording;
|
||||
|
||||
boolean inSample;
|
||||
boolean attention = false;
|
||||
|
||||
TargetDataLine line;
|
||||
AudioInputStream inputStream;
|
||||
AudioFormat storedFormat = null;
|
||||
double storedLength = -1d;
|
||||
|
||||
int[] storedAudioData = null;
|
||||
|
||||
@@ -147,9 +150,16 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
}
|
||||
|
||||
storedAudioData = null;
|
||||
storedFormat = null;
|
||||
storedLength = -1;
|
||||
|
||||
if (!id.equals("room-noise")) {
|
||||
autoTrimSamplePeak();
|
||||
String tm = Options.get("audio.recording.trim");
|
||||
if (tm.equals("peak")) {
|
||||
autoTrimSamplePeak();
|
||||
} else if (tm.equals("fft")) {
|
||||
autoTrimSampleFFT();
|
||||
}
|
||||
if (Options.getBoolean("process.sphinx")) {
|
||||
recognise();
|
||||
}
|
||||
@@ -256,6 +266,8 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
end = i;
|
||||
}
|
||||
|
||||
end++;
|
||||
|
||||
if (end <= 0) {
|
||||
end = blocks - 1;
|
||||
}
|
||||
@@ -413,7 +425,7 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
File f = getFile();
|
||||
try {
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(f);
|
||||
AudioFormat format = s.getFormat();
|
||||
AudioFormat format = getAudioFormat();
|
||||
|
||||
int[] samples = null;
|
||||
|
||||
@@ -495,7 +507,7 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
try {
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(f);
|
||||
EqualizerInputStream eq = new EqualizerInputStream(s, 31);
|
||||
AudioFormat format = eq.getFormat();
|
||||
AudioFormat format = getAudioFormat();
|
||||
IIRControls controls = eq.getControls();
|
||||
AudiobookRecorder.window.book.equaliser.apply(controls, format.getChannels());
|
||||
|
||||
@@ -511,56 +523,20 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
}
|
||||
|
||||
public AudioFormat getAudioFormat() {
|
||||
if (storedFormat != null) return storedFormat;
|
||||
|
||||
File f = getFile();
|
||||
try {
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(f);
|
||||
AudioFormat format = s.getFormat();
|
||||
return format;
|
||||
storedFormat = s.getFormat();
|
||||
s.close();
|
||||
return storedFormat;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void play() {
|
||||
File f = getFile();
|
||||
try {
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(f);
|
||||
EqualizerInputStream eq = new EqualizerInputStream(s, 31);
|
||||
|
||||
AudioFormat format = eq.getFormat();
|
||||
|
||||
IIRControls controls = eq.getControls();
|
||||
AudiobookRecorder.window.book.equaliser.apply(controls, format.getChannels());
|
||||
|
||||
int frameSize = format.getFrameSize();
|
||||
|
||||
updateCrossings();
|
||||
|
||||
int pos = crossStartOffset * frameSize;
|
||||
|
||||
SourceDataLine play = AudioSystem.getSourceDataLine(format, Options.getPlaybackMixer());
|
||||
play.open(format);
|
||||
|
||||
play.start();
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
|
||||
eq.skip(pos);
|
||||
|
||||
while (pos < crossEndOffset * frameSize) {
|
||||
int nr = eq.read(buffer);
|
||||
pos += nr;
|
||||
|
||||
play.write(buffer, 0, nr);
|
||||
};
|
||||
play.drain();
|
||||
play.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] getRawAudioData() {
|
||||
File f = getFile();
|
||||
try {
|
||||
@@ -569,7 +545,7 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
EqualizerInputStream eq = new EqualizerInputStream(s, 31);
|
||||
|
||||
|
||||
AudioFormat format = eq.getFormat();
|
||||
AudioFormat format = getAudioFormat();
|
||||
IIRControls controls = eq.getControls();
|
||||
AudiobookRecorder.window.book.equaliser.apply(controls, format.getChannels());
|
||||
|
||||
@@ -599,66 +575,68 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void doRecognition(StreamSpeechRecognizer recognizer) {
|
||||
try {
|
||||
setText("[recognising...]");
|
||||
AudiobookRecorder.window.bookTreeModel.reload(this);
|
||||
|
||||
AudioFormat format = getAudioFormat();
|
||||
|
||||
byte[] inData = getRawAudioData();
|
||||
int inLength = inData.length;
|
||||
int bps = format.getFrameSize();
|
||||
int inSamples = inLength / bps;
|
||||
|
||||
int outSamples = inSamples / 4;
|
||||
byte[] outData = new byte[outSamples * bps];
|
||||
|
||||
for (int i = 0; i < outSamples; i++) {
|
||||
for (int j = 0; j < bps; j++) {
|
||||
outData[i * bps + j] = inData[(i * 4) * bps + j];
|
||||
}
|
||||
}
|
||||
|
||||
ByteArrayInputStream bas = new ByteArrayInputStream(outData);
|
||||
recognizer.startRecognition(bas);
|
||||
SpeechResult result;
|
||||
String res = "";
|
||||
while ((result = recognizer.getResult()) != null) {
|
||||
res += result.getHypothesis();
|
||||
res += " ";
|
||||
}
|
||||
recognizer.stopRecognition();
|
||||
|
||||
text = res;
|
||||
|
||||
AudiobookRecorder.window.bookTreeModel.reload(Sentence.this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void recognise() {
|
||||
|
||||
|
||||
Thread t = new Thread(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
Configuration sphinxConfig = new Configuration();
|
||||
|
||||
sphinxConfig.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");
|
||||
sphinxConfig.setDictionaryPath("resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict");
|
||||
sphinxConfig.setLanguageModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us.lm.bin");
|
||||
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(getFile());
|
||||
AudioFormat format = getAudioFormat();
|
||||
|
||||
sphinxConfig.setSampleRate((int)(format.getSampleRate() / 4f));
|
||||
|
||||
StreamSpeechRecognizer recognizer;
|
||||
|
||||
recognizer = new StreamSpeechRecognizer(sphinxConfig);
|
||||
|
||||
AudioInputStream s = AudioSystem.getAudioInputStream(getFile());
|
||||
AudioFormat format = s.getFormat();
|
||||
int frameSize = format.getFrameSize();
|
||||
int length = (int)s.getFrameLength();
|
||||
byte[] data = new byte[length * frameSize];
|
||||
|
||||
s.read(data);
|
||||
|
||||
int channels = format.getChannels();
|
||||
int newLen = (length / 3);
|
||||
byte[] decimated = new byte[newLen * 2];
|
||||
|
||||
for (int i = 0; i < newLen; i++) {
|
||||
if (channels == 1) {
|
||||
decimated[i * 2] = data[i * 6];
|
||||
decimated[i * 2 + 1] = data[i * 6 + 1];
|
||||
} else {
|
||||
decimated[i * 2] = data[i * 12];
|
||||
decimated[i * 2 + 1] = data[i * 12 + 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ByteArrayInputStream bas = new ByteArrayInputStream(decimated);
|
||||
recognizer.startRecognition(bas);
|
||||
SpeechResult result;
|
||||
String res = "";
|
||||
while ((result = recognizer.getResult()) != null) {
|
||||
res += result.getHypothesis();
|
||||
res += " ";
|
||||
}
|
||||
recognizer.stopRecognition();
|
||||
|
||||
text = res;
|
||||
|
||||
AudiobookRecorder.window.bookTreeModel.reload(Sentence.this);
|
||||
|
||||
doRecognition(recognizer);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -727,4 +705,40 @@ public class Sentence extends DefaultMutableTreeNode implements Cacheable {
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
/* Get the length of the sample in seconds */
|
||||
public double getLength() {
|
||||
if (storedLength > -1d) return storedLength;
|
||||
AudioFormat format = getAudioFormat();
|
||||
float sampleFrequency = format.getFrameRate();
|
||||
int length = crossEndOffset - crossStartOffset;
|
||||
double time = (double)length / (double)sampleFrequency;
|
||||
storedLength = time;
|
||||
return time;
|
||||
}
|
||||
|
||||
public Sentence cloneSentence() throws IOException {
|
||||
Sentence sentence = new Sentence();
|
||||
sentence.setPostGap(getPostGap());
|
||||
if (!id.equals(text)) {
|
||||
sentence.setText(text);
|
||||
}
|
||||
sentence.setStartOffset(getStartOffset());
|
||||
sentence.setEndOffset(getEndOffset());
|
||||
|
||||
File from = getFile();
|
||||
File to = sentence.getFile();
|
||||
Files.copy(from.toPath(), to.toPath());
|
||||
|
||||
sentence.updateCrossings();
|
||||
return sentence;
|
||||
}
|
||||
|
||||
public void setAttentionFlag(boolean f) {
|
||||
attention = f;
|
||||
}
|
||||
|
||||
public boolean getAttentionFlag() {
|
||||
return attention;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.awt.image.*;
|
||||
import javax.swing.border.*;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
public class Utils {
|
||||
public static Image getScaledImage(Image srcImg, int w, int h){
|
||||
@@ -46,4 +47,12 @@ public class Utils {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public static void browse(String url) {
|
||||
if (Desktop.isDesktopSupported()) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI(url));
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
int leftMarkerSaved = 0;
|
||||
int rightMarkerSaved = 0;
|
||||
|
||||
int playMarker = 0;
|
||||
|
||||
int leftAltMarker = 0;
|
||||
int rightAltMarker = 0;
|
||||
|
||||
@@ -126,6 +128,10 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
g.drawLine((leftMarker - offset)/step, 0, (leftMarker - offset)/step, h);
|
||||
g.drawLine((rightMarker - offset)/step, 0, (rightMarker - offset)/step, h);
|
||||
|
||||
g.setColor(new Color(0, 255, 255));
|
||||
for (int i = 0; i < h; i += 2) {
|
||||
g.drawLine((playMarker - offset) / step, i, (playMarker - offset) / step, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +174,7 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
|
||||
public void setData(int[] s) {
|
||||
samples = s;
|
||||
playMarker = 0;
|
||||
repaint();
|
||||
}
|
||||
|
||||
@@ -185,13 +192,13 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
|
||||
public void mousePressed(MouseEvent e) {
|
||||
int x = e.getX();
|
||||
if ((x >= ((leftMarker - offset)/step) - 2) && (x <= ((leftMarker - offset)/step) + 2)) {
|
||||
if ((x >= ((leftMarker - offset)/step) - 10) && (x <= ((leftMarker - offset)/step) + 10)) {
|
||||
leftMarkerSaved = leftMarker;
|
||||
rightMarkerSaved = rightMarker;
|
||||
dragging = 1;
|
||||
return;
|
||||
}
|
||||
if ((x >= ((rightMarker - offset)/step) - 2) && (x <= ((rightMarker - offset)/step) + 2)) {
|
||||
if ((x >= ((rightMarker - offset)/step) - 10) && (x <= ((rightMarker - offset)/step) + 10)) {
|
||||
rightMarkerSaved = rightMarker;
|
||||
leftMarkerSaved = leftMarker;
|
||||
dragging = 2;
|
||||
@@ -219,11 +226,11 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
|
||||
public void mouseMoved(MouseEvent e) {
|
||||
int x = e.getX();
|
||||
if ((x >= ((leftMarker - offset)/step) - 2) && (x <= ((leftMarker - offset)/step) + 2)) {
|
||||
if ((x >= ((leftMarker - offset)/step) - 10) && (x <= ((leftMarker - offset)/step) + 10)) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
|
||||
return;
|
||||
}
|
||||
if ((x >= ((rightMarker - offset)/step) - 2) && (x <= ((rightMarker - offset)/step) + 2)) {
|
||||
if ((x >= ((rightMarker - offset)/step) - 10) && (x <= ((rightMarker - offset)/step) + 10)) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR));
|
||||
return;
|
||||
}
|
||||
@@ -271,4 +278,8 @@ public class Waveform extends JPanel implements MouseListener, MouseMotionListen
|
||||
repaint();
|
||||
}
|
||||
|
||||
public void setPlayMarker(int m) {
|
||||
playMarker = leftAltMarker + m;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user