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

Unified Diff: media/audio/audio_input_controller.cc

Issue 2689483006: Switch browser side audio capture path to use base time primitives. (Closed)
Patch Set: Bloop Created 3 years, 10 months 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_controller.cc
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc
index 7eef001eed1dcd60fab0f014aa2c411659f1b5e2..861f1b18b1639477a21b1009de663efafe93a162 100644
--- a/media/audio/audio_input_controller.cc
+++ b/media/audio/audio_input_controller.cc
@@ -115,13 +115,14 @@ class AudioInputController::AudioCallback
private:
void OnData(AudioInputStream* stream,
const AudioBus* source,
- uint32_t hardware_delay_bytes,
+ base::TimeDelta delay,
+ base::TimeTicks delay_timestamp,
double volume) override {
TRACE_EVENT0("audio", "AC::OnData");
received_callback_ = true;
- DeliverDataToSyncWriter(source, hardware_delay_bytes, volume);
+ DeliverDataToSyncWriter(source, delay, delay_timestamp, volume);
PerformOptionalDebugRecording(source);
}
@@ -155,11 +156,12 @@ class AudioInputController::AudioCallback
}
void DeliverDataToSyncWriter(const AudioBus* source,
- uint32_t hardware_delay_bytes,
+ base::TimeDelta delay,
+ base::TimeTicks delay_timestamp,
double volume) {
bool key_pressed = controller_->CheckForKeyboardInput();
- controller_->sync_writer_->Write(source, volume, key_pressed,
- hardware_delay_bytes);
+ controller_->sync_writer_->Write(source, volume, key_pressed, delay,
+ delay_timestamp);
// The way the two classes interact here, could be done in a nicer way.
// As is, we call the AIC here to check the audio power, return and then

Powered by Google App Engine
This is Rietveld 408576698