errors.h 3.6 KB

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