mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-31 06:40:58 +03:00
24àx320 VU-display fixes + alac decoder code style
This commit is contained in:
@@ -374,10 +374,9 @@ static decode_state alac_decode(void) {
|
|||||||
|
|
||||||
// need to create a buffer with contiguous data
|
// need to create a buffer with contiguous data
|
||||||
if (bytes < block_size) {
|
if (bytes < block_size) {
|
||||||
u8_t *buffer = malloc(block_size);
|
iptr = malloc(block_size);
|
||||||
memcpy(buffer, streambuf->readp, bytes);
|
memcpy(iptr, streambuf->readp, bytes);
|
||||||
memcpy(buffer + bytes, streambuf->buf, block_size - bytes);
|
memcpy(iptr + bytes, streambuf->buf, block_size - bytes);
|
||||||
iptr = buffer;
|
|
||||||
} else iptr = streambuf->readp;
|
} else iptr = streambuf->readp;
|
||||||
|
|
||||||
if (!alac_to_pcm(l->decoder, iptr, l->writebuf, 2, &frames)) {
|
if (!alac_to_pcm(l->decoder, iptr, l->writebuf, 2, &frames)) {
|
||||||
|
|||||||
@@ -972,7 +972,7 @@ static void visu_update(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (displayer.width / 2 > 3 * VU_WIDTH / 4) {
|
} else if (displayer.width / 2 >= 3 * VU_WIDTH / 4) {
|
||||||
if (visu.rotate) {
|
if (visu.rotate) {
|
||||||
draw_VU(display, vu_bitmap, visu.bars[0].current, 0, visu.row, visu.height / 2, visu.rotate);
|
draw_VU(display, vu_bitmap, visu.bars[0].current, 0, visu.row, visu.height / 2, visu.rotate);
|
||||||
draw_VU(display, vu_bitmap, visu.bars[1].current, 0, visu.row + visu.height / 2, visu.height / 2, visu.rotate);
|
draw_VU(display, vu_bitmap, visu.bars[1].current, 0, visu.row + visu.height / 2, visu.height / 2, visu.rotate);
|
||||||
|
|||||||
Reference in New Issue
Block a user