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

Unified Diff: media/audio/cras/cras_input.cc

Issue 551823005: [Hotword] Adding audio parameters to handle audio coming from the DSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update stream type Created 6 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/audio_parameters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/cras/cras_input.cc
diff --git a/media/audio/cras/cras_input.cc b/media/audio/cras/cras_input.cc
index 3fae8df1e7784dd11462b65c325082080fedabe4..b0c4c448eaafce832903934783a23a69e5d6b3ef 100644
--- a/media/audio/cras/cras_input.cc
+++ b/media/audio/cras/cras_input.cc
@@ -4,6 +4,7 @@
#include "media/audio/cras/cras_input.h"
+#include <cras_input.h>
#include <math.h>
#include "base/basictypes.h"
@@ -159,6 +160,10 @@ void CrasInputStream::Start(AudioInputCallback* callback) {
return;
}
+ uint32_t flags = 0;
+ if (params_.effects() & AudioParameters::PlatformEffectsMask::HOTWORD)
+ flags = HOTWORD_STREAM;
Steve McKay 2014/12/17 17:41:29 This is still broken for me. Where is this value d
dgreid 2014/12/17 17:44:20 in cras_types.h, you'll need an up to date libcras
+
unsigned int frames_per_packet = params_.frames_per_buffer();
cras_stream_params* stream_params = cras_client_stream_params_create(
stream_direction_,
@@ -166,7 +171,7 @@ void CrasInputStream::Start(AudioInputCallback* callback) {
frames_per_packet, // Call back when this many ready.
frames_per_packet, // Minimum Callback level ignored for capture streams.
CRAS_STREAM_TYPE_DEFAULT,
- 0, // Unused flags.
+ flags,
this,
CrasInputStream::SamplesReady,
CrasInputStream::StreamError,
« no previous file with comments | « media/audio/audio_parameters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698