OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // TODO(bjornv): This is not feasible until the functionality has been | 47 // TODO(bjornv): This is not feasible until the functionality has been |
48 // re-implemented; see comment at the bottom of this file. For now, the user has | 48 // re-implemented; see comment at the bottom of this file. For now, the user has |
49 // to hard code the |write_ref_data| value. | 49 // to hard code the |write_ref_data| value. |
50 // When false, this will compare the output data with the results stored to | 50 // When false, this will compare the output data with the results stored to |
51 // file. This is the typical case. When the file should be updated, it can | 51 // file. This is the typical case. When the file should be updated, it can |
52 // be set to true with the command-line switch --write_ref_data. | 52 // be set to true with the command-line switch --write_ref_data. |
53 bool write_ref_data = false; | 53 bool write_ref_data = false; |
54 const google::protobuf::int32 kChannels[] = {1, 2}; | 54 const google::protobuf::int32 kChannels[] = {1, 2}; |
55 const int kSampleRates[] = {8000, 16000, 32000, 48000}; | 55 const int kSampleRates[] = {8000, 16000, 32000, 48000}; |
56 | 56 |
57 #if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE) | |
58 // Android doesn't support 48kHz. | |
59 const int kProcessSampleRates[] = {8000, 16000, 32000}; | |
60 #elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) | |
61 const int kProcessSampleRates[] = {8000, 16000, 32000, 48000}; | 57 const int kProcessSampleRates[] = {8000, 16000, 32000, 48000}; |
62 #endif | |
63 | 58 |
64 enum StreamDirection { kForward = 0, kReverse }; | 59 enum StreamDirection { kForward = 0, kReverse }; |
65 | 60 |
66 void ConvertToFloat(const int16_t* int_data, ChannelBuffer<float>* cb) { | 61 void ConvertToFloat(const int16_t* int_data, ChannelBuffer<float>* cb) { |
67 ChannelBuffer<int16_t> cb_int(cb->num_frames(), | 62 ChannelBuffer<int16_t> cb_int(cb->num_frames(), |
68 cb->num_channels()); | 63 cb->num_channels()); |
69 Deinterleave(int_data, | 64 Deinterleave(int_data, |
70 cb->num_frames(), | 65 cb->num_frames(), |
71 cb->num_channels(), | 66 cb->num_channels(), |
72 cb_int.channels()); | 67 cb_int.channels()); |
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), | 2747 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), |
2753 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), | 2748 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), |
2754 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), | 2749 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), |
2755 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), | 2750 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), |
2756 std::tr1::make_tuple(16000, 16000, 32000, 16000, 35, 20), | 2751 std::tr1::make_tuple(16000, 16000, 32000, 16000, 35, 20), |
2757 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); | 2752 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); |
2758 #endif | 2753 #endif |
2759 | 2754 |
2760 } // namespace | 2755 } // namespace |
2761 } // namespace webrtc | 2756 } // namespace webrtc |
OLD | NEW |