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.

40 lines
928B

  1. #pragma once
  2. #include <app/common.hpp>
  3. #include <app/LedDisplay.hpp>
  4. #include <ui/Menu.hpp>
  5. #include <audio.hpp>
  6. namespace rack {
  7. namespace app {
  8. /** Designed for Audio-8 and Audio-16 module. */
  9. struct AudioWidget : LedDisplay {
  10. LedDisplayChoice* driverChoice;
  11. LedDisplaySeparator* driverSeparator;
  12. LedDisplayChoice* deviceChoice;
  13. LedDisplaySeparator* deviceSeparator;
  14. LedDisplayChoice* sampleRateChoice;
  15. LedDisplaySeparator* sampleRateSeparator;
  16. LedDisplayChoice* bufferSizeChoice;
  17. void setAudioPort(audio::Port* port);
  18. };
  19. /** Designed for Audio-2 module. */
  20. struct AudioDeviceWidget : LedDisplay {
  21. LedDisplayChoice* deviceChoice;
  22. void setAudioPort(audio::Port* port);
  23. };
  24. /** Appends menu items to the given menu with driver, device, etc.
  25. Useful alternative to putting an AudioWidget on your module's panel.
  26. */
  27. void appendAudioMenu(ui::Menu* menu, audio::Port* port);
  28. } // namespace app
  29. } // namespace rack