GenericPortAudioInterface.hpp
1 #pragma once
2 #include <Audio/AudioInterface.hpp>
3 #include <Audio/PortAudioInterface.hpp>
4 
5 #include <score/command/Dispatchers/SettingsCommandDispatcher.hpp>
6 
7 #include <ossia/audio/portaudio_protocol.hpp>
8 class QComboBox;
9 namespace Audio
10 {
11 #if defined(OSSIA_AUDIO_PORTAUDIO)
12 
13 class PortAudioFactory final : public AudioFactory
14 {
15  SCORE_CONCRETE("e7543875-3b22-457c-bf41-75504637686f")
16 public:
17  std::vector<PortAudioCard> devices;
18 
20 
21  ~PortAudioFactory() override;
22  bool available() const noexcept override { return true; }
23  void
24  initialize(Audio::Settings::Model& set, const score::ApplicationContext& ctx) override
25  {
26  }
27 
28  void rescan();
29 
30  QString prettyName() const override;
31  std::shared_ptr<ossia::audio_engine> make_engine(
32  const Audio::Settings::Model& set, const score::ApplicationContext& ctx) override;
33 
34  void setCardIn(QComboBox* combo, QString val);
35  void setCardOut(QComboBox* combo, QString val);
36 
37  void updateSampleRates(
38  QComboBox* rate, const PortAudioCard& input, const PortAudioCard& output);
39 
40  QWidget* make_settings(
42  score::SettingsCommandDispatcher& m_disp, QWidget* parent) override;
43 };
44 #endif
45 }
Definition: AudioInterface.hpp:28
Definition: GenericPortAudioInterface.hpp:14
Definition: score-plugin-audio/Audio/Settings/Model.hpp:22
Definition: score-plugin-audio/Audio/Settings/View.hpp:19
Definition: SettingsCommandDispatcher.hpp:10
Definition: PortAudioInterface.hpp:16
Used to access all the application-wide state and structures.
Definition: ApplicationContext.hpp:24