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 /* | 11 /* |
12 * isac.c | 12 * isac.c |
13 * | 13 * |
14 * This C file contains the functions for the ISAC API | 14 * This C file contains the functions for the ISAC API |
15 * | 15 * |
16 */ | 16 */ |
17 | 17 |
18 #include "webrtc/modules/audio_coding/codecs/isac/main/include/isac.h" | 18 #include "webrtc/modules/audio_coding/codecs/isac/main/include/isac.h" |
19 | 19 |
20 #include <math.h> | 20 #include <math.h> |
21 #include <stdio.h> | 21 #include <stdio.h> |
22 #include <stdlib.h> | 22 #include <stdlib.h> |
23 #include <string.h> | 23 #include <string.h> |
24 | 24 |
25 #include "webrtc/base/checks.h" | 25 #include "webrtc/rtc_base/checks.h" |
26 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 26 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
27 #include "webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimato
r.h" | 27 #include "webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimato
r.h" |
28 #include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h" | 28 #include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h" |
29 #include "webrtc/modules/audio_coding/codecs/isac/main/source/crc.h" | 29 #include "webrtc/modules/audio_coding/codecs/isac/main/source/crc.h" |
30 #include "webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h" | 30 #include "webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h" |
31 #include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_ta
bles.h" | 31 #include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_ta
bles.h" |
32 #include "webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline
.h" | 32 #include "webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline
.h" |
33 #include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h" | 33 #include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h" |
34 | 34 |
35 #define BIT_MASK_DEC_INIT 0x0001 | 35 #define BIT_MASK_DEC_INIT 0x0001 |
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 } | 2365 } |
2366 | 2366 |
2367 void WebRtcIsac_SetEncSampRateInDecoder(ISACStruct* inst, | 2367 void WebRtcIsac_SetEncSampRateInDecoder(ISACStruct* inst, |
2368 int sample_rate_hz) { | 2368 int sample_rate_hz) { |
2369 ISACMainStruct* instISAC = (ISACMainStruct*)inst; | 2369 ISACMainStruct* instISAC = (ISACMainStruct*)inst; |
2370 RTC_DCHECK_NE(0, instISAC->initFlag & BIT_MASK_DEC_INIT); | 2370 RTC_DCHECK_NE(0, instISAC->initFlag & BIT_MASK_DEC_INIT); |
2371 RTC_DCHECK(!(instISAC->initFlag & BIT_MASK_ENC_INIT)); | 2371 RTC_DCHECK(!(instISAC->initFlag & BIT_MASK_ENC_INIT)); |
2372 RTC_DCHECK(sample_rate_hz == 16000 || sample_rate_hz == 32000); | 2372 RTC_DCHECK(sample_rate_hz == 16000 || sample_rate_hz == 32000); |
2373 instISAC->encoderSamplingRateKHz = sample_rate_hz / 1000; | 2373 instISAC->encoderSamplingRateKHz = sample_rate_hz / 1000; |
2374 } | 2374 } |
OLD | NEW |