Move amplitude (level) debugging to debug.c

This commit is contained in:
Andreas Eversberg
2016-05-15 20:31:42 +02:00
parent adc3270dc0
commit 7aa2445b47
6 changed files with 28 additions and 65 deletions

View File

@@ -70,3 +70,17 @@ void _printdebug(const char *file, const char *function, int line, int cat, int
fflush(stdout);
}
const char *debug_amplitude(double level)
{
static char text[42];
strcpy(text, " : ");
if (level > 1.0)
level = 1.0;
if (level < -1.0)
level = -1.0;
text[20 + (int)(level * 20)] = '*';
return text;
}