Subject: Re: [linux-audio-user] [ANN] dssi-vst 0.3
From: Jack O'Quin (joq_AT_io.com)
Date: Thu Nov 04 2004 - 20:40:07 EET
Chris Cannam <cannam_AT_all-day-breakfast.com> writes:
> On Thursday 04 Nov 2004 16:18, Jack O'Quin wrote:
> > While you're at it, it doesn't compile with gcc-2.95 either (due to
> > C99-style declarations in the middle of compound statements)...
>
> Damn it, I hate the fact that C allows that now. I only ever do it by
> accident (the C++ side of my brain taking over) and it bothers me that the
> compiler no longer rejects it.
While the language change is clearly an improvement, it's annoying
because portable programs still need to support the old compilers for
a few more years.
I'd think gcc-3.x would have an option to warn about this usage.
> I don't suppose you could work up a patch for it? I will do it if you don't
> have the time, but I don't have an old enough compiler to test it with so I
> might miss something, being stupid and all.
Sure. This makes it compile cleanly on Debian woody. I have not run
any tests, yet.
diff -ruN -X /home/joq/bin/qdiff.exclude dssi-0.9/examples/trivial_sampler.c dssi-0.9-gcc-2.95/examples/trivial_sampler.c
--- dssi-0.9/examples/trivial_sampler.c Fri Oct 22 10:05:11 2004
+++ dssi-0.9-gcc-2.95/examples/trivial_sampler.c Thu Nov 4 11:33:04 2004
@@ -446,8 +446,8 @@
}
} else {
for (i = 0; i < samples; ++i) {
- tmpSamples[0][i] = 0.0f;
int j;
+ tmpSamples[0][i] = 0.0f;
for (j = 0; j < info.channels; ++j) {
tmpSamples[0][i] += tmpFrames[i * info.channels + j];
}
diff -ruN -X /home/joq/bin/qdiff.exclude dssi-0.9/fluidsynth-dssi/Makefile dssi-0.9-gcc-2.95/fluidsynth-dssi/Makefile
--- dssi-0.9/fluidsynth-dssi/Makefile Mon Nov 1 13:37:35 2004
+++ dssi-0.9-gcc-2.95/fluidsynth-dssi/Makefile Thu Nov 4 12:24:02 2004
@@ -16,7 +16,7 @@
# 3. Adjust anything here as needed:
-OPTIMIZATION_CFLAGS = -O2 -s -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -finline-limit=5000 -minline-all-stringops -Winline
+OPTIMIZATION_CFLAGS = -O2 -s -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -Winline
PLUGIN_CFLAGS = -Wall -I. -I../dssi -I$(FLUID_INCLUDE) -I$(FLUID_SRC) $(OPTIMIZATION_CFLAGS)
PLUGIN_LDFLAGS = -nostartfiles -shared
diff -ruN -X /home/joq/bin/qdiff.exclude dssi-0.9/jack-dssi-host/jack-dssi-host.c dssi-0.9-gcc-2.95/jack-dssi-host/jack-dssi-host.c
--- dssi-0.9/jack-dssi-host/jack-dssi-host.c Tue Nov 2 08:14:49 2004
+++ dssi-0.9-gcc-2.95/jack-dssi-host/jack-dssi-host.c Thu Nov 4 11:32:16 2004
@@ -473,6 +473,8 @@
while ((element = strtok(path, ":")) != 0) {
+ char *filePath;
+
path = 0;
if (element[0] != '/') {
@@ -486,7 +488,7 @@
fprintf(stderr, "%s: Looking for library \"%s\" in %s... ", myName, dllName, element);
}
- char *filePath = (char *)malloc(strlen(element) + strlen(dllName) + 2);
+ filePath = (char *)malloc(strlen(element) + strlen(dllName) + 2);
sprintf(filePath, "%s/%s", element, dllName);
if ((handle = dlopen(filePath, RTLD_NOW))) { /* real-time programs should not use RTLD_LAZY */
@@ -687,6 +689,7 @@
char *url;
int i, reps, j;
int in, out, controlIn, controlOut;
+ char clientName[33];
setsid();
sigemptyset (&_signals);
@@ -969,7 +972,6 @@
/* Create buffers and JACK client and ports */
- char clientName[33];
if (instance_count > 1) strcpy(clientName, "jack-dssi-host");
else {
strncpy(clientName, plugin->descriptor->LADSPA_Plugin->Name, 32);
@@ -1301,9 +1303,9 @@
for (i = 0; i < controlInsTotal; ++i) {
if (pluginPortUpdated[i]) {
- instance = pluginControlInInstances[i];
int port = pluginControlInPortNumbers[i];
float value = pluginControlIns[i];
+ instance = pluginControlInInstances[i];
pluginPortUpdated[i] = 0;
if (instance->uiTarget) {
lo_send(instance->uiTarget, instance->ui_osc_control_path, "if", port, value);
-- joq
This archive was generated by hypermail 2b28 : Thu Nov 04 2004 - 20:46:11 EET