tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 653a5746baec398a34943933bc6573c0ec24692d
parent 4b4bc27b3c8e2ee569ce7b85745fd12fa0465e49
Author: rbckman <robinbackman@gmail.com>
Date:   Wed, 29 Aug 2018 15:21:44 +0300

Vumeter now fills the screen

Diffstat:
Malsa-utils-1.0.25/aplay/aplay | 0
Malsa-utils-1.0.25/aplay/aplay.c | 12++++--------
Malsa-utils-1.0.25/aplay/aplay.o | 0
Mgui/src/main.c | 14+++++++-------
Mgui/tarinagui.bin | 0
5 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/alsa-utils-1.0.25/aplay/aplay b/alsa-utils-1.0.25/aplay/aplay Binary files differ. diff --git a/alsa-utils-1.0.25/aplay/aplay.c b/alsa-utils-1.0.25/aplay/aplay.c @@ -1411,8 +1411,8 @@ static void suspend(void) static void print_vu_meter_mono(int perc, int maxperc) { - const int bar_length = 50; - char line[80]; + const int bar_length = 72; + char line[130]; int val; for (val = 0; val <= perc * bar_length / 100 && val < bar_length; val++) @@ -1426,12 +1426,12 @@ static void print_vu_meter_mono(int perc, int maxperc) sprintf(line + val, "| MAX"); else sprintf(line + val, "| %02i%%", maxperc); + if (perc > 100) + printf(_(" !clip ")); FILE *vumeter; vumeter = fopen("/dev/shm/vumeter","w"); fputs(line, vumeter); fclose(vumeter); - if (perc > 100) - printf(_(" !clip ")); } static void print_vu_meter_stereo(int *perc, int *maxperc) @@ -1469,10 +1469,6 @@ static void print_vu_meter_stereo(int *perc, int *maxperc) memcpy(line + bar_length, tmp, 3); } line[bar_length * 2 + 6 + 2] = 0; - FILE *vumeter; - vumeter = fopen("/dev/shm/vumeter","w"); - fputs(line, vumeter); - fclose(vumeter); } static void print_vu_meter(signed int *perc, signed int *maxperc) diff --git a/alsa-utils-1.0.25/aplay/aplay.o b/alsa-utils-1.0.25/aplay/aplay.o Binary files differ. diff --git a/gui/src/main.c b/gui/src/main.c @@ -50,7 +50,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(225,255,255,0xff), /* fg */ GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); + text, 80, text_size); } if (fontcolor == 4) { graphics_resource_render_text_ext(img, x_offset, y_offset-height, @@ -58,7 +58,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(51,51,51,0xff), /* fg */ GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); + text, 80, text_size); } if (fontcolor == 3) { graphics_resource_render_text_ext(img, x_offset, y_offset-height, @@ -66,7 +66,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(30,30,255,0xff), /* fg */ GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); + text, 80, text_size); } if (fontcolor == 2) { graphics_resource_render_text_ext(img, x_offset, y_offset-height, @@ -74,7 +74,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(255,255,255,0xff), /* fg */ GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); + text, 80, text_size); } if (fontcolor == 1) { graphics_resource_render_text_ext(img, x_offset, y_offset-height, @@ -82,7 +82,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(0,0,0,0xff), /* fg */ GRAPHICS_RGBA32(200,200,200,0xff), /* bg */ - text, 74, text_size); + text, 80, text_size); } return 0; } @@ -139,7 +139,7 @@ int main(void) int len_string_more7; char check[500]; char oldcheck[500]; - char vumeter[80]; + char vumeter[130]; char menu[4]; char header[100]; char film[30]; @@ -172,7 +172,7 @@ int main(void) // char ch; FILE *fp; fp = fopen("/dev/shm/vumeter","r"); - while(fgets(vumeter, 74, fp) != NULL); + while(fgets(vumeter, 130, fp) != NULL); fclose(fp); FILE *fp2; fp2 = fopen("/dev/shm/interface","r"); diff --git a/gui/tarinagui.bin b/gui/tarinagui.bin Binary files differ.