errors.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /***********************************************************************
  2. Copyright (c) 2006-2012 IETF Trust and Skype Limited. All rights reserved.
  3. This file is extracted from RFC6716. Please see that RFC for additional
  4. information.
  5. Redistribution and use in source and binary forms, with or without
  6. modification, are permitted provided that the following conditions
  7. are met:
  8. - Redistributions of source code must retain the above copyright notice,
  9. this list of conditions and the following disclaimer.
  10. - Redistributions in binary form must reproduce the above copyright
  11. notice, this list of conditions and the following disclaimer in the
  12. documentation and/or other materials provided with the distribution.
  13. - Neither the name of Internet Society, IETF or IETF Trust, nor the
  14. names of specific contributors, may be used to endorse or promote
  15. products derived from this software without specific prior written
  16. permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
  18. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  21. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  22. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  23. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  24. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  25. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  26. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  27. POSSIBILITY OF SUCH DAMAGE.
  28. ***********************************************************************/
  29. #ifndef SILK_ERRORS_H
  30. #define SILK_ERRORS_H
  31. #ifdef __cplusplus
  32. extern "C"
  33. {
  34. #endif
  35. /******************/
  36. /* Error messages */
  37. /******************/
  38. #define SILK_NO_ERROR 0
  39. /**************************/
  40. /* Encoder error messages */
  41. /**************************/
  42. /* Input length is not a multiple of 10 ms, or length is longer than the packet length */
  43. #define SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES -101
  44. /* Sampling frequency not 8000, 12000 or 16000 Hertz */
  45. #define SILK_ENC_FS_NOT_SUPPORTED -102
  46. /* Packet size not 10, 20, 40, or 60 ms */
  47. #define SILK_ENC_PACKET_SIZE_NOT_SUPPORTED -103
  48. /* Allocated payload buffer too short */
  49. #define SILK_ENC_PAYLOAD_BUF_TOO_SHORT -104
  50. /* Loss rate not between 0 and 100 percent */
  51. #define SILK_ENC_INVALID_LOSS_RATE -105
  52. /* Complexity setting not valid, use 0...10 */
  53. #define SILK_ENC_INVALID_COMPLEXITY_SETTING -106
  54. /* Inband FEC setting not valid, use 0 or 1 */
  55. #define SILK_ENC_INVALID_INBAND_FEC_SETTING -107
  56. /* DTX setting not valid, use 0 or 1 */
  57. #define SILK_ENC_INVALID_DTX_SETTING -108
  58. /* CBR setting not valid, use 0 or 1 */
  59. #define SILK_ENC_INVALID_CBR_SETTING -109
  60. /* Internal encoder error */
  61. #define SILK_ENC_INTERNAL_ERROR -110
  62. /* Internal encoder error */
  63. #define SILK_ENC_INVALID_NUMBER_OF_CHANNELS_ERROR -111
  64. /**************************/
  65. /* Decoder error messages */
  66. /**************************/
  67. /* Output sampling frequency lower than internal decoded sampling frequency */
  68. #define SILK_DEC_INVALID_SAMPLING_FREQUENCY -200
  69. /* Payload size exceeded the maximum allowed 1024 bytes */
  70. #define SILK_DEC_PAYLOAD_TOO_LARGE -201
  71. /* Payload has bit errors */
  72. #define SILK_DEC_PAYLOAD_ERROR -202
  73. /* Payload has bit errors */
  74. #define SILK_DEC_INVALID_FRAME_SIZE -203
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif