Loading...
Searching...
No Matches
JackInterface.hpp
1#pragma once
2#include <Audio/AudioInterface.hpp>
3
4#include <score/command/Dispatchers/SettingsCommandDispatcher.hpp>
5
6#include <ossia/audio/jack_protocol.hpp>
7#include <ossia/dataflow/transport.hpp>
8
9#include <score_plugin_audio_export.h>
10
11#if defined(OSSIA_AUDIO_JACK)
12Q_DECLARE_METATYPE(ossia::transport_status)
13W_REGISTER_ARGTYPE(ossia::transport_status)
14#endif
15
16class QFormLayout;
17namespace Audio
18{
19namespace Settings
20{
21class Model;
22class View;
23}
24#if defined(OSSIA_AUDIO_JACK)
25class SCORE_PLUGIN_AUDIO_EXPORT JackFactory final
26 : public QObject
27 , public AudioFactory
28{
29 W_OBJECT(JackFactory)
30 SCORE_CONCRETE("7ff2af00-f2f5-4930-beec-0e2d21eda195")
31private:
32 std::weak_ptr<ossia::jack_client> m_client{};
33
34public:
35 ~JackFactory() override;
36
37 bool available() const noexcept override;
38 void
39 initialize(Audio::Settings::Model& set, const score::ApplicationContext& ctx) override
40 {
41 }
42
43 QString prettyName() const override { return QObject::tr("JACK"); }
44 std::shared_ptr<ossia::audio_engine> make_engine(
45 const Audio::Settings::Model& set, const score::ApplicationContext& ctx) override;
46
47 std::shared_ptr<ossia::jack_client> acquireClient();
48
49 void setupSettingsWidget(
50 QWidget* w, QFormLayout* lay, Audio::Settings::Model& m, Audio::Settings::View& v,
52 QWidget* make_settings(
54 score::SettingsCommandDispatcher& m_disp, QWidget* parent) override;
55
56 void transportStateChanged(ossia::transport_status st)
57 E_SIGNAL(SCORE_PLUGIN_AUDIO_EXPORT, transportStateChanged, st)
58
59 ossia::tick_transport_info currentTransportInfo;
60
61private:
62 jack_transport_state_t m_prevState{};
63};
64#endif
65}
Definition AudioInterface.hpp:28
Definition JackInterface.hpp:28
Definition score-plugin-audio/Audio/Settings/Model.hpp:22
Definition score-plugin-audio/Audio/Settings/View.hpp:19
Definition SettingsCommandDispatcher.hpp:10
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:24