Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / voice_engine / output_mixer_internal.h
1 /*
2  *  Copyright (c) 2012 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 WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_INTERNAL_H_
12 #define WEBRTC_VOICE_ENGINE_OUTPUT_MIXER_INTERNAL_H_
13
14 namespace webrtc {
15
16 class AudioFrame;
17 class PushResampler;
18
19 namespace voe {
20
21 // Upmix or downmix and resample the audio in |src_frame| to |dst_frame|.
22 // Expects |dst_frame| to have its |num_channels_| and |sample_rate_hz_| set to
23 // the desired values. Updates |samples_per_channel_| accordingly.
24 //
25 // On failure, returns -1 and copies |src_frame| to |dst_frame|.
26 int RemixAndResample(const AudioFrame& src_frame,
27                      PushResampler* resampler,
28                      AudioFrame* dst_frame);
29
30 }  // namespace voe
31 }  // namespace webrtc
32
33 #endif  // VOICE_ENGINE_OUTPUT_MIXER_INTERNAL_H_