Chromium Code Reviews| Index: media/audio/cras/cras_input.cc |
| diff --git a/media/audio/cras/cras_input.cc b/media/audio/cras/cras_input.cc |
| index 0b8644603f8996e670b988c282a1b234e4062ee0..e4579971589675b746630e1837cab2f16a489979 100644 |
| --- a/media/audio/cras/cras_input.cc |
| +++ b/media/audio/cras/cras_input.cc |
| @@ -14,6 +14,9 @@ |
| namespace media { |
| +// Flag to indicate hotword stream. |
| +static const uint32_t kHotwordParam = 1; |
|
dgreid
2014/12/10 00:23:35
This will be 0x03. or even better HOTWORD_STREAM f
rpetterson
2014/12/10 00:37:43
Cool. When do you think that will land?
dgreid
2014/12/10 00:54:50
hopefully soon. I need to get a build without it a
rpetterson
2014/12/13 01:04:00
I've updated the way I think you mean. Let me know
|
| + |
| CrasInputStream::CrasInputStream(const AudioParameters& params, |
| AudioManagerCras* manager, |
| const std::string& device_id) |
| @@ -159,6 +162,10 @@ void CrasInputStream::Start(AudioInputCallback* callback) { |
| return; |
| } |
| + uint32_t flags = 0; |
| + if (params_.effects() & AudioParameters::PlatformEffectsMask::HOTWORD) |
| + flags = kHotwordParam; |
| + |
| unsigned int frames_per_packet = params_.frames_per_buffer(); |
| cras_stream_params* stream_params = cras_client_stream_params_create( |
| stream_direction_, |
| @@ -166,7 +173,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, |