Skip to content

Commit

Permalink
[android] Increase kFIFOSize in AudioDestination
Browse files Browse the repository at this point in the history
The value of kFIFOSize was estimated, so it should be ok for us to
increase the size. The change can be reverted once we have a better
solution.

b/376903291
  • Loading branch information
jasonzhangxx committed Nov 6, 2024
1 parent 477c627 commit 1f85ef2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions third_party/blink/renderer/platform/audio/audio_destination.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"

// For BUILDFLAG(USE_STARBOARD_MEDIA)
#include "build/build_config.h"
#if BUILDFLAG(IS_COBALT)
#include "starboard/build/starboard_buildflags.h"
#endif // BUILDFLAG(IS_COBALT)

namespace blink {

namespace {
Expand All @@ -59,7 +65,13 @@ namespace {
// that we would ever need. The current UMA stats indicates that this is, in
// fact, probably too small. There are Android devices out there with a size of
// 8000 or so. We might need to make this larger. See: crbug.com/670747
#if BUILDFLAG(IS_COBALT)
// TODO(b/376903291): The change will not be needed after we rebase to m126 or
// later version.
constexpr uint32_t kFIFOSize = 128 * 128;
#else // BUILDFLAG(IS_COBALT)
constexpr uint32_t kFIFOSize = 96 * 128;
#endif // BUILDFLAG(IS_COBALT)

const char* DeviceStateToString(AudioDestination::DeviceState state) {
switch (state) {
Expand Down

0 comments on commit 1f85ef2

Please sign in to comment.