Read in larger chunks from SD at a time
This helps a little with the stuttering. Some kind of readahead is probably the ideal tho.
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
namespace codecs {
|
||||
|
||||
[[maybe_unused]] static constexpr char kTag[] = "dec_buf";
|
||||
static constexpr size_t kBufferSize = 1024 * 8;
|
||||
static constexpr size_t kBufferSize = 1024 * 128;
|
||||
static constexpr size_t kReadThreshold = 1024 * 8;
|
||||
|
||||
SourceBuffer::SourceBuffer()
|
||||
: buffer_(reinterpret_cast<std::byte*>(
|
||||
@@ -34,7 +35,7 @@ SourceBuffer::~SourceBuffer() {
|
||||
}
|
||||
|
||||
auto SourceBuffer::Refill(IStream* src) -> bool {
|
||||
if (bytes_in_buffer_ == buffer_.size_bytes()) {
|
||||
if (bytes_in_buffer_ > kReadThreshold) {
|
||||
return false;
|
||||
}
|
||||
bool eof = false;
|
||||
|
||||
Reference in New Issue
Block a user