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_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCM16B_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCM16B_H_ 13 14 #include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h" 15 16 namespace webrtc { 17 18 namespace acm2 { 19 20 class ACMPCM16B : public ACMGenericCodec { 21 public: 22 explicit ACMPCM16B(int16_t codec_id); 23 ~ACMPCM16B(); 24 25 // For FEC. 26 ACMGenericCodec* CreateInstance(void); 27 28 int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte); 29 30 int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params); 31 32 protected: 33 void DestructEncoderSafe(); 34 35 int16_t InternalCreateEncoder(); 36 37 void InternalDestructEncoderInst(void* ptr_inst); 38 39 int32_t sampling_freq_hz_; 40 }; 41 42 } // namespace acm2 43 44 } // namespace webrtc 45 46 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCM16B_H_ 47