Browse Source

coronacommit

tth 6 months ago
parent
commit
4bd4e1c43f
5 changed files with 33 additions and 12 deletions
  1. 1
    1
      build.sh
  2. 1
    2
      files/smpllist.c
  3. 22
    0
      interactive.c
  4. 9
    8
      main.c
  5. 0
    1
      nclooper.h

+ 1
- 1
build.sh View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 function build
6 6
 {
7
-echo ============= $1 ==============
7
+echo =================== $1 ====================
8 8
 curdir=${PWD}
9 9
 cd $1
10 10
 make t

+ 1
- 2
files/smpllist.c View File

@@ -101,7 +101,6 @@ fprintf(stderr, ">>> %s ( '%s' )\n", __func__, fname);
101 101
 /*
102 102
  *	first step : clean the current list
103 103
  */
104
-
105 104
 for (foo=0; foo<26; foo++) {
106 105
 	memset(samples+foo, 0, sizeof(SampleRef));
107 106
 	}
@@ -126,7 +125,7 @@ while (NULL != fgets(line, T_LINE, fp)) {
126 125
 
127 126
 	memset(&sample, 0, sizeof(SampleRef));
128 127
 	foo = decode_la_ligne(line, &sample);
129
-#if DEBUG_LEVEL
128
+#if DEBUG_LEVEL > 1
130 129
 	fprintf(stderr, "decode la ligne -> %d\n\n", foo);
131 130
 #endif
132 131
 	if (!foo) {

+ 22
- 0
interactive.c View File

@@ -3,6 +3,7 @@
3 3
  */
4 4
 
5 5
 #include  <stdio.h>
6
+#include  <unistd.h>
6 7
 
7 8
 #include  "nclooper.h"
8 9
 
@@ -13,11 +14,32 @@ extern int			verbosity;
13 14
 /* --------------------------------------------------------------------- */
14 15
 int enter_interactive(SampleRef *psmpl, int notused)
15 16
 {
17
+int		foo, row, col;
18
+char		txt[99];
16 19
 
17 20
 #if DEBUG_LEVEL
18 21
 fprintf(stderr, ">>> %s ( %p %d )\n", __func__, psmpl, notused);
19 22
 #endif
20 23
 
24
+
25
+for (foo=0; foo<26; foo++) {
26
+
27
+	idx2position(foo, &row, &col);
28
+	sprintf(txt, "%3d", foo);
29
+	mvaddstr(row, col, txt);
30
+
31
+	if (psmpl[foo].key) {
32
+		standout();
33
+		mvaddch(row, col+4, psmpl[foo].key);
34
+		standend();
35
+		}
36
+
37
+	refresh();
38
+
39
+	}
40
+
41
+sleep(3);
42
+
21 43
 return -1;
22 44
 }
23 45
 /* --------------------------------------------------------------------- */

+ 9
- 8
main.c View File

@@ -14,7 +14,7 @@
14 14
 
15 15
 int			verbosity;
16 16
 
17
-SampleRef	the_samples[26];
17
+SampleRef		the_samples[26];
18 18
 
19 19
 /* --------------------------------------------------------------------- */
20 20
 void help(int k)
@@ -28,7 +28,8 @@ exit(0);
28 28
  */
29 29
 int introduction(int k)
30 30
 {
31
-int		foo;
31
+int			foo;
32
+ao_device		*device;
32 33
 
33 34
 #if DEBUG_LEVEL
34 35
 fprintf(stderr, ">>> %s ( %d )\n", __func__, k);
@@ -37,12 +38,15 @@ fprintf(stderr, ">>> %s ( %d )\n", __func__, k);
37 38
 foo = init_ecran(__func__);
38 39
 sleep(1);
39 40
 
41
+/* check the sound subsystem */
42
+
43
+
40 44
 return -1;
41 45
 }
42 46
 /* --------------------------------------------------------------------- */
43 47
 int conclusion(int k)
44 48
 {
45
-int		foo;
49
+int			foo;
46 50
 
47 51
 #if DEBUG_LEVEL
48 52
 fprintf(stderr, ">>> %s ( %d )\n", __func__, k);
@@ -75,11 +79,8 @@ fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
75 79
 foo = lecture_liste_des_samples(listname, the_samples);
76 80
 fprintf(stderr,"retour lecture liste '%s' -> %d\n", listname, foo);
77 81
 
78
-for (foo=0; foo<26; foo++) {
79
-	printf("%2d  %02x  %-30s %s\n", foo, the_samples[foo].key,
80
-					the_samples[foo].text,
81
-					the_samples[foo].path);
82
-	}
82
+foo = start_the_engine();
83
+fprintf(stderr,"retour start engine -> %d\n", foo);
83 84
 
84 85
 introduction(0);
85 86
 

+ 0
- 1
nclooper.h View File

@@ -20,5 +20,4 @@ typedef struct	{
20 20
 #include  "ui/ncfuncs.h"
21 21
 
22 22
 
23
-
24 23
 int enter_interactive(SampleRef *, int notused);

Loading…
Cancel
Save