Skip to content

Commit

Permalink
[nplb] Increase max pending buffers in resampler (#752) (#758)
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)

Co-authored-by: Jason <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and jasonzhangxx authored Jun 27, 2023
1 parent 4066ca6 commit 526a8ab
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 526a8ab

Please sign in to comment.