From bd6ec9c0ed9fe94ae2f6e171969ae8a9fe45c11d Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Mon, 16 Dec 2019 00:59:33 -0600 Subject: [PATCH] Misc changes to get new Nyquist to build --- lib-src/libnyquist/nyquist/cmt/cmtio.h | 4 ++-- lib-src/libnyquist/nyquist/cmt/userio.c | 4 ++++ lib-src/libnyquist/nyquist/nyqsrc/seqfnint.c | 4 ++-- lib-src/libnyquist/nyquist/nyqsrc/seqinterf.c | 1 + lib-src/libnyquist/nyquist/nyqsrc/sndwritepa.c | 2 +- lib-src/libnyquist/nyquist/sys/unix/io.c | 6 +++--- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib-src/libnyquist/nyquist/cmt/cmtio.h b/lib-src/libnyquist/nyquist/cmt/cmtio.h index 3e50ad957..232862b50 100644 --- a/lib-src/libnyquist/nyquist/cmt/cmtio.h +++ b/lib-src/libnyquist/nyquist/cmt/cmtio.h @@ -1,7 +1,7 @@ #define NOCHAR -2 -int IOinputfd; -int IOnochar; +extern int IOinputfd; +extern int IOnochar; int IOsetup(int inputfd); int IOcleanup(void); diff --git a/lib-src/libnyquist/nyquist/cmt/userio.c b/lib-src/libnyquist/nyquist/cmt/userio.c index 35cc43b6a..0c7e9972d 100644 --- a/lib-src/libnyquist/nyquist/cmt/userio.c +++ b/lib-src/libnyquist/nyquist/cmt/userio.c @@ -153,6 +153,10 @@ extern int debug; #include "xlisp.h" #endif +int IOinputfd; /* input file descriptor (usually 0) */ + +int IOnochar; /* Value to be returned by IOgetchar() + where there is no input to be had */ /**************************************************************************** * diff --git a/lib-src/libnyquist/nyquist/nyqsrc/seqfnint.c b/lib-src/libnyquist/nyquist/nyqsrc/seqfnint.c index 5d2cc9345..8781cfc24 100644 --- a/lib-src/libnyquist/nyquist/nyqsrc/seqfnint.c +++ b/lib-src/libnyquist/nyquist/nyqsrc/seqfnint.c @@ -186,6 +186,8 @@ LVAL xlc_seq_get(void) } +#include "seqmwrite.h" + /* xlc_seq_write_smf -- interface to C routine seq_xlwrite_smf */ /**/ LVAL xlc_seq_write_smf(void) @@ -214,8 +216,6 @@ LVAL xlc_seq_read_smf(void) } -#include "seqmwrite.h" - #include "seqread.h" /* xlc_seq_read -- interface to C routine seq_read */ diff --git a/lib-src/libnyquist/nyquist/nyqsrc/seqinterf.c b/lib-src/libnyquist/nyquist/nyqsrc/seqinterf.c index 5bb617536..9d8d030a4 100644 --- a/lib-src/libnyquist/nyquist/nyqsrc/seqinterf.c +++ b/lib-src/libnyquist/nyquist/nyqsrc/seqinterf.c @@ -10,6 +10,7 @@ #include "moxc.h" #include "seq.h" #include "seqinterf.h" +#include "seqmwrite.h" /* seq_next -- advance to the next event, return TRUE if found */ /**/ diff --git a/lib-src/libnyquist/nyquist/nyqsrc/sndwritepa.c b/lib-src/libnyquist/nyquist/nyqsrc/sndwritepa.c index 39759957c..b59a58a85 100644 --- a/lib-src/libnyquist/nyquist/nyqsrc/sndwritepa.c +++ b/lib-src/libnyquist/nyquist/nyqsrc/sndwritepa.c @@ -462,7 +462,7 @@ double sound_save( buf, &ntotal); *duration = ntotal / *sr; if (sndfile) sf_close(sndfile); - if (play != NIL) finish_audio(audio_stream); + if (play != NIL) finish_audio(); } else { xlerror("sound_save: expression did not return a sound", result); diff --git a/lib-src/libnyquist/nyquist/sys/unix/io.c b/lib-src/libnyquist/nyquist/sys/unix/io.c index 21b2abed8..f3e499c0d 100644 --- a/lib-src/libnyquist/nyquist/sys/unix/io.c +++ b/lib-src/libnyquist/nyquist/sys/unix/io.c @@ -16,10 +16,10 @@ #include #include "cext.h" -int IOinputfd; /* input file descriptor (usually 0) */ +extern int IOinputfd; /* input file descriptor (usually 0) */ -int IOnochar; /* Value to be returned by IOgetchar() - where there is no input to be had */ +extern int IOnochar; /* Value to be returned by IOgetchar() + where there is no input to be had */ static struct sgttyb IOoldmodes, IOcurrentmodes; /* Initial and current tty modes */