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

Unified Diff: media/audio/audio_input_device.cc

Issue 1487983002: 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: 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
Index: media/audio/audio_input_device.cc
diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc
index 02fa7a7ad681c68b08085a77807905f414e21b2b..c185553c36e1538da459482b1a837615856fff3d 100644
--- a/media/audio/audio_input_device.cc
+++ b/media/audio/audio_input_device.cc
@@ -38,6 +38,8 @@ class AudioInputDevice::AudioThreadCallback
// Called whenever we receive notifications about pending data.
void Process(uint32 pending_data) override;
+ void FramesSkipped(uint32_t frames_skipped) override;
+
private:
int current_segment_id_;
uint32 last_buffer_id_;
@@ -141,8 +143,8 @@ void AudioInputDevice::OnStreamCreated(
DCHECK(audio_thread_.IsStopped());
audio_callback_.reset(new AudioInputDevice::AudioThreadCallback(
audio_parameters_, handle, length, total_segments, callback_));
- audio_thread_.Start(
- audio_callback_.get(), socket_handle, "AudioInputDevice", true);
+ audio_thread_.Start(audio_callback_.get(), socket_handle, "AudioInputDevice",
+ true, true);
state_ = RECORDING;
ipc_->RecordStream();
@@ -342,4 +344,10 @@ void AudioInputDevice::AudioThreadCallback::Process(uint32 pending_data) {
current_segment_id_ = 0;
}
+void AudioInputDevice::AudioThreadCallback::FramesSkipped(
+ uint32_t frames_skipped) {
+ // Should not be called for input.
+ NOTREACHED();
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698