2#include <ossia/detail/config.hpp>
3#if !defined(OSSIA_FREESTANDING)
4#include <ossia/dataflow/execution/execution_policy.hpp>
5#include <ossia/detail/lockfree_queue.hpp>
6#include <ossia/network/base/bundle.hpp>
8#include <blockingconcurrentqueue.h>
15struct direct_execution_state_policy : execution_state_policy
17 direct_execution_state_policy();
18 ~direct_execution_state_policy();
20 void commit()
override;
22 void clear_local_state()
override;
24 bool find_and_copy(net::parameter_base& addr, inlet& in)
override;
25 bool in_local_scope(net::parameter_base& other)
const override;
28 void insert(ossia::audio_parameter& dest,
const audio_port& v)
override;
29 void insert(ossia::net::midi::midi_parameter& dest,
const midi_port& v)
override;
31 void process_messages();
34 struct T : moodycamel::ConcurrentQueueDefaultTraits
36 static constexpr std::size_t CQ_BLOCK_SIZE = 2048;
39 moodycamel::BlockingConcurrentQueue<ossia::bundle_element, T> m_messagesToApply;
41 static constexpr int max_threads = 16;
45 } m_threads[max_threads];
47 std::thread m_midiThread;
49 std::atomic_bool m_startFlag{};
50 std::atomic_bool m_stopFlag{};
54 const ossia::audio_port* src{};
55 ossia::audio_parameter* dst{};
57 ossia::mpmc_queue<audio_msg> m_audioQueue;
61 const ossia::midi_port* src{};
62 ossia::net::midi::midi_parameter* dst{};
64 ossia::mpmc_queue<midi_msg> m_midiQueue;
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48