interf_enc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* ------------------------------------------------------------------
  2. * Copyright (C) 2009 Martin Storsjo
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied.
  14. * See the License for the specific language governing permissions
  15. * and limitations under the License.
  16. * -------------------------------------------------------------------
  17. */
  18. #ifndef OPENCORE_AMRNB_INTERF_ENC_H
  19. #define OPENCORE_AMRNB_INTERF_ENC_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifndef AMRNB_WRAPPER_INTERNAL
  24. /* Copied from enc/src/gsmamr_enc.h */
  25. enum Mode {
  26. MR475 = 0,/* 4.75 kbps */
  27. MR515, /* 5.15 kbps */
  28. MR59, /* 5.90 kbps */
  29. MR67, /* 6.70 kbps */
  30. MR74, /* 7.40 kbps */
  31. MR795, /* 7.95 kbps */
  32. MR102, /* 10.2 kbps */
  33. MR122, /* 12.2 kbps */
  34. MRDTX, /* DTX */
  35. N_MODES /* Not Used */
  36. };
  37. #endif
  38. void* Encoder_Interface_init(int dtx);
  39. void Encoder_Interface_exit(void* state);
  40. int Encoder_Interface_Encode(void* state, enum Mode mode, const short* speech, unsigned char* out, int forceSpeech);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif