Comparer les révisions

..

Pas de révisions en commun. "4bd4e1c43ff78f2b00677ca16c52c99bb4272659" et "db3d7283df6ba6010b4b99ebdb224dfe8d52edd7" ont des historiques entièrement différents.

14 fichiers modifiés avec 76 ajouts et 175 suppressions

53
.gitignore externe
Voir le fichier

@ -7,7 +7,58 @@ nclooper
ui/t
files/t
sounds/*
# ---> C
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

Voir le fichier

@ -1,22 +1,12 @@
#
# NC-LOOPER --- another kluge from tth
#
CC = gcc
CCOPT = -Wall -g -DDEBUG_LEVEL=0
CCOPT = -Wall -g -DDEBUG_LEVEL=1
OBJS = ui/ncfuncs.o files/smpllist.o files/ffuncs.o
LIBS = -lcurses
all: nclooper
main.o: main.c nclooper.h Makefile
$(CC) ${CCOPT} -c $<
interactive.o: interactive.c nclooper.h Makefile
$(CC) ${CCOPT} -c $<
OBJS += interactive.o
nclooper: main.o ${OBJS} Makefile
$(CC) ${CCOPT} $< ${OBJS} ${LIBS} -o $@

Voir le fichier

@ -1,9 +1,6 @@
#
# NC-LOOPER --- another kluge from tth
#
CC = gcc
CCOPT = -Wall -g -DDEBUG_LEVEL=0
CCOPT = -Wall -g -DDEBUG_LEVEL=1
LIBS = -lao -lsndfile -lm
ao_output.o: ao_output.c Makefile

Voir le fichier

@ -25,7 +25,7 @@ ao_device *device;
int foo;
device = init_ao_output(44100);
if (verbosity) fprintf(stderr, "AO init -> %p\n", device);
fprintf(stderr, "AO init -> %p\n", device);
switch (k) {
case 0:
@ -40,7 +40,7 @@ switch (k) {
}
foo = close_ao_output(device);
if (verbosity) fprintf(stderr, "AO close -> %d\n", foo);
fprintf(stderr, "AO close -> %d\n", foo);
return 0;
}

Voir le fichier

@ -1,37 +0,0 @@
#!/bin/bash
# ------------------------------------------------------------------
function build
{
echo =================== $1 ====================
curdir=${PWD}
cd $1
make t
error=$?
cd ${curdir}
if [ ${error} -ne 0 ]
then
echo === error on $1 = ${error}
exit
fi
}
# ------------------------------------------------------------------
build files
build ui
build audio
# ------------------------------------------------------------------
printf "\n...final...\n"
make
# ------------------------------------------------------------------

Voir le fichier

@ -1,9 +1,5 @@
#
# NC-LOOPER --- another kluge from tth
#
CC = gcc
CCOPT = -Wall -g -DDEBUG_LEVEL=0
CCOPT = -Wall -g -DDEBUG_LEVEL=1
ffuncs.o: ffuncs.c ffuncs.h Makefile
$(CC) ${CCOPT} -c $<

Voir le fichier

@ -10,7 +10,7 @@
#include "smpllist.h"
/* --------------------------------------------------------------------- */
extern int verbosity;
extern int verbosity;
/* --------------------------------------------------------------------- */
void affiche_un_sample(SampleRef *sref, int options)
{
@ -18,17 +18,7 @@ printf("%c %02X [%-20s] %s\n", sref->key, sref->flags, sref->text,
sref->path);
}
/* --------------------------------------------------------------------- */
void affiche_liste_des_samples(SampleRef samples[])
{
int foo;
for (foo=0; foo<26; foo++) {
printf("%2d %02x %-30s %s\n", foo, samples[foo].key,
samples[foo].text,
samples[foo].path);
}
}
/* --------------------------------------------------------------------- */
int decode_la_ligne(char *line, SampleRef *sref)
{
char *ptr, *cp;
@ -101,6 +91,7 @@ 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));
}
@ -125,7 +116,7 @@ while (NULL != fgets(line, T_LINE, fp)) {
memset(&sample, 0, sizeof(SampleRef));
foo = decode_la_ligne(line, &sample);
#if DEBUG_LEVEL > 1
#if DEBUG_LEVEL
fprintf(stderr, "decode la ligne -> %d\n\n", foo);
#endif
if (!foo) {

Voir le fichier

@ -5,8 +5,6 @@
void affiche_un_sample(SampleRef *sref, int options);
void affiche_liste_des_samples(SampleRef samples[]);
int decode_la_ligne(char *line, SampleRef *sref);
int lecture_liste_des_samples(char *fname, SampleRef *array);

Voir le fichier

@ -47,7 +47,10 @@ 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);
affiche_liste_des_samples(the_samples);
for (foo=0; foo<26; foo++) {
printf("%3d %02x %s\n", foo, the_samples[foo].key,
the_samples[foo].text);
}
return 0;
}

Voir le fichier

@ -1,45 +0,0 @@
/*
* NCLOOPER INTERACTIVE
*/
#include <stdio.h>
#include <unistd.h>
#include "nclooper.h"
/* --------------------------------------------------------------------- */
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;
}
/* --------------------------------------------------------------------- */

58
main.c
Voir le fichier

@ -9,12 +9,14 @@
#include <ctype.h>
#include "nclooper.h"
// #include "files/smpllist.h"
// #include "files/ffuncs.h"
/* --------------------------------------------------------------------- */
int verbosity;
SampleRef the_samples[26];
SampleRef the_samples[26];
/* --------------------------------------------------------------------- */
void help(int k)
@ -23,52 +25,18 @@ puts("NcLooper : version pas finie...");
exit(0);
}
/* --------------------------------------------------------------------- */
/*
* all the basic engines are up, we have to fire ncurses
*/
int introduction(int k)
{
int foo;
ao_device *device;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %d )\n", __func__, k);
#endif
foo = init_ecran(__func__);
sleep(1);
/* check the sound subsystem */
return -1;
}
/* --------------------------------------------------------------------- */
int conclusion(int k)
{
int foo;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %d )\n", __func__, k);
#endif
foo = fin_ecran();
return -1;
}
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
int opt;
char *listname = "files/samples.list";
char *listname = "samples.list";
while ((opt = getopt(argc, argv, "hl:v")) != -1) {
switch(opt) {
case 'h': help(0); break;
case 'l': listname = optarg; break;
case 'v': verbosity++; break;
case 'l': listname = optarg; break;
}
}
@ -76,20 +44,14 @@ while ((opt = getopt(argc, argv, "hl:v")) != -1) {
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
#endif
foo = lecture_liste_des_samples(listname, the_samples);
fprintf(stderr,"retour lecture liste '%s' -> %d\n", listname, foo);
foo = start_the_engine();
fprintf(stderr,"retour start engine -> %d\n", foo);
introduction(0);
foo = enter_interactive(the_samples, 0);
#if DEBUG_LEVEL
fprintf(stderr, "retour 'enter interactive' -> %d\n", foo);
#endif
conclusion(0);
for (foo=0; foo<26; foo++) {
printf("%3d %02x %s\n", foo, the_samples[foo].key,
the_samples[foo].text);
}
return 0;
}

Voir le fichier

@ -16,8 +16,3 @@ typedef struct {
#include "files/smpllist.h"
#include "files/ffuncs.h"
#include "ui/ncfuncs.h"
int enter_interactive(SampleRef *, int notused);

Voir le fichier

@ -6,7 +6,7 @@
#include "ncfuncs.h"
/* --------------------------------------------------------------------- */
int init_ecran(const char *txt)
int init_ecran(char *txt)
{
initscr();

Voir le fichier

@ -4,7 +4,7 @@
#include <curses.h>
int init_ecran(const char *txt);
int init_ecran(char *txt);
int fin_ecran(void);
int idx2position(int idx, int *prow, int *pcol);