SoundComponent.hpp
1 #pragma once
2 #include <Process/Dataflow/Port.hpp>
3 #include <Process/Execution/ProcessComponent.hpp>
4 #include <Process/Process.hpp>
5 
6 #include <Media/Sound/SoundModel.hpp>
7 
8 #include <score/model/Component.hpp>
9 
10 #include <ossia/dataflow/node_process.hpp>
11 #include <ossia/network/value/value.hpp>
12 
13 namespace Media
14 {
15 class SoundComponentSetup;
16 }
17 namespace Execution
18 {
19 
20 class SoundComponent final
22  Media::Sound::ProcessModel, ossia::node_process>
23 {
24  COMPONENT_METADATA("a25d0de0-74e2-4011-aeb6-4188673015f2")
25 public:
27  Media::Sound::ProcessModel& element, const ::Execution::Context& ctx,
28  QObject* parent);
29 
30  void recompute();
31  void on_fileChanged();
32 
33  ~SoundComponent() override;
34 
35 private:
36  friend class Media::SoundComponentSetup;
37  struct Recomputer : public Nano::Observer
38  {
39  explicit Recomputer(SoundComponent& self)
40  : self{self}
41  {
42  }
43  SoundComponent& self;
44  void recompute() { self.recompute(); }
45  };
46  Recomputer m_recomputer;
47 };
48 
50 
51 SCORE_CONCRETE_COMPONENT_FACTORY(
53 }
Definition: Process/Execution/ProcessComponent.hpp:119
Definition: Process/Execution/ProcessComponent.hpp:102
Definition: SoundComponent.hpp:23
Definition: SoundModel.hpp:27
Definition: SoundComponent.cpp:37
Components used for the execution of a score.
Definition: ProcessComponent.cpp:12
Definition: Process/Execution/ProcessComponent.hpp:89