diff --git a/src/fft.c b/src/fft.c index 3e63622..9282aed 100755 --- a/src/fft.c +++ b/src/fft.c @@ -112,7 +112,7 @@ int i, j, step, k=0; unsigned int avg; - step = inLen/(max % 128); + step = inLen/(max); for(i=0; istate)+18 > maxlen){ maxlen=strlen(status->state)+18; } - maxlen = strlen(song->artist) + strlen(song->title) + 5; + if (strlen(song->album + 3) > maxlen) { + maxlen=strlen(song->album) + 3; + } center = maxC/2 - (maxlen)/2; } - - color_set(1, NULL); + srand(song->duration_sec); + color_set(rand() % 7, NULL); for (i=0; ialbum != NULL){ mvprintw(row+2, center+1, "%s", song->album); - nullFlag = true; - } else { - nullFlag = false; - // even if only album field is missing, the filesystem name will be printed } if (nullFlag == false) { // title, artist, album fields are missing, will print filesystem name