This commit is contained in:
2026-02-26 11:07:35 +01:00
parent 0017f3b3f8
commit 402781f49c
2 changed files with 10 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ static int audio_fill_slab_from_cache(void *block)
return -ENODATA;
}
bytes_read = fs_read(&cached_file, bytes, AUDIO_BLOCK_SIZE);
bytes_read = fs_read(&cached_file, bytes, AUDIO_BLOCK_SIZE/2);
if (bytes_read < 0)
{
LOG_ERR("fs_read failed: %d", (int)bytes_read);
@@ -96,6 +96,12 @@ static int audio_fill_slab_from_cache(void *block)
cached_file_eof = true;
}
for (int i = AUDIO_BLOCK_SIZE/2 - 1; i >= 0; i--)
{
bytes[2*i + 1] = bytes[i];
bytes[2*i] = bytes[i];
}
return 0;
}