SKP_Silk_control.h 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /***********************************************************************
  2. Copyright (c) 2006-2012, Skype Limited. All rights reserved.
  3. Redistribution and use in source and binary forms, with or without
  4. modification, (subject to the limitations in the disclaimer below)
  5. are permitted provided that the following conditions are met:
  6. - Redistributions of source code must retain the above copyright notice,
  7. this list of conditions and the following disclaimer.
  8. - Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. - Neither the name of Skype Limited, nor the names of specific
  12. contributors, may be used to endorse or promote products derived from
  13. this software without specific prior written permission.
  14. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED
  15. BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  16. CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
  17. BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  18. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  19. COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  20. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  21. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  22. USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  23. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  25. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. ***********************************************************************/
  27. #ifndef SKP_SILK_CONTROL_H
  28. #define SKP_SILK_CONTROL_H
  29. #include "SKP_Silk_typedef.h"
  30. #ifdef __cplusplus
  31. extern "C"
  32. {
  33. #endif
  34. /***********************************************/
  35. /* Structure for controlling encoder operation */
  36. /***********************************************/
  37. typedef struct {
  38. /* I: Input signal sampling rate in Hertz; 8000/12000/16000/24000 */
  39. SKP_int32 API_sampleRate;
  40. /* I: Maximum internal sampling rate in Hertz; 8000/12000/16000/24000 */
  41. SKP_int32 maxInternalSampleRate;
  42. /* I: Number of samples per packet; must be equivalent of 20, 40, 60, 80 or 100 ms */
  43. SKP_int packetSize;
  44. /* I: Bitrate during active speech in bits/second; internally limited */
  45. SKP_int32 bitRate;
  46. /* I: Uplink packet loss in percent (0-100) */
  47. SKP_int packetLossPercentage;
  48. /* I: Complexity mode; 0 is lowest; 1 is medium and 2 is highest complexity */
  49. SKP_int complexity;
  50. /* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */
  51. SKP_int useInBandFEC;
  52. /* I: Flag to enable discontinuous transmission (DTX); 0/1 */
  53. SKP_int useDTX;
  54. } SKP_SILK_SDK_EncControlStruct;
  55. /**************************************************************************/
  56. /* Structure for controlling decoder operation and reading decoder status */
  57. /**************************************************************************/
  58. typedef struct {
  59. /* I: Output signal sampling rate in Hertz; 8000/12000/16000/24000 */
  60. SKP_int32 API_sampleRate;
  61. /* O: Number of samples per frame */
  62. SKP_int frameSize;
  63. /* O: Frames per packet 1, 2, 3, 4, 5 */
  64. SKP_int framesPerPacket;
  65. /* O: Flag to indicate that the decoder has remaining payloads internally */
  66. SKP_int moreInternalDecoderFrames;
  67. /* O: Distance between main payload and redundant payload in packets */
  68. SKP_int inBandFECOffset;
  69. } SKP_SILK_SDK_DecControlStruct;
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. #endif