mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-01 22:53:50 +01:00
upgrade to libsoxr 0.0.4 from current git
This commit is contained in:
@@ -12,7 +12,7 @@ set (DESCRIPTION_SUMMARY "One-dimensional sample-rate conversion library")
|
|||||||
|
|
||||||
set (PROJECT_VERSION_MAJOR 0)
|
set (PROJECT_VERSION_MAJOR 0)
|
||||||
set (PROJECT_VERSION_MINOR 0)
|
set (PROJECT_VERSION_MINOR 0)
|
||||||
set (PROJECT_VERSION_PATCH 3)
|
set (PROJECT_VERSION_PATCH 5)
|
||||||
|
|
||||||
# For shared-object; if, since the last public release:
|
# For shared-object; if, since the last public release:
|
||||||
# * library code changed at all: ++revision
|
# * library code changed at all: ++revision
|
||||||
@@ -203,10 +203,6 @@ configure_file (
|
|||||||
${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.h)
|
${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.h)
|
||||||
include_directories (${PROJECT_BINARY_DIR})
|
include_directories (${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
|
||||||
file (COPY doc/logo.png DESTINATION doc)
|
|
||||||
add_custom_target (docs doxygen)
|
|
||||||
|
|
||||||
if (BUILD_TESTS OR BUILD_LSR_TESTS)
|
if (BUILD_TESTS OR BUILD_LSR_TESTS)
|
||||||
enable_testing ()
|
enable_testing ()
|
||||||
endif ()
|
endif ()
|
||||||
@@ -230,6 +226,30 @@ endif ()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Rough-and-ready distclean for anyone still doing in-tree builds:
|
||||||
|
|
||||||
|
if (UNIX)
|
||||||
|
add_custom_target (distclean
|
||||||
|
COMMAND make clean && rm -rf
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
cmake_install.cmake
|
||||||
|
CPackConfig.cmake
|
||||||
|
CPackSourceConfig.cmake
|
||||||
|
deinstall.cmake
|
||||||
|
Makefile
|
||||||
|
soxr-config.h
|
||||||
|
src/CMakeFiles
|
||||||
|
src/cmake_install.cmake
|
||||||
|
src/libsoxr-dev.src
|
||||||
|
src/libsoxr-lsr.pc
|
||||||
|
src/libsoxr.pc
|
||||||
|
src/libsoxr.src
|
||||||
|
src/Makefile)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Deinstallation:
|
# Deinstallation:
|
||||||
|
|
||||||
configure_file (
|
configure_file (
|
||||||
@@ -250,7 +270,7 @@ if (UNIX)
|
|||||||
set (CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
set (CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||||
|
|
||||||
set (CPACK_SOURCE_GENERATOR "TBZ2")
|
set (CPACK_SOURCE_GENERATOR "TBZ2")
|
||||||
set (CPACK_SOURCE_IGNORE_FILES "/Debug/;/Release/;/cpack/;\\\\.swp$;\\\\.gitignore;.*vr32\\\\.c")
|
set (CPACK_SOURCE_IGNORE_FILES "/Debug/;/Release/;/cpack/;\\\\.swp$;\\\\.gitignore")
|
||||||
|
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
SoX Resampler Library Copyright (c) 2007-12 robs@users.sourceforge.net
|
SoX Resampler Library Copyright (c) 2007-12 robs@users.sourceforge.net
|
||||||
|
|
||||||
The SoX Resampler library `libsoxr' performs one-dimensional sample-rate
|
The SoX Resampler library `libsoxr' performs one-dimensional sample-rate
|
||||||
conversion - it may be used, for example, to resample PCM-encoded audio.
|
conversion -- it may be used, for example, to resample PCM-encoded audio.
|
||||||
For higher-dimensional resampling, such as for visual-image processing, you
|
For higher-dimensional resampling, such as for visual-image processing, you
|
||||||
should look elsewhere.
|
should look elsewhere.
|
||||||
|
|
||||||
It aims to be fast (e.g. multi-channel resampling can utilise multiple
|
It aims to give fast¹ and very high quality² results for any constant
|
||||||
CPU-cores), high-quality (i.e. bit-perfect up to 32-bits, for occupied-
|
(rational or irrational) resampling ratio. Phase-response, preserved
|
||||||
bandwidths up to 98%¹), and to allow any rational or irrational resampling
|
bandwidth, aliasing, and rejection level parameters are all configurable;
|
||||||
ratio. Phase-response, preserved bandwidth, aliasing, and rejection level
|
alternatively, simple `preset' configurations may be selected. An
|
||||||
parameters are all configurable; alternatively, simple `preset'
|
experimental, variable-rate resampling mode of operation is also included.
|
||||||
configurations may be selected.
|
|
||||||
|
|
||||||
The resampler is currently available either as part of `libsox' (the audio
|
The resampler is currently available either as part of `libsox' (the audio
|
||||||
file-format and effect library), or stand-alone as `libsoxr' (this package).
|
file-format and effect library), or stand-alone as `libsoxr' (this package).
|
||||||
@@ -20,31 +19,32 @@ support for other effects, or for reading-from or writing-to audio files or
|
|||||||
devices, should use libsox (or other libraries such as libsndfile or
|
devices, should use libsox (or other libraries such as libsndfile or
|
||||||
libavformat).
|
libavformat).
|
||||||
|
|
||||||
Libsoxr provides a simple API that allows interfacing using any commonly-
|
Libsoxr provides a simple API that allows interfacing using the most
|
||||||
used sample format or buffering scheme: clients may use either floating-
|
commonly-used sample formats and buffering schemes: sample-formats may be
|
||||||
point or integer sample formats, and, in the case of multiple channels,
|
either floating-point or integer, and multiple channels either interleaved
|
||||||
either channel-interleaved, or split channels. The API is currently
|
or split in separate buffers. The API is documented in the header file
|
||||||
documented in the header file `soxr.h' and by example code in the 'examples'
|
`soxr.h', together with sample code found in the 'examples' directory.
|
||||||
directory.
|
|
||||||
|
|
||||||
For compatibility with the popular `libsamplerate' library, the header file
|
For compatibility with the popular `libsamplerate' library, the header file
|
||||||
`soxr-lsr.h' is provided and may be used as an alternative API. For details
|
`soxr-lsr.h' is provided and may be used as an alternative API.³ Note
|
||||||
of that API, see http://www.mega-nerd.com/SRC/api.html. Note however, that
|
however, that libsoxr does not provide a full emulation of libsamplerate
|
||||||
libsoxr does not provide a full emulation of libsamplerate; in particular,
|
and that using this approach, only a sub-set of libsoxr's features are
|
||||||
`vari-speeding' is not supported.
|
available.
|
||||||
|
|
||||||
|
The design was inspired by Laurent De Soras' paper `The Quest For The
|
||||||
|
Perfect Resampler', http://ldesoras.free.fr/doc/articles/resampler-en.pdf;
|
||||||
|
in essence, it combines Julius O. Smith's `Bandlimited Interpolation'
|
||||||
|
technique (https://ccrma.stanford.edu/~jos/resample/resample.pdf) with FFT-
|
||||||
|
based over-sampling.
|
||||||
|
|
||||||
|
Note that for real-time resampling, libsoxr may have a higher latency
|
||||||
|
than non-FFT based resamplers. For example, when using the `High Quality'
|
||||||
|
configuration to resample between 44100Hz and 48000Hz, the latency is
|
||||||
|
around 1000 output samples, i.e. roughly 20ms.
|
||||||
|
|
||||||
For build and installation instructions, see the file `INSTALL'; for
|
For build and installation instructions, see the file `INSTALL'; for
|
||||||
copyright and licensing information, see the file `LICENCE'.
|
copyright and licensing information, see the file `LICENCE'.
|
||||||
|
________
|
||||||
The resampler was inspired by Laurent De Soras' paper `The Quest For The
|
¹ For example, multi-channel resampling can utilise multiple CPU-cores.
|
||||||
Perfect Resampler', http://ldesoras.free.fr/doc/articles/resampler-en.pdf;
|
² Bit-perfect within practical occupied-bandwidth limits.
|
||||||
it combines Julius O. Smith's `Bandlimited Interpolation' technique
|
³ For details of that API, see http://www.mega-nerd.com/SRC/api.html.
|
||||||
(https://ccrma.stanford.edu/~jos/resample/resample.pdf) with FFT-based
|
|
||||||
over-sampling.
|
|
||||||
|
|
||||||
Its use of FFTs means that, for real-time resampling, libsoxr may have a
|
|
||||||
higher latency than non-FFT based resamplers. E.g. when using the `High
|
|
||||||
Quality' configuration to resample between 44100Hz and 48kHz, the latency is
|
|
||||||
around 1000 output samples, i.e. roughly 20 ms.
|
|
||||||
|
|
||||||
¹ Note that no practical resampler can be bit-perfect to 100% bandwidth.
|
|
||||||
|
|||||||
4
lib-src/libsoxr/configure
vendored
4
lib-src/libsoxr/configure
vendored
@@ -10,6 +10,4 @@
|
|||||||
|
|
||||||
# Autotools options should not be passed to this script.
|
# Autotools options should not be passed to this script.
|
||||||
|
|
||||||
# Configure for Audacity.
|
cmake $* .
|
||||||
# cmake $* .
|
|
||||||
cmake -DBUILD_SHARED_LIBS=OFF -DWITH_OPENMP=OFF .
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
build=$1
|
build=$1
|
||||||
test x$build = x && build=Release
|
test x$build = x && build=Release
|
||||||
|
|
||||||
|
rm -f CMakeCache.txt # Prevent interference from any in-tree build
|
||||||
|
|
||||||
mkdir -p $build
|
mkdir -p $build
|
||||||
cd $build
|
cd $build
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ rem Licence for this file: LGPL v2.1 See LICENCE for details.
|
|||||||
set build=%1
|
set build=%1
|
||||||
if x%build% == x set build=Release
|
if x%build% == x set build=Release
|
||||||
|
|
||||||
|
rem Prevent interference from any in-tree build
|
||||||
|
del/f CMakeCache.txt
|
||||||
|
|
||||||
mkdir %build%
|
mkdir %build%
|
||||||
cd %build%
|
cd %build%
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user