#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/client/audio/audio_jitter_buffer.h"
#include <algorithm>
#include <string>
#include "base/check_op.h"
namespace {
constexpr base::TimeDelta kMaxQueueLatency = …;
constexpr base::TimeDelta kUnderrunRecoveryLatency = …;
constexpr base::TimeDelta kOverrunRecoveryLatency = …;
}
namespace remoting {
AudioJitterBuffer::AudioJitterBuffer(
OnFormatChangedCallback on_format_changed) { … }
AudioJitterBuffer::~AudioJitterBuffer() = default;
void AudioJitterBuffer::AddAudioPacket(std::unique_ptr<AudioPacket> packet) { … }
void AudioJitterBuffer::AsyncGetData(std::unique_ptr<GetDataRequest> request) { … }
void AudioJitterBuffer::ClearGetDataRequests() { … }
void AudioJitterBuffer::ResetBuffer(const AudioStreamFormat& new_format) { … }
void AudioJitterBuffer::ProcessGetDataRequests() { … }
size_t AudioJitterBuffer::GetBufferSizeFromTime(
base::TimeDelta duration) const { … }
void AudioJitterBuffer::DropOverrunPackets() { … }
}