r8brain-free-src
High-quality pro audio sample rate converter library
 
Loading...
Searching...
No Matches
r8bconf.h File Reference

The "configuration" inclusion file you can modify. More...

Go to the source code of this file.

Macros

#define R8B_BASECLASS   :: r8b :: CStdClassAllocator
 Macro defines the name of the class from which all classes that are designed to be created on heap are derived.
 
#define R8B_DSPBASECLASS   R8B_BASECLASS
 Macro defines the name of the class from which all CDSPProcessor objects are derived.
 
#define R8B_EXTFFT   0
 This macro, when equal to 1, extends length of low-pass filters' FFT block by a factor of 2, by zero-padding it.
 
#define R8B_FASTTIMING   0
 This macro, when equal to 1, enables a fast interpolation sample timing technique.
 
#define R8B_FILTER_CACHE_MAX   96
 Macro specifies the number of filters kept in the cache at most.
 
#define R8B_FLOATFFT   0
 The macro enables double-to-float buffer conversions for FFT operations, for algorithms that work with "float" values.
 
#define R8B_FLTTEST   0
 This macro, when equal to 1, enables fractional delay filter bank testing.
 
#define R8B_FRACBANK_CACHE_MAX   12
 Macro specifies the number of whole-number stepping fractional delay filter banks kept in the cache at most.
 
#define R8B_IPP   0
 Set this macro definition to 1 to enable the use of Intel IPP's fast Fourier transform functions. Also uncomment and correct the IPP header inclusion macros.
 
#define R8B_MEMALLOCCLASS   :: r8b :: CStdMemAllocator
 Macro defines the name of the class that implements raw memory allocation functions, see the r8b::CStdMemAllocator class for details.
 
#define R8B_PFFFT   0
 When defined as 1, enables PFFFT routines which are fast, but which are limited to 24-bit precision.
 
#define R8B_PFFFT_DOUBLE   0
 When defined as 1, enables PFFFT "double" routines which are fast, and which provide the highest precision.
 
#define R8BASSERT(e)
 Assertion macro used to check for certain run-time conditions. By default, no action is taken if assertion fails.
 
#define R8BCONSOLE(...)
 Console output macro, used to output various resampler status strings, including filter design parameters, convolver parameters.
 

Detailed Description

The "configuration" inclusion file you can modify.

This is the "configuration" inclusion file for the "r8brain-free-src" sample rate converter. You may redefine the macros here as you see fit.

r8brain-free-src Copyright (c) 2013-2025 Aleksey Vaneev

See the "LICENSE" file for license.

Macro Definition Documentation

◆ R8B_BASECLASS

#define R8B_BASECLASS   :: r8b :: CStdClassAllocator

Macro defines the name of the class from which all classes that are designed to be created on heap are derived.

The default r8b::CStdClassAllocator class uses "stdlib" memory allocation functions.

The classes that are best placed on stack or used as class members are not derived from any class.

◆ R8B_DSPBASECLASS

#define R8B_DSPBASECLASS   R8B_BASECLASS

Macro defines the name of the class from which all CDSPProcessor objects are derived.

The default value is R8B_BASECLASS.

These objects are dynamically allocated, but are not cached in the global static variables.

◆ R8B_EXTFFT

#define R8B_EXTFFT   0

This macro, when equal to 1, extends length of low-pass filters' FFT block by a factor of 2, by zero-padding it.

This usually improves the overall time performance of the resampler at the expense of a higher overall latency (initial processing delay). If such delay is not an issue, setting this macro to 1 is preferrable. This macro can only have a value of 0 or 1.

◆ R8B_FASTTIMING

#define R8B_FASTTIMING   0

This macro, when equal to 1, enables a fast interpolation sample timing technique.

This technique improves interpolation performance (by around 10%) at the expense of a minor sample-timing drift which is on the order of 1e-6 samples per 10 billion output samples. This setting does not apply to whole-number stepping, if it is in use, as such stepping provides zero timing error without performance impact. Also does not apply to cases when a whole-numbered (2X, 3X, etc.) resampling is in the actual use.

◆ R8B_FILTER_CACHE_MAX

#define R8B_FILTER_CACHE_MAX   96

Macro specifies the number of filters kept in the cache at most.

The actual number can be higher, if many different filters are in use at the same time.

◆ R8B_FLOATFFT

#define R8B_FLOATFFT   0

The macro enables double-to-float buffer conversions for FFT operations, for algorithms that work with "float" values.

This macro should not be changed from the default 0 here.

◆ R8B_FLTTEST

#define R8B_FLTTEST   0

This macro, when equal to 1, enables fractional delay filter bank testing.

In this mode, the filter bank becomes a dynamic member of the CDSPFracInterpolator object instead of being a global static object.

◆ R8B_FRACBANK_CACHE_MAX

#define R8B_FRACBANK_CACHE_MAX   12

Macro specifies the number of whole-number stepping fractional delay filter banks kept in the cache at most.

The actual number can be higher, if many different filter banks are in use at the same time. As filter banks are usually big objects, it is advisable to keep this cache size small.

◆ R8B_IPP

#define R8B_IPP   0

Set this macro definition to 1 to enable the use of Intel IPP's fast Fourier transform functions. Also uncomment and correct the IPP header inclusion macros.

Do not forget to call the ippInit() function at the start of the application, before using this library's functions.

◆ R8B_PFFFT

#define R8B_PFFFT   0

When defined as 1, enables PFFFT routines which are fast, but which are limited to 24-bit precision.

May be a good choice for time-series interpolation, when stop-band attenuation higher than 120 dB is not required.

◆ R8BASSERT

#define R8BASSERT ( e)
Value:
(void) 0

Assertion macro used to check for certain run-time conditions. By default, no action is taken if assertion fails.

Parameters
eExpression to check.

◆ R8BCONSOLE

#define R8BCONSOLE ( ...)
Value:
(void) 0

Console output macro, used to output various resampler status strings, including filter design parameters, convolver parameters.

Parameters
...Expression sent to the console. Usually consists of a standard printf() format string followed by several parameters (__VA_ARGS__).