From 4bd4e1c43ff78f2b00677ca16c52c99bb4272659 Mon Sep 17 00:00:00 2001 From: tth Date: Wed, 13 May 2020 12:38:06 +0200 Subject: [PATCH] coronacommit --- build.sh | 2 +- files/smpllist.c | 3 +-- interactive.c | 22 ++++++++++++++++++++++ main.c | 17 +++++++++-------- nclooper.h | 1 - 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index fe05138..70474b9 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ function build { -echo ============= $1 ============== +echo =================== $1 ==================== curdir=${PWD} cd $1 make t diff --git a/files/smpllist.c b/files/smpllist.c index 7e0c79c..550ba8d 100644 --- a/files/smpllist.c +++ b/files/smpllist.c @@ -101,7 +101,6 @@ fprintf(stderr, ">>> %s ( '%s' )\n", __func__, fname); /* * first step : clean the current list */ - for (foo=0; foo<26; foo++) { memset(samples+foo, 0, sizeof(SampleRef)); } @@ -126,7 +125,7 @@ while (NULL != fgets(line, T_LINE, fp)) { memset(&sample, 0, sizeof(SampleRef)); foo = decode_la_ligne(line, &sample); -#if DEBUG_LEVEL +#if DEBUG_LEVEL > 1 fprintf(stderr, "decode la ligne -> %d\n\n", foo); #endif if (!foo) { diff --git a/interactive.c b/interactive.c index ab2e08a..0468c03 100644 --- a/interactive.c +++ b/interactive.c @@ -3,6 +3,7 @@ */ #include +#include #include "nclooper.h" @@ -13,11 +14,32 @@ extern int verbosity; /* --------------------------------------------------------------------- */ int enter_interactive(SampleRef *psmpl, int notused) { +int foo, row, col; +char txt[99]; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %d )\n", __func__, psmpl, notused); #endif + +for (foo=0; foo<26; foo++) { + + idx2position(foo, &row, &col); + sprintf(txt, "%3d", foo); + mvaddstr(row, col, txt); + + if (psmpl[foo].key) { + standout(); + mvaddch(row, col+4, psmpl[foo].key); + standend(); + } + + refresh(); + + } + +sleep(3); + return -1; } /* --------------------------------------------------------------------- */ diff --git a/main.c b/main.c index ed979a4..0b40ae2 100644 --- a/main.c +++ b/main.c @@ -14,7 +14,7 @@ int verbosity; -SampleRef the_samples[26]; +SampleRef the_samples[26]; /* --------------------------------------------------------------------- */ void help(int k) @@ -28,7 +28,8 @@ exit(0); */ int introduction(int k) { -int foo; +int foo; +ao_device *device; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %d )\n", __func__, k); @@ -37,12 +38,15 @@ fprintf(stderr, ">>> %s ( %d )\n", __func__, k); foo = init_ecran(__func__); sleep(1); +/* check the sound subsystem */ + + return -1; } /* --------------------------------------------------------------------- */ int conclusion(int k) { -int foo; +int foo; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %d )\n", __func__, k); @@ -75,11 +79,8 @@ fprintf(stderr, "argc = %d, optind = %d\n", argc, optind); foo = lecture_liste_des_samples(listname, the_samples); fprintf(stderr,"retour lecture liste '%s' -> %d\n", listname, foo); -for (foo=0; foo<26; foo++) { - printf("%2d %02x %-30s %s\n", foo, the_samples[foo].key, - the_samples[foo].text, - the_samples[foo].path); - } +foo = start_the_engine(); +fprintf(stderr,"retour start engine -> %d\n", foo); introduction(0); diff --git a/nclooper.h b/nclooper.h index 512391e..0e9cf51 100644 --- a/nclooper.h +++ b/nclooper.h @@ -20,5 +20,4 @@ typedef struct { #include "ui/ncfuncs.h" - int enter_interactive(SampleRef *, int notused);