X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmain.c;h=1e17bebd9be4e09620f28b676bc1d8b68acd24da;hb=refs%2Fheads%2Fmaster;hp=8fa1126734fd25195921c3aba84526bd8aff3f8c;hpb=de258a48248718966db128978096931c52f6e203;p=dos_auplay diff --git a/src/main.c b/src/main.c index 8fa1126..1e17beb 100644 --- a/src/main.c +++ b/src/main.c @@ -12,7 +12,7 @@ static int play_file(const char *fname); static int cbfunc(void *buf, int size, void *cls); static void print_usage(const char *argv0); -static int vol = 220; +static int vol = 255; static int quit; int main(int argc, char **argv) @@ -22,7 +22,7 @@ int main(int argc, char **argv) if(audio_init() == -1) { return 1; } - audio_setvolume(AUDIO_MASTER, vol); + audio_setvolume(AUDIO_MASTER, 255); audio_setvolume(AUDIO_PCM, 255); for(i=1; i 255) vol = 255; audio_setvolume(AUDIO_DEFAULT, vol); - printf("volume: %d%%\n", 101 * vol / 256); + printf("\nvolume: %d%%\n", 101 * vol / 256); break; case '-': vol -= 32; if(vol < 0) vol = 0; audio_setvolume(AUDIO_DEFAULT, vol); - printf("volume: %d%%\n", 101 * vol / 256); + printf("\nvolume: %d%%\n", 101 * vol / 256); break; case 'm': @@ -130,7 +130,8 @@ static int play_file(const char *fname) prev = dbg_cur_offs; _enable(); - printf("%3d%% - offs: %lu/%lu\n", 100 * prev / au->size, prev, au->size); + printf("%3d%% - offs: %lu/%lu \r", 100 * prev / au->size, prev, au->size); + fflush(stdout); } else { _enable(); } @@ -138,6 +139,7 @@ static int play_file(const char *fname) } end: + putchar('\n'); au_close(au); #ifdef DBG_PRELOAD free(dbg_samples);