Loading...
Searching...
No Matches
ALSAInterface.hpp
1#pragma once
2#include <Audio/AudioInterface.hpp>
3
4#include <ossia/audio/alsa_protocol.hpp>
5
6#include <QObject>
7class QComboBox;
8namespace Audio
9{
10#if defined(OSSIA_AUDIO_ALSA)
11struct range
12{
13 int min;
14 int max;
15};
16struct AlsaCard
17{
18 QString raw_name;
19 QString pretty_name;
20
21 range inputRange{};
22 range outputRange{};
23
24 std::vector<double> rates{};
25 std::vector<int> buffer_sizes{};
26};
27
28class ALSAFactory final
29 : public QObject
30 , public AudioFactory
31{
32 SCORE_CONCRETE("a390218a-a951-4cda-b4ee-c41d2df44236")
33public:
34 std::vector<AlsaCard> devices;
35
36 ALSAFactory();
37 ~ALSAFactory() override;
38
39 void
40 initialize(Audio::Settings::Model& set, const score::ApplicationContext& ctx) override;
41 void rescan();
42
43 bool available() const noexcept override;
44 QString prettyName() const override;
45 std::shared_ptr<ossia::audio_engine> make_engine(
46 const Audio::Settings::Model& set, const score::ApplicationContext& ctx) override;
47
48 void setCard(QComboBox* combo, QString val);
49
50 QWidget* make_settings(
51 Audio::Settings::Model& m, Audio::Settings::View& v,
52 score::SettingsCommandDispatcher& m_disp, QWidget* parent) override;
53};
54#endif
55}
Base toolkit upon which the software is built.
Definition Application.cpp:90
STL namespace.
Definition MIDISync.hpp:126