If you think the Android project voicesmith listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Voicesmith <http://voicesmith.jurihock.de/>
*//fromwww.java2s.com
* Copyright (c) 2011-2014 Juergen Hock
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/package de.jurihock.voicesmith.dsp;
publicfinalclass Math
{
publicstaticfinalfloat PI = (float) java.lang.Math.PI;
publicstaticint round(float value)
{
return java.lang.Math.round(value);
}
publicstaticnativefloat pow(float base, float exponent);
publicstaticnativefloat log10(float value);
publicstaticnativefloat min(float a, float b);
publicstaticnativefloat max(float a, float b);
publicstaticnativefloat floor(float value);
publicstaticnativefloat ceil(float value);
publicstaticnativefloat sin(float angle);
publicstaticnativefloat cos(float angle);
publicstaticnativefloat sqrt(float value);
publicstaticnativefloat atan2(float y, float x);
publicstaticnativefloat abs(float real, float imag);
publicstaticnativefloat arg(float real, float imag);
publicstaticnativefloat real(float abs, float arg);
publicstaticnativefloat imag(float abs, float arg);
publicstaticnativefloat random(float min, float max);
publicstaticnativefloat princarg(float phase);
publicstaticnativeshort mean(short[] buffer, int offset, int length);
publicstaticnativefloat rms(short[] buffer, int offset, int length);
publicstaticnativefloat rms(short[] buffer, int offset, int length, short mean);
publicstaticnativefloat rms2dbfs(float value, float min, float max);
}