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.

Nio.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. namespace zyncarla {
  15. class WavFile;
  16. class Master;
  17. struct SYNTH_T;
  18. class oss_devs_t;
  19. /**Interface to Nio Subsystem
  20. *
  21. * Should be only externally included header */
  22. namespace Nio
  23. {
  24. void init(const SYNTH_T &synth, const oss_devs_t &oss_devs, Master *master);
  25. bool start(void);
  26. void stop(void);
  27. void setDefaultSource(std::string name);
  28. void setDefaultSink(std::string name);
  29. bool setSource(std::string name);
  30. bool setSink(std::string name);
  31. void setPostfix(std::string post);
  32. std::string getPostfix(void);
  33. std::set<std::string> getSources(void);
  34. std::set<std::string> getSinks(void);
  35. std::string getSource(void);
  36. std::string getSink(void);
  37. //Get the prefered sample rate from jack (if running)
  38. void preferedSampleRate(unsigned &rate);
  39. //Complete Master Swaps to ONLY BE CALLED FROM RT CONTEXT
  40. void masterSwap(Master *master);
  41. //Wave writing
  42. void waveNew(class WavFile *wave);
  43. void waveStart(void);
  44. void waveStop(void);
  45. void waveEnd(void);
  46. extern bool autoConnect;
  47. extern bool pidInClientName;
  48. extern std::string defaultSource;
  49. extern std::string defaultSink;
  50. };
  51. }
  52. #endif