1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-19 04:30:16 +02:00

New library for math...

... note the swap of target_link_libraries lines in src/CMakeLists.txt,
needed to build at least on macOS, becuase FFT.h must be looked up first in
lib-math, not in lib-src/twolame

Also making a dependency cycle of SampleFormat and Dither!  But we will tolerate
that within one small library.
This commit is contained in:
Paul Licameli
2021-07-03 14:54:29 -04:00
parent 749a0575b6
commit f52dfd3ac3
58 changed files with 131 additions and 133 deletions

View File

@@ -58,33 +58,6 @@
// until proper public headers are created for the stuff in here.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Supported sample formats
// ----------------------------------------------------------------------------
enum sampleFormat : unsigned
{
//! The increasing sequence of these enum values must correspond to the increasing data type width
//! These values persist in saved project files, so must not be changed in later program versions
int16Sample = 0x00020001,
int24Sample = 0x00040001,
floatSample = 0x0004000F,
//! Two synonyms for previous values that might change if more values were added
narrowestSampleFormat = int16Sample,
widestSampleFormat = floatSample,
};
// ----------------------------------------------------------------------------
// Provide the number of bytes a specific sample will take
// ----------------------------------------------------------------------------
#define SAMPLE_SIZE(SampleFormat) (SampleFormat >> 16)
// ----------------------------------------------------------------------------
// Generic pointer to sample data
// ----------------------------------------------------------------------------
typedef char *samplePtr;
typedef const char *constSamplePtr;
// ----------------------------------------------------------------------------
// The type for plugin IDs
// ----------------------------------------------------------------------------