1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-19 15:06:07 +01:00

Upgrade libsoxr to 0.1.3

This commit is contained in:
Steve Daulton
2018-03-08 16:26:50 +00:00
parent f7f721b52d
commit ccc29c6c76
115 changed files with 4831 additions and 2597 deletions

27
lib-src/libsoxr/tests/eg-test Normal file → Executable file
View File

@@ -1,12 +1,25 @@
#!/bin/bash
# SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net
#!/usr/bin/env bash
set -e
# SoX Resampler Library Copyright (c) 2007-15 robs@users.sourceforge.net
# Licence for this file: LGPL v2.1 See LICENCE for details.
# Exercises each example programme.
len=8
w=$(echo -e "`sox --ver |sed 's/.*SoX v//'` d\n14.4.1 k"|sort -Vr|head -1|sed 's/.* //')
#vg="valgrind --leak-check=full --show-reachable=yes"
# Exercise example 1:
$vg ./1-single-block
# Check that examples 2-4 can convert 96k<->44k1 and that results are same for each:
ir=96000
or=44100
for i in 1 2; do
@@ -22,8 +35,14 @@ for i in 1 2; do
done
rm *.f32
rm ?.png
# Exercise VR making sure that varied internal stage reconfigurations occur:
variations=(slow-sweep fast-changing)
signals=(sine-wave saw-tooth-wave)
for n in 0 1 2 3; do
$vg ./5-variable-rate $n | sox -tf32 -r44100 -c1 - -n spectrogram -hwk -o $n.png -X 50
signal=${signals[`expr $n % 2 || true`]}
variation=${variations[`expr $n / 2 || true`]}
$vg ./5-variable-rate $n | sox -tf32 -r44100 -c1 - -n spectrogram -z130 -hw$w -o v$n-$w.png -X 50 -c "variation:$variation signal:$signal"
vg=""
done