Chromium Code Reviews| Index: webrtc/modules/audio_processing/include/audio_processing.h |
| diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h |
| index 085484466c3e3d1e1730b7d9c678224410ca44c5..9b0ac2b38675152775daac4b961656948666e544 100644 |
| --- a/webrtc/modules/audio_processing/include/audio_processing.h |
| +++ b/webrtc/modules/audio_processing/include/audio_processing.h |
| @@ -116,6 +116,18 @@ struct Beamforming { |
| const std::vector<Point> array_geometry; |
| }; |
| +// Use to enable intelligibility enhancer in audio processing. Must be provided |
| +// though the constructor. It will have no impact if used with |
| +// AudioProcessing::SetExtraOptions(). |
| +// |
| +// Note: If enabled and the reverse stream has more than one output channel, |
| +// the reverse stream will become an upmixed mono signal. |
| +struct Intelligibility { |
| + Intelligibility() : enabled(false) {} |
| + explicit Intelligibility(bool enabled) : enabled(enabled) {} |
| + bool enabled; |
| +}; |
| + |
| static const int kAudioProcMaxNativeSampleRateHz = 32000; |
| // The Audio Processing Module (APM) provides a collection of voice processing |
| @@ -333,22 +345,40 @@ class AudioProcessing { |
| // |input_sample_rate_hz()| |
| // |
| // TODO(ajm): add const to input; requires an implementation fix. |
| + // DEPRECATED: Use |ProcessReverseStream| instead. |
| + // TODO(ekm): Remove once all users have updated to |ProcessReverseStream|. |
| virtual int AnalyzeReverseStream(AudioFrame* frame) = 0; |
| + // Same as |AnalyzeReverseStream|, but may modify |data| if intelligibility |
| + // is enabled. |
| + virtual int ProcessReverseStream(AudioFrame* frame) = 0; |
| + |
| // Accepts deinterleaved float audio with the range [-1, 1]. Each element |
| // of |data| points to a channel buffer, arranged according to |layout|. |
| - // |
| // TODO(mgraczyk): Remove once clients are updated to use the new interface. |
| + // |
| + // DEPRECATED: Use |ProcessReverseStream| instead. |
| + // TODO(ekm): Remove once all users have updated to |ProcessReverseStream|. |
| virtual int AnalyzeReverseStream(const float* const* data, |
| int samples_per_channel, |
| - int sample_rate_hz, |
| + int rev_sample_rate_hz, |
| + ChannelLayout layout) = 0; |
| + |
| + virtual int ProcessReverseStream(float* const* data, |
|
Andrew MacDonald
2015/07/30 03:53:17
You don't need this one now...
ekm
2015/07/30 06:15:19
Done. Removed.
|
| + int samples_per_channel, |
| + int rev_sample_rate_hz, |
| ChannelLayout layout) = 0; |
| // Accepts deinterleaved float audio with the range [-1, 1]. Each element of |
| // |data| points to a channel buffer, arranged according to |reverse_config|. |
| + // DEPRECATED: Use |ProcessReverseStream| instead. |
| + // TODO(ekm): Remove once all users have updated to |ProcessReverseStream|. |
| virtual int AnalyzeReverseStream(const float* const* data, |
|
Andrew MacDonald
2015/07/30 03:53:17
I don't think any clients are using this yet besid
ekm
2015/07/30 06:15:19
Done. Since we're still supporting AnalyzeReverseS
|
| const StreamConfig& reverse_config) = 0; |
| + virtual int ProcessReverseStream(float* const* data, |
| + const StreamConfig& reverse_config) = 0; |
| + |
| // This must be called if and only if echo processing is enabled. |
| // |
| // Sets the |delay| in ms between AnalyzeReverseStream() receiving a far-end |