25.06.2014, 06:18, "Richard Shann" <[email protected]>:
> On Wed, 2014-06-25 at 05:32 -0500, Mike wrote:
>> Trying to build for a system without portaudio I got this:
>>
>> /usr/local/src/denemo-1.1.6/src/audio/pitchrecog.c:381: undefined reference
>> to `pa_main'
>>
>> It seems that that the problem is that audiocapture.o builds without
>> symbols since it is
>> audio/audiocapture.c is #ifdef'fed out, but there pa_main is still called
>> several times in
>> audio/pitchrecog.c
>
> Hmm, a workaround could be to define the symbol as 0 on the command line
> I guess (I think you configure with CFLAGS defining _pa_main) ... and
> then don't try Input->Audio!
>
This seems to work: just allow pa_main to return -1 if PORTAUDIO is not defined:
(patch attached: not sure if the mailing list will allow it)
Mike
diff --git a/src/audio/pitchrecog.c b/src/audio/pitchrecog.c
index 80c246e..3c0b200 100644
--- a/src/audio/pitchrecog.c
+++ b/src/audio/pitchrecog.c
@@ -330,8 +330,17 @@ pitchrecog (float **input, float **output, int nframes)
return Stop;
}
+#ifdef _HAVE_PORTAUDIO_
extern int pa_main (aubio_process_func_t process_func);
+#else
+int
+pa_main (AubioCallback * fn)
+{
+ fprintf (stderr, "portaudio support not compiled\n");
+ return -1;
+}
+#endif
#define START init_aubio();return pa_main(pitchrecog);
#define STOP (void)pa_main(NULL);aubio_finish();
_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel