faac.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * FAAC - Freeware Advanced Audio Coder
  3. * Copyright (C) 2001 Menno Bakker
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. * $Id: faac.h,v 1.36 2009/01/25 18:50:32 menno Exp $
  19. */
  20. #ifndef _FAAC_H_
  21. #define _FAAC_H_
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif /* __cplusplus */
  25. #if defined(_WIN32) && !defined(__MINGW32__)
  26. # ifndef FAACAPI
  27. # define FAACAPI __stdcall
  28. # endif
  29. #else
  30. # ifndef FAACAPI
  31. # define FAACAPI
  32. # endif
  33. #endif
  34. #pragma pack(push, 1)
  35. typedef struct {
  36. void *ptr;
  37. char *name;
  38. }
  39. psymodellist_t;
  40. #include "faaccfg.h"
  41. typedef void *faacEncHandle;
  42. #ifndef HAVE_INT32_T
  43. typedef signed int int32_t;
  44. #endif
  45. /*
  46. Allows an application to get FAAC version info. This is intended
  47. purely for informative purposes.
  48. Returns FAAC_CFG_VERSION.
  49. */
  50. int FAACAPI faacEncGetVersion(char **faac_id_string,
  51. char **faac_copyright_string);
  52. faacEncConfigurationPtr FAACAPI
  53. faacEncGetCurrentConfiguration(faacEncHandle hEncoder);
  54. int FAACAPI faacEncSetConfiguration(faacEncHandle hEncoder,
  55. faacEncConfigurationPtr config);
  56. faacEncHandle FAACAPI faacEncOpen(unsigned long sampleRate,
  57. unsigned int numChannels,
  58. unsigned long *inputSamples,
  59. unsigned long *maxOutputBytes);
  60. int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder, unsigned char **ppBuffer,
  61. unsigned long *pSizeOfDecoderSpecificInfo);
  62. int FAACAPI faacEncEncode(faacEncHandle hEncoder, int32_t * inputBuffer, unsigned int samplesInput,
  63. unsigned char *outputBuffer,
  64. unsigned int bufferSize);
  65. int FAACAPI faacEncClose(faacEncHandle hEncoder);
  66. #pragma pack(pop)
  67. #ifdef __cplusplus
  68. }
  69. #endif /* __cplusplus */
  70. #endif /* _FAAC_H_ */