ConfigAudio.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. ==============================================================================
  3. This is an automatically generated GUI class created by the Introjucer!
  4. Be careful when adding custom code to these files, as only the code within
  5. the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  6. and re-saved.
  7. Created with Introjucer version: 3.1.1
  8. ------------------------------------------------------------------------------
  9. The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
  10. Copyright 2004-13 by Raw Material Software Ltd.
  11. ==============================================================================
  12. */
  13. #ifndef _CONFIGAUDIO_H_
  14. #define _CONFIGAUDIO_H_
  15. //[Headers] -- You can add your own extra header files here --
  16. #include "JuceHeader.h"
  17. //[/Headers]
  18. //==============================================================================
  19. /**
  20. //[Comments]
  21. ConfigAudio is a tab of the configuration screen
  22. it instantiates and configures the current AudioStreamer
  23. //[/Comments]
  24. */
  25. class ConfigAudio : public Component,
  26. public Button::Listener,
  27. public ComboBox::Listener,
  28. public Slider::Listener
  29. {
  30. public:
  31. //==============================================================================
  32. ConfigAudio (ValueTree audio_store);
  33. ~ConfigAudio();
  34. //==============================================================================
  35. //[UserMethods] -- You can add your own custom methods in this section.
  36. friend class Config ;
  37. //[/UserMethods]
  38. void paint (Graphics& g);
  39. void resized();
  40. void buttonClicked (Button* buttonThatWasClicked);
  41. void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
  42. void sliderValueChanged (Slider* sliderThatWasMoved);
  43. private:
  44. //[UserVariables] -- You can add your own custom variables in this section.
  45. ValueTree audioStore ;
  46. void loadParams() ;
  47. void populateDevices() ;
  48. void restoreDefaults() ;
  49. void disableComponents() ;
  50. void enableComponents() ;
  51. #ifdef _WIN32
  52. bool queryAsioDevices() ;
  53. bool queryKsDevices() ;
  54. bool queryDsDevices() ;
  55. bool queryWaveDevices() ;
  56. #else // _WIN32
  57. # ifdef _MAC
  58. bool queryCaDevices() ;
  59. # else // _MAC
  60. bool queryJackServers() ;
  61. bool queryAlsaDevices() ;
  62. # endif // _MAC
  63. #endif // _WIN32
  64. int getItemIndex( ComboBox* combo_box , String item_text) ;
  65. void updateLatency() ;
  66. void setConfig( Identifier a_key , var a_value) ;
  67. //[/UserVariables]
  68. //==============================================================================
  69. ScopedPointer<GroupComponent> ioGroup;
  70. ScopedPointer<GroupComponent> formatGroup;
  71. ScopedPointer<GroupComponent> buffersGroup;
  72. ScopedPointer<GroupComponent> routingGroup;
  73. ScopedPointer<TextButton> defaultsButton;
  74. ScopedPointer<TextButton> asioButton;
  75. ScopedPointer<Label> modeLabel;
  76. ScopedPointer<ComboBox> apiComboBox;
  77. ScopedPointer<Label> driverLabel;
  78. ScopedPointer<ComboBox> driverComboBox;
  79. ScopedPointer<Label> sourceLabel;
  80. ScopedPointer<ComboBox> sourceComboBox;
  81. ScopedPointer<Label> sinkLabel;
  82. ScopedPointer<ComboBox> sinkComboBox;
  83. ScopedPointer<Label> bitdepthLabel;
  84. ScopedPointer<ToggleButton> bps16Button;
  85. ScopedPointer<ToggleButton> bps24Button;
  86. ScopedPointer<ToggleButton> bps32Button;
  87. ScopedPointer<Label> samplerateLabel;
  88. ScopedPointer<ToggleButton> kHz44Button;
  89. ScopedPointer<ToggleButton> kHz48Button;
  90. ScopedPointer<ToggleButton> kHz96Button;
  91. ScopedPointer<Label> buffersLabel;
  92. ScopedPointer<Slider> nBuffersSlider;
  93. ScopedPointer<Label> xLabel;
  94. ScopedPointer<ComboBox> bufferComboBox;
  95. ScopedPointer<Label> bytesLabel;
  96. ScopedPointer<Label> jackNameLabel;
  97. ScopedPointer<TextEditor> jackNameText;
  98. ScopedPointer<Label> nSourcesLabel;
  99. ScopedPointer<Slider> nSourcesSlider;
  100. ScopedPointer<Label> nSinksLabel;
  101. ScopedPointer<Slider> nSinksSlider;
  102. ScopedPointer<ToggleButton> jackPortsButton;
  103. //==============================================================================
  104. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConfigAudio)
  105. };
  106. //[EndFile] You can add extra defines here...
  107. //[/EndFile]
  108. #endif // _CONFIGAUDIO_H_