blob: 5dd111ca2be6395e7c7e783cc9be90fe1a169d5a [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
Artem Titov0b489302021-07-28 20:50:03 +020019// Processes a 10 ms `frame` of the primary audio stream using the provided
Per Åhgren71652f42020-03-17 13:23:58 +010020// AudioProcessing object. On the client-side, this is the near-end (or
Artem Titov0b489302021-07-28 20:50:03 +020021// captured) audio. The `sample_rate_hz_`, `num_channels_`, and
22// `samples_per_channel_` members of `frame` must be valid. If changed from the
Per Åhgren71652f42020-03-17 13:23:58 +010023// 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
Artem Titov0b489302021-07-28 20:50:03 +020029// Processes a 10 ms `frame` of the reverse direction audio stream using the
Per Åhgren71652f42020-03-17 13:23:58 +010030// provided AudioProcessing object. The frame may be modified. On the
31// client-side, this is the far-end (or to be rendered) audio. The
Artem Titov0b489302021-07-28 20:50:03 +020032// `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
Per Åhgren71652f42020-03-17 13:23:58 +010034// 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_