ui cleanup
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 3 Feb 2019 03:17:51 +0000 (05:17 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sun, 3 Feb 2019 03:17:51 +0000 (05:17 +0200)
src/au_sb.c
src/main.c

index cbdb1c4..63fb49d 100644 (file)
@@ -224,16 +224,12 @@ static void start(int rate, int bits, int nchan)
                        return;\r
                }\r
 \r
-               printf("DBG allocated seg: %x, addr: %lx\n", (unsigned int)seg,\r
-                               (unsigned long)seg << 4);\r
-\r
                addr = (uint32_t)seg << 4;\r
                next64k = (addr + 0x10000) & 0xffff0000;\r
                if(next64k - addr < BUFSIZE) {\r
                        addr = next64k;\r
                }\r
 \r
-               printf("DBG aligned: %lx (mid: %lx)\n", (unsigned long)addr, (unsigned long)(addr + BUFSIZE / 2));\r
                buffer[0] = (void*)addr;\r
                buffer[1] = (void*)(addr + BUFSIZE / 2);\r
                wrbuf = 0;\r
index f8ca49d..1e17beb 100644 (file)
@@ -90,7 +90,7 @@ static int play_file(const char *fname)
                                paused = !paused;\r
                                if(paused) {\r
                                        audio_pause();\r
-                                       printf("pause\n");\r
+                                       printf("\npause\n");\r
                                } else {\r
                                        audio_resume();\r
                                        printf("resume\n");\r
@@ -101,14 +101,14 @@ static int play_file(const char *fname)
                                vol += 32;\r
                                if(vol > 255) vol = 255;\r
                                audio_setvolume(AUDIO_DEFAULT, vol);\r
-                               printf("volume: %d%%\n", 101 * vol / 256);\r
+                               printf("\nvolume: %d%%\n", 101 * vol / 256);\r
                                break;\r
 \r
                        case '-':\r
                                vol -= 32;\r
                                if(vol < 0) vol = 0;\r
                                audio_setvolume(AUDIO_DEFAULT, vol);\r
-                               printf("volume: %d%%\n", 101 * vol / 256);\r
+                               printf("\nvolume: %d%%\n", 101 * vol / 256);\r
                                break;\r
 \r
                        case 'm':\r
@@ -130,7 +130,8 @@ static int play_file(const char *fname)
                        prev = dbg_cur_offs;\r
                        _enable();\r
 \r
-                       printf("%3d%% - offs: %lu/%lu\n", 100 * prev / au->size, prev, au->size);\r
+                       printf("%3d%% - offs: %lu/%lu       \r", 100 * prev / au->size, prev, au->size);\r
+                       fflush(stdout);\r
                } else {\r
                        _enable();\r
                }\r
@@ -138,6 +139,7 @@ static int play_file(const char *fname)
        }\r
 \r
 end:\r
+       putchar('\n');\r
        au_close(au);\r
 #ifdef DBG_PRELOAD\r
        free(dbg_samples);\r