2
0

SKP_Silk_errors.h 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /***********************************************************************
  2. Copyright (c) 2006-2011, 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_ERRORS_H
  28. #define SKP_SILK_ERRORS_H
  29. #ifdef __cplusplus
  30. extern "C"
  31. {
  32. #endif
  33. /******************/
  34. /* Error messages */
  35. /******************/
  36. #define SKP_SILK_NO_ERROR 0
  37. /**************************/
  38. /* Encoder error messages */
  39. /**************************/
  40. /* Input length is not a multiplum of 10 ms, or length is longer than the packet length */
  41. #define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES -1
  42. /* Sampling frequency not 8000, 12000, 16000 or 24000 Hertz */
  43. #define SKP_SILK_ENC_FS_NOT_SUPPORTED -2
  44. /* Packet size not 20, 40, 60, 80 or 100 ms */
  45. #define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED -3
  46. /* Allocated payload buffer too short */
  47. #define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT -4
  48. /* Loss rate not between 0 and 100 percent */
  49. #define SKP_SILK_ENC_INVALID_LOSS_RATE -5
  50. /* Complexity setting not valid, use 0, 1 or 2 */
  51. #define SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING -6
  52. /* Inband FEC setting not valid, use 0 or 1 */
  53. #define SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING -7
  54. /* DTX setting not valid, use 0 or 1 */
  55. #define SKP_SILK_ENC_INVALID_DTX_SETTING -8
  56. /* Internal encoder error */
  57. #define SKP_SILK_ENC_INTERNAL_ERROR -9
  58. /**************************/
  59. /* Decoder error messages */
  60. /**************************/
  61. /* Output sampling frequency lower than internal decoded sampling frequency */
  62. #define SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY -10
  63. /* Payload size exceeded the maximum allowed 1024 bytes */
  64. #define SKP_SILK_DEC_PAYLOAD_TOO_LARGE -11
  65. /* Payload has bit errors */
  66. #define SKP_SILK_DEC_PAYLOAD_ERROR -12
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif