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

Unified Diff: content/browser/renderer_host/media/audio_input_sync_writer.cc

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added implementation for ALSA. Created 4 years, 5 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: content/browser/renderer_host/media/audio_input_sync_writer.cc
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index 98817e2127fc7e83b47d07c89ec597fc062c6713..271028964c13026d769a1e69df35fd507229923a 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -11,10 +11,12 @@
#include "build/build_config.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/public/browser/browser_thread.h"
+#include "media/audio/audio_device_thread.h"
using media::AudioBus;
using media::AudioInputBuffer;
using media::AudioInputBufferParameters;
+using Packet = media::AudioDeviceThread::Packet;
namespace content {
@@ -329,8 +331,9 @@ void AudioInputSyncWriter::WriteParametersToCurrentSegment(
}
bool AudioInputSyncWriter::SignalDataWrittenAndUpdateCounters() {
- if (socket_->Send(&current_segment_id_, sizeof(current_segment_id_)) !=
- sizeof(current_segment_id_)) {
+ // TODO(Mikhail) : Provide the actual device audio stream timestamp.
+ Packet packet = {current_segment_id_, media::AudioTimestamp()};
+ if (socket_->Send(&packet, sizeof(packet)) != sizeof(packet)) {
const std::string error_message = "AISW: No room in socket buffer.";
LOG(WARNING) << error_message;
AddToNativeLog(error_message);

Powered by Google App Engine
This is Rietveld 408576698