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.

65 lines
1.5KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Nio.h - IO Interface
  4. Copyright (C) 2016 Mark McCurry
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. */
  10. #ifndef NIO_H
  11. #define NIO_H
  12. #include <string>
  13. #include <set>
  14. class WavFile;
  15. class Master;
  16. struct SYNTH_T;
  17. class oss_devs_t;
  18. /**Interface to Nio Subsystem
  19. *
  20. * Should be only externally included header */
  21. namespace Nio
  22. {
  23. void init(const SYNTH_T &synth, const oss_devs_t &oss_devs, Master *master);
  24. bool start(void);
  25. void stop(void);
  26. void setDefaultSource(std::string name);
  27. void setDefaultSink(std::string name);
  28. bool setSource(std::string name);
  29. bool setSink(std::string name);
  30. void setPostfix(std::string post);
  31. std::string getPostfix(void);
  32. std::set<std::string> getSources(void);
  33. std::set<std::string> getSinks(void);
  34. std::string getSource(void);
  35. std::string getSink(void);
  36. //Get the prefered sample rate from jack (if running)
  37. void preferedSampleRate(unsigned &rate);
  38. //Complete Master Swaps to ONLY BE CALLED FROM RT CONTEXT
  39. void masterSwap(Master *master);
  40. //Wave writing
  41. void waveNew(class WavFile *wave);
  42. void waveStart(void);
  43. void waveStop(void);
  44. void waveEnd(void);
  45. extern bool autoConnect;
  46. extern bool pidInClientName;
  47. extern std::string defaultSource;
  48. extern std::string defaultSink;
  49. };
  50. #endif