mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-15 10:50:40 +00:00
808e0c9b17
Also add it as a dependency for the `SDL_mixer` and `SDL2_mixer` ports. Eawpats GUS patches are installed as part of the port, because without patches TiMidity++ is not able to generate any sound. The license for these is "fameware", credit to Andrew Suffield: https://lists.debian.org/debian-legal/2002/09/msg00137.html
60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jelle Raaijmakers <jelle@gmta.nl>
|
|
Date: Thu, 1 Sep 2022 13:47:34 +0200
|
|
Subject: [PATCH] Calculate Newton coefficients on the fly
|
|
|
|
Since we are cross-compiling, we do not get a binary we can run on the
|
|
host that is able to generate `newton_table.c`, so fall back to the old
|
|
way of generating the table.
|
|
---
|
|
timidity/Makefile.in | 2 --
|
|
timidity/resample.c | 5 +----
|
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
diff --git a/timidity/Makefile.in b/timidity/Makefile.in
|
|
index e4ee43c..a93105e 100644
|
|
--- a/timidity/Makefile.in
|
|
+++ b/timidity/Makefile.in
|
|
@@ -1956,8 +1956,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
|
version.$(OBJEXT): version.c ../configure
|
|
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c $(srcdir)/version.c
|
|
|
|
-resample.c: newton_table.c
|
|
-
|
|
@VCPP_TRUE@newton_table.c: calcnewt$(EXEEXT)
|
|
@VCPP_TRUE@ ./calcnewt $@
|
|
|
|
diff --git a/timidity/resample.c b/timidity/resample.c
|
|
index cd6b8e6..a878526 100644
|
|
--- a/timidity/resample.c
|
|
+++ b/timidity/resample.c
|
|
@@ -46,7 +46,6 @@
|
|
|
|
/* for start/end of samples */
|
|
static float newt_coeffs[58][58] = {
|
|
-#include "newton_table.c"
|
|
};
|
|
|
|
int sample_bounds_min, sample_bounds_max; /* min/max bounds for sample data */
|
|
@@ -468,7 +467,6 @@ void free_gauss_table(void)
|
|
gauss_table[0] = NULL;
|
|
}
|
|
|
|
-#if 0 /* NOT USED */
|
|
/* the was calculated statically in newton_table.c */
|
|
static void initialize_newton_coeffs(void)
|
|
{
|
|
@@ -499,12 +497,11 @@ static void initialize_newton_coeffs(void)
|
|
for (j = 0, sign = pow(-1, i); j <= i; j++, sign *= -1)
|
|
newt_coeffs[i][j] *= sign;
|
|
}
|
|
-#endif /* NOT USED */
|
|
|
|
/* initialize the coefficients of the current resampling algorithm */
|
|
void initialize_resampler_coeffs(void)
|
|
{
|
|
- /* initialize_newton_coeffs(); */
|
|
+ initialize_newton_coeffs();
|
|
initialize_gauss_table(gauss_n);
|
|
/* we don't have to initialize newton table any more */
|
|
|