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 |
11 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" | 11 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/rtc_base/checks.h" |
14 #include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h" | 14 #include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h" |
15 | 15 |
16 #include <stdlib.h> | 16 #include <stdlib.h> |
17 #include <string.h> | 17 #include <string.h> |
18 | 18 |
19 enum { | 19 enum { |
20 #if WEBRTC_OPUS_SUPPORT_120MS_PTIME | 20 #if WEBRTC_OPUS_SUPPORT_120MS_PTIME |
21 /* Maximum supported frame size in WebRTC is 120 ms. */ | 21 /* Maximum supported frame size in WebRTC is 120 ms. */ |
22 kWebRtcOpusMaxEncodeFrameSizeMs = 120, | 22 kWebRtcOpusMaxEncodeFrameSizeMs = 120, |
23 #else | 23 #else |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 return 0; | 494 return 0; |
495 } | 495 } |
496 | 496 |
497 for (n = 0; n < channels; n++) { | 497 for (n = 0; n < channels; n++) { |
498 if (frame_data[0][0] & (0x80 >> ((n + 1) * (frames + 1) - 1))) | 498 if (frame_data[0][0] & (0x80 >> ((n + 1) * (frames + 1) - 1))) |
499 return 1; | 499 return 1; |
500 } | 500 } |
501 | 501 |
502 return 0; | 502 return 0; |
503 } | 503 } |
OLD | NEW |