Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: media/audio/mac/audio_auhal_mac.h

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | media/audio/mac/audio_auhal_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_auhal_mac.h
diff --git a/media/audio/mac/audio_auhal_mac.h b/media/audio/mac/audio_auhal_mac.h
index 0cd648a90253fada50c3d6ee073defdca8f3967a..351c6626957f416ed339ae4e78d9b534911e94a4 100644
--- a/media/audio/mac/audio_auhal_mac.h
+++ b/media/audio/mac/audio_auhal_mac.h
@@ -126,6 +126,8 @@ class AUHALStream : public AudioOutputStream {
// Gets the current playout latency value.
double GetPlayoutLatency(const AudioTimeStamp* output_time_stamp);
+ // Updates playout timestamp, current lost frames, and total lost frames and
+ // glitches.
void UpdatePlayoutTimestamp(const AudioTimeStamp* timestamp);
// Called from the dtor and when the stream is reset.
@@ -182,6 +184,11 @@ class AUHALStream : public AudioOutputStream {
// Current buffer delay. Set by Render().
uint32 current_hardware_pending_bytes_;
+ // Lost frames not yet reported to the provider. Increased in
+ // UpdatePlayoutTimestamp() if any lost frame since last time. Forwarded to
+ // the provider and reset in ProvideInput().
+ uint32_t current_lost_frames_;
+
// Stores the timestamp of the previous audio buffer requested by the OS.
// We use this in combination with |last_number_of_frames_| to detect when
// the OS has decided to skip rendering frames (i.e. a glitch).
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | media/audio/mac/audio_auhal_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698