chromium/third_party/blink/renderer/platform/audio/push_pull_fifo.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/audio/push_pull_fifo.h"

#include <algorithm>
#include <memory>

#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"

namespace blink {

namespace {

// Suppress the warning log if over/underflow happens more than 100 times.
const unsigned kMaxMessagesToLog =;
}

PushPullFIFO::PushPullFIFO(unsigned number_of_channels,
                           uint32_t fifo_length,
                           unsigned render_quantum_frames)
    :{}

PushPullFIFO::~PushPullFIFO() {}

// Push the data from |input_bus| to FIFO. The size of push is determined by
// the length of |input_bus|.
void PushPullFIFO::Push(const AudioBus* input_bus) {}

// Pull the data out of FIFO to |output_bus|. If remaining frame in the FIFO
// is less than the frames to pull, provides remaining frame plus the silence.
size_t PushPullFIFO::Pull(AudioBus* output_bus, uint32_t frames_requested) {}

PushPullFIFO::PullResult PushPullFIFO::PullAndUpdateEarmark(
    AudioBus* output_bus,
    uint32_t frames_requested) {}

const PushPullFIFOStateForTest PushPullFIFO::GetStateForTest() {}

}  // namespace blink