Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hylia.h 1.5KB

7 years ago
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This file is part of Hylia.
  3. *
  4. * Hylia is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * Hylia is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with Hylia. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef HYLIA_H_INCLUDED
  18. #define HYLIA_H_INCLUDED
  19. #include <stdint.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #else
  23. #include <stdbool.h>
  24. #endif
  25. typedef struct _hylia_t hylia_t;
  26. typedef struct _hylia_time_info_t {
  27. double beatsPerBar, beatsPerMinute, beat, phase;
  28. bool playing;
  29. } hylia_time_info_t;
  30. hylia_t* hylia_create(void);
  31. void hylia_enable(hylia_t* link, bool on);
  32. void hylia_process(hylia_t* link, uint32_t frames, hylia_time_info_t* info);
  33. void hylia_set_beats_per_bar(hylia_t* link, double beatsPerBar);
  34. void hylia_set_beats_per_minute(hylia_t* link, double beatsPerMinute);
  35. void hylia_set_output_latency(hylia_t* link, uint32_t latency);
  36. void hylia_set_start_stop_sync_enabled(hylia_t* link, bool enabled);
  37. void hylia_start_playing(hylia_t* link);
  38. void hylia_stop_playing(hylia_t* link);
  39. void hylia_cleanup(hylia_t* link);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif // HYLIA_H_INCLUDED