blob: 2d0f5b52e259a1db44cb48b2ddb691e14b96375a [file] [log] [blame]
Per Ã…hgren71652f42020-03-17 13:23:58 +01001/*
2 * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_FRAME_PROXIES_H_
12#define MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_FRAME_PROXIES_H_
13
14namespace webrtc {
15
16class AudioFrame;
17class AudioProcessing;
18
19// Processes a 10 ms |frame| of the primary audio stream using the provided
20// AudioProcessing object. On the client-side, this is the near-end (or
21// captured) audio. The |sample_rate_hz_|, |num_channels_|, and
22// |samples_per_channel_| members of |frame| must be valid. If changed from the
23// previous call to this function, it will trigger an initialization of the
24// provided AudioProcessing object.
25// The function returns any error codes passed from the AudioProcessing
26// ProcessStream method.
27int ProcessAudioFrame(AudioProcessing* ap, AudioFrame* frame);
28
29// Processes a 10 ms |frame| of the reverse direction audio stream using the
30// provided AudioProcessing object. The frame may be modified. On the
31// client-side, this is the far-end (or to be rendered) audio. The
32// |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_| members of
33// |frame| must be valid. If changed from the previous call to this function, it
34// will trigger an initialization of the provided AudioProcessing object.
35// The function returns any error codes passed from the AudioProcessing
36// ProcessReverseStream method.
37int ProcessReverseAudioFrame(AudioProcessing* ap, AudioFrame* frame);
38
39} // namespace webrtc
40
41#endif // MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_FRAME_PROXIES_H_