alac_wrapper.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*****************************************************************************
  2. * alac_wrapper.h: ALAC coder wrapper
  3. *
  4. * Copyright (C) 2016 Philippe <philippe44@outlook.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  19. *****************************************************************************/
  20. #ifndef __ALAC_WRAPPER_H_
  21. #define __ALAC_WRAPPER_H_
  22. struct alac_codec_s;
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. struct alac_codec_s *alac_create_decoder(int magic_cookie_size, unsigned char *magic_cookie,
  27. unsigned char *sample_size, unsigned *sample_rate,
  28. unsigned char *channels);
  29. void alac_delete_decoder(struct alac_codec_s *codec);
  30. bool alac_to_pcm(struct alac_codec_s *codec, unsigned char* input,
  31. unsigned char *output, char channels, unsigned *out_frames);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif