mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 00:51:12 +02:00
Update libvorbis to 1.3.3.
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: linear scale -> dB, Bark and Mel scales
|
||||
last mod: $Id: scales.h,v 1.7 2008-02-02 15:53:54 richardash1981 Exp $
|
||||
last mod: $Id: scales.h 16227 2009-07-08 06:58:46Z xiphmont $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -21,11 +21,16 @@
|
||||
#include <math.h>
|
||||
#include "os.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* MS Visual Studio doesn't have C99 inline keyword. */
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
/* 20log10(x) */
|
||||
#define VORBIS_IEEE_FLOAT32 1
|
||||
#ifdef VORBIS_IEEE_FLOAT32
|
||||
|
||||
static float unitnorm(float x){
|
||||
static inline float unitnorm(float x){
|
||||
union {
|
||||
ogg_uint32_t i;
|
||||
float f;
|
||||
@@ -36,7 +41,7 @@ static float unitnorm(float x){
|
||||
}
|
||||
|
||||
/* Segher was off (too high) by ~ .3 decibel. Center the conversion correctly. */
|
||||
static float todB(const float *x){
|
||||
static inline float todB(const float *x){
|
||||
union {
|
||||
ogg_uint32_t i;
|
||||
float f;
|
||||
@@ -58,9 +63,9 @@ static float unitnorm(float x){
|
||||
#define todB(x) (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f)
|
||||
#define todB_nn(x) (*(x)==0.f?-400.f:log(*(x))*8.6858896f)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define fromdB(x) (exp((x)*.11512925f))
|
||||
#define fromdB(x) (exp((x)*.11512925f))
|
||||
|
||||
/* The bark scale equations are approximations, since the original
|
||||
table was somewhat hand rolled. The below are chosen to have the
|
||||
@@ -83,4 +88,3 @@ static float unitnorm(float x){
|
||||
#define fromOC(o) (exp(((o)+5.965784f)*.693147f))
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user