logging compataibility with emacs
This commit is contained in:
parent
35b9482928
commit
fcf6f76949
|
@ -11,8 +11,8 @@
|
||||||
#define logLevel 0
|
#define logLevel 0
|
||||||
|
|
||||||
//char *logstr[] = { "INFO", "WARN", "\x1b[1;31mERROR\x1b[0m", "CRITICAL" };
|
//char *logstr[] = { "INFO", "WARN", "\x1b[1;31mERROR\x1b[0m", "CRITICAL" };
|
||||||
char *logstr[] = { "INFO", "WARN", "ERROR", "CRITICAL" };
|
char *logstr[] = { "info", "warn", "error", "critical" };
|
||||||
char *catstr[] = {"ENGINE", "SCRIPT"};
|
char *catstr[] = {"engine", "script"};
|
||||||
|
|
||||||
FILE *logfile = NULL;
|
FILE *logfile = NULL;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ void mYughLog(int category, int priority, int line, const char *file, const char
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
char buffer[ERROR_BUFFER] = { '\0' };
|
char buffer[ERROR_BUFFER] = { '\0' };
|
||||||
snprintf(buffer, ERROR_BUFFER, "%s | %s | %s [ %s:%d ] %s\n", logstr[priority], catstr[category], dt, file, line, msgbuffer);
|
snprintf(buffer, ERROR_BUFFER, "%s:%d: %s, %s | %s\n", file, line, logstr[priority], catstr[category], msgbuffer);
|
||||||
|
|
||||||
fprintf(stderr, "%s", buffer);
|
fprintf(stderr, "%s", buffer);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
|
@ -175,10 +175,8 @@ duk_ret_t duk_spline_cmd(duk_context *duk)
|
||||||
duk_put_prop_index(duk, arridx, i);
|
duk_put_prop_index(duk, arridx, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(samples);
|
|
||||||
ts_bspline_free(&spline);
|
ts_bspline_free(&spline);
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
static struct bus bus[256];
|
static struct bus bus[256];
|
||||||
static int first = 0; /* First bus available */
|
static int first = 0; /* First bus available */
|
||||||
//static struct bus *first_on = NULL;
|
|
||||||
static int first_on = -1; /* First bus to fill buffer with */
|
static int first_on = -1; /* First bus to fill buffer with */
|
||||||
short mastermix[BUF_FRAMES*CHANNELS];
|
short mastermix[BUF_FRAMES*CHANNELS];
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ void mixer_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bus *first_free_bus(struct dsp_filter in) {
|
struct bus *first_free_bus(struct dsp_filter in) {
|
||||||
if (!initted) return;
|
if (!initted) return NULL;
|
||||||
assert(initted);
|
assert(initted);
|
||||||
|
|
||||||
if (first == -1) return NULL;
|
if (first == -1) return NULL;
|
||||||
int ret = first;
|
int ret = first;
|
||||||
first = bus[ret].next;
|
first = bus[ret].next;
|
||||||
|
@ -80,5 +80,4 @@ void bus_fill_buffers(short *master, int n) {
|
||||||
|
|
||||||
curbus = nextbus;
|
curbus = nextbus;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue