#include "media/filters/audio_clock.h"
#include <stdint.h>
#include <stddef.h>
#include <algorithm>
#include <cmath>
#include "base/check_op.h"
#include "base/numerics/safe_conversions.h"
namespace media {
AudioClock::AudioClock(base::TimeDelta start_timestamp, int sample_rate)
: … { … }
AudioClock::~AudioClock() = default;
void AudioClock::WroteAudio(int frames_written,
int frames_requested,
int delay_frames,
double playback_rate) { … }
void AudioClock::CompensateForSuspendedWrites(base::TimeDelta elapsed,
int delay_frames) { … }
base::TimeDelta AudioClock::TimeUntilPlayback(base::TimeDelta timestamp) const { … }
void AudioClock::ContiguousAudioDataBufferedForTesting(
base::TimeDelta* total,
base::TimeDelta* same_rate_total) const { … }
AudioClock::AudioData::AudioData(int64_t frames, double playback_rate)
: … { … }
void AudioClock::PushBufferedAudioData(int64_t frames, double playback_rate) { … }
void AudioClock::PopBufferedAudioData(int64_t frames) { … }
double AudioClock::ComputeBufferedMediaDurationMicros() const { … }
}