Skip to content

Commit

Permalink
[nplb] Increase max pending buffers in resampler (#752)
Browse files Browse the repository at this point in the history
Increase kMaximumPendingBuffers in InterleavedSincResampler to fix failed
partial audio tests.

b/274020873
b/289102877

(cherry picked from commit 4a0aee2)
  • Loading branch information
jasonzhangxx authored and anonymous1-me committed Jun 27, 2023
1 parent d4e87cc commit 92b5102
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ void InterleavedSincResampler::Flush() {
}

bool InterleavedSincResampler::CanQueueBuffer() const {
// TODO(b/289102877): after support partial audio, each input buffer could
// have a small amount of frames. We should avoid using count of pending
// buffer here.
if (pending_buffers_.empty()) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class InterleavedSincResampler {
static const int kBufferSize = kBlockSize + kKernelSize;

// The maximum numbers of buffer can be queued.
static const int kMaximumPendingBuffers = 8;
static const int kMaximumPendingBuffers = 16;

static const int kMaxChannels = 8;
static const int kInputBufferSize = kMaxChannels * kBufferSize;
Expand Down

0 comments on commit 92b5102

Please sign in to comment.