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/interface/opus_interface.h" | 11 #include "webrtc/modules/audio_coding/codecs/opus/include/opus_interface.h" |
12 #include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h" | 12 #include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h" |
13 | 13 |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <string.h> | 15 #include <string.h> |
16 | 16 |
17 enum { | 17 enum { |
18 /* Maximum supported frame size in WebRTC is 60 ms. */ | 18 /* Maximum supported frame size in WebRTC is 60 ms. */ |
19 kWebRtcOpusMaxEncodeFrameSizeMs = 60, | 19 kWebRtcOpusMaxEncodeFrameSizeMs = 60, |
20 | 20 |
21 /* The format allows up to 120 ms frames. Since we don't control the other | 21 /* The format allows up to 120 ms frames. Since we don't control the other |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 return 0; | 452 return 0; |
453 } | 453 } |
454 | 454 |
455 for (n = 0; n < channels; n++) { | 455 for (n = 0; n < channels; n++) { |
456 if (frame_data[0][0] & (0x80 >> ((n + 1) * (frames + 1) - 1))) | 456 if (frame_data[0][0] & (0x80 >> ((n + 1) * (frames + 1) - 1))) |
457 return 1; | 457 return 1; |
458 } | 458 } |
459 | 459 |
460 return 0; | 460 return 0; |
461 } | 461 } |
OLD | NEW |