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.

43 lines
732B

  1. #pragma once
  2. #pragma GCC diagnostic push
  3. #pragma GCC diagnostic ignored "-Wsuggest-override"
  4. #include <RtAudio.h>
  5. #pragma GCC diagnostic pop
  6. namespace rack {
  7. struct AudioIO {
  8. int maxOutputs = 8;
  9. int maxInputs = 8;
  10. RtAudio *stream = NULL;
  11. // Stream properties
  12. int device = -1;
  13. int sampleRate = 44100;
  14. int blockSize = 256;
  15. int numOutputs = 0;
  16. int numInputs = 0;
  17. AudioIO();
  18. ~AudioIO();
  19. std::vector<int> listDrivers();
  20. std::string getDriverName(int driver);
  21. int getDriver();
  22. void setDriver(int driver);
  23. int getDeviceCount();
  24. std::string getDeviceName(int device);
  25. std::string getDeviceDetail(int device);
  26. void openStream();
  27. void closeStream();
  28. std::vector<int> listSampleRates();
  29. };
  30. } // namespace rack