summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 02:04:26 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 02:04:26 -0400
commit721659fa043a02740146ca82ed261066fcbb1077 (patch)
tree7c97d03342db7ae2226351b2f005f7fbbfecc38d /src/server
parent9994cdebb60ecffcf81ced46ccfd12968ea3b2da (diff)
downloadingen-721659fa043a02740146ca82ed261066fcbb1077.tar.gz
ingen-721659fa043a02740146ca82ed261066fcbb1077.tar.bz2
ingen-721659fa043a02740146ca82ed261066fcbb1077.zip
Remove redundant "inline" specifiers
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ArcImpl.hpp4
-rw-r--r--src/server/Buffer.hpp42
-rw-r--r--src/server/BufferFactory.hpp2
-rw-r--r--src/server/ControlBindings.hpp8
-rw-r--r--src/server/Engine.hpp2
-rw-r--r--src/server/Event.hpp16
-rw-r--r--src/server/JackDriver.hpp15
-rw-r--r--src/server/LV2Block.hpp2
-rw-r--r--src/server/PortAudioDriver.hpp16
-rw-r--r--src/server/PortImpl.hpp7
-rw-r--r--src/server/PortType.hpp24
-rw-r--r--src/server/PreProcessor.hpp2
-rw-r--r--src/server/RunContext.cpp12
-rw-r--r--src/server/RunContext.hpp26
-rw-r--r--src/server/ThreadManager.hpp8
-rw-r--r--src/server/events/Disconnect.hpp4
16 files changed, 97 insertions, 93 deletions
diff --git a/src/server/ArcImpl.hpp b/src/server/ArcImpl.hpp
index 09c59c8f..5e7e4357 100644
--- a/src/server/ArcImpl.hpp
+++ b/src/server/ArcImpl.hpp
@@ -60,8 +60,8 @@ public:
ArcImpl(PortImpl* tail, PortImpl* head);
~ArcImpl() override;
- inline PortImpl* tail() const { return _tail; }
- inline PortImpl* head() const { return _head; }
+ PortImpl* tail() const { return _tail; }
+ PortImpl* head() const { return _head; }
const raul::Path& tail_path() const override;
const raul::Path& head_path() const override;
diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp
index d10aeb5c..8a64e621 100644
--- a/src/server/Buffer.hpp
+++ b/src/server/Buffer.hpp
@@ -61,10 +61,10 @@ public:
void* port_data(PortType port_type, SampleCount offset);
const void* port_data(PortType port_type, SampleCount offset) const;
- inline LV2_URID type() const { return _type; }
- inline LV2_URID value_type() const { return _value_type; }
- inline uint32_t capacity() const { return _capacity; }
- inline uint32_t size() const {
+ LV2_URID type() const { return _type; }
+ LV2_URID value_type() const { return _value_type; }
+ uint32_t capacity() const { return _capacity; }
+ uint32_t size() const {
return is_audio() ? _capacity : sizeof(LV2_Atom) + get<LV2_Atom>()->size;
}
@@ -78,20 +78,20 @@ public:
*/
void set_type(GetFn get_func, LV2_URID type, LV2_URID value_type);
- inline bool is_audio() const {
+ bool is_audio() const {
return _type == _factory.uris().atom_Sound;
}
- inline bool is_control() const {
+ bool is_control() const {
return _type == _factory.uris().atom_Float;
}
- inline bool is_sequence() const {
+ bool is_sequence() const {
return _type == _factory.uris().atom_Sequence;
}
/// Audio or float buffers only
- inline const Sample* samples() const {
+ const Sample* samples() const {
if (is_control()) {
return static_cast<const Sample*>(
LV2_ATOM_BODY_CONST(get<LV2_Atom_Float>()));
@@ -105,7 +105,7 @@ public:
}
/// Audio buffers only
- inline Sample* samples() {
+ Sample* samples() {
if (is_control()) {
return static_cast<Sample*>(LV2_ATOM_BODY(get<LV2_Atom_Float>()));
}
@@ -118,7 +118,7 @@ public:
}
/// Numeric buffers only
- inline Sample value_at(SampleCount offset) const {
+ Sample value_at(SampleCount offset) const {
if (is_audio() || is_control()) {
return samples()[offset];
}
@@ -130,9 +130,8 @@ public:
return 0.0f;
}
- inline void set_block(const Sample val,
- const SampleCount start,
- const SampleCount end)
+ void
+ set_block(const Sample val, const SampleCount start, const SampleCount end)
{
if (is_sequence()) {
append_event(start, sizeof(val), _factory.uris().atom_Float,
@@ -151,9 +150,8 @@ public:
}
}
- inline void add_block(const Sample val,
- const SampleCount start,
- const SampleCount end)
+ void
+ add_block(const Sample val, const SampleCount start, const SampleCount end)
{
assert(is_audio() || is_control());
assert(end <= _capacity / sizeof(Sample));
@@ -164,10 +162,10 @@ public:
}
}
- inline void write_block(const Sample val,
- const SampleCount start,
- const SampleCount end,
- const bool add)
+ void write_block(const Sample val,
+ const SampleCount start,
+ const SampleCount end,
+ const bool add)
{
if (add) {
add_block(val, start, end);
@@ -221,9 +219,9 @@ public:
template<typename T> const T* get() const { return reinterpret_cast<const T*>(_buf); }
template<typename T> T* get() { return reinterpret_cast<T*>(_buf); }
- inline void ref() { ++_refs; }
+ void ref() { ++_refs; }
- inline void deref() {
+ void deref() {
if ((--_refs) == 0) {
recycle();
}
diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp
index df024d17..657ce7d2 100644
--- a/src/server/BufferFactory.hpp
+++ b/src/server/BufferFactory.hpp
@@ -85,7 +85,7 @@ private:
Buffer* try_get_buffer(LV2_URID type);
- inline std::atomic<Buffer*>& free_list(LV2_URID type) {
+ std::atomic<Buffer*>& free_list(LV2_URID type) {
if (type == _uris.atom_Float) {
return _free_control;
}
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index c59f9af9..b3b79c15 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -71,16 +71,16 @@ public:
: type(t), num(n)
{}
- inline bool operator<(const Key& other) const {
+ bool operator<(const Key& other) const {
return ((type < other.type) ||
(type == other.type && num < other.num));
}
- inline bool operator==(const Key& other) const {
+ bool operator==(const Key& other) const {
return type == other.type && num == other.num;
}
- inline bool operator!() const { return type == Type::NULL_CONTROL; }
+ bool operator!() const { return type == Type::NULL_CONTROL; }
Type type;
int16_t num;
@@ -91,7 +91,7 @@ public:
public raul::Maid::Disposable {
Binding(Key k=Key(), PortImpl* p=nullptr) : key(k), port(p) {}
- inline bool operator<(const Binding& rhs) const { return key < rhs.key; }
+ bool operator<(const Binding& rhs) const { return key < rhs.key; }
Key key;
PortImpl* port;
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index 07f4c9a3..d224d5b5 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -114,7 +114,7 @@ public:
*
* This value is comparable to the value returned by current_time().
*/
- inline uint64_t cycle_start_time(const RunContext&) const {
+ uint64_t cycle_start_time(const RunContext&) const {
return _cycle_start_time;
}
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index 485badb1..68b66c86 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -85,13 +85,13 @@ public:
virtual void undo(Interface& target) {}
/** Return true iff this event has been pre-processed. */
- inline bool is_prepared() const { return _status != Status::NOT_PREPARED; }
+ bool is_prepared() const { return _status != Status::NOT_PREPARED; }
/** Return the time stamp of this event. */
- inline SampleCount time() const { return _time; }
+ SampleCount time() const { return _time; }
/** Set the time stamp of this event. */
- inline void set_time(SampleCount time) { _time = time; }
+ void set_time(SampleCount time) { _time = time; }
/** Get the next event to be processed after this one. */
Event* next() const { return _next.load(); }
@@ -111,7 +111,7 @@ public:
/** Set the undo mode of this event. */
void set_mode(Mode mode) { _mode = mode; }
- inline Engine& engine() { return _engine; }
+ Engine& engine() { return _engine; }
protected:
Event(Engine& engine,
@@ -137,22 +137,22 @@ protected:
, _mode(Mode::NORMAL)
{}
- inline bool pre_process_done(Status st) {
+ bool pre_process_done(Status st) {
_status = st;
return st == Status::SUCCESS;
}
- inline bool pre_process_done(Status st, const URI& subject) {
+ bool pre_process_done(Status st, const URI& subject) {
_err_subject = subject;
return pre_process_done(st);
}
- inline bool pre_process_done(Status st, const raul::Path& subject) {
+ bool pre_process_done(Status st, const raul::Path& subject) {
return pre_process_done(st, path_to_uri(subject));
}
/** Respond to the originating client. */
- inline Status respond() {
+ Status respond() {
if (_request_client && _request_id) {
_request_client->response(_request_id, _status, _err_subject);
}
diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp
index a00f55cc..7a1dd2e0 100644
--- a/src/server/JackDriver.hpp
+++ b/src/server/JackDriver.hpp
@@ -96,8 +96,8 @@ public:
/** Transport state for this frame.
* Intended to only be called from the audio thread. */
- inline const jack_position_t* position() { return &_position; }
- inline jack_transport_state_t transport_state() { return _transport_state; }
+ const jack_position_t* position() { return &_position; }
+ jack_transport_state_t transport_state() { return _transport_state; }
void append_time_events(RunContext& ctx, Buffer& buffer) override;
@@ -123,16 +123,21 @@ private:
static void thread_init_cb(void* jack_driver);
// Static JACK callbacks which call the non-static callbacks (methods)
- inline static void shutdown_cb(void* const jack_driver) {
+
+ static void shutdown_cb(void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_shutdown_cb();
}
- inline static int process_cb(jack_nframes_t nframes, void* const jack_driver) {
+
+ static int process_cb(jack_nframes_t nframes, void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_process_cb(nframes);
}
- inline static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) {
+
+ static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_block_length_cb(nframes);
}
+ // Internal methods for processing
+
void pre_process_port(RunContext& ctx, EnginePort* port);
void post_process_port(RunContext& ctx, EnginePort* port) const;
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index 8e87acda..9e907ffa 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -152,7 +152,7 @@ protected:
struct Response : public raul::Maid::Disposable
, public raul::Noncopyable
, public boost::intrusive::slist_base_hook<> {
- inline Response(uint32_t s, const void* d)
+ Response(uint32_t s, const void* d)
: size(s)
, data(malloc(s))
{
diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp
index e57c903d..a624ee6e 100644
--- a/src/server/PortAudioDriver.hpp
+++ b/src/server/PortAudioDriver.hpp
@@ -91,15 +91,15 @@ public:
private:
friend class PortAudioPort;
- inline static int
- pa_process_cb(const void* inputs,
- void* outputs,
- unsigned long nframes,
- const PaStreamCallbackTimeInfo* time,
- PaStreamCallbackFlags flags,
- void* handle) {
+ static int pa_process_cb(const void* inputs,
+ void* outputs,
+ unsigned long nframes,
+ const PaStreamCallbackTimeInfo* time,
+ PaStreamCallbackFlags flags,
+ void* handle)
+ {
return static_cast<PortAudioDriver*>(handle)->process_cb(
- inputs, outputs, nframes, time, flags);
+ inputs, outputs, nframes, time, flags);
}
int process_cb(const void* inputs,
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 41c450e3..07904cff 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -145,10 +145,11 @@ public:
void set_minimum(const Atom& min) { _min.set_rt(min); }
void set_maximum(const Atom& max) { _max.set_rt(max); }
- inline BufferRef buffer(uint32_t voice) const {
+ BufferRef buffer(uint32_t voice) const {
return _voices->at((_poly == 1) ? 0 : voice).buffer;
}
- inline BufferRef prepared_buffer(uint32_t voice) const {
+
+ BufferRef prepared_buffer(uint32_t voice) const {
return _prepared_voices->at(voice).buffer;
}
@@ -205,7 +206,7 @@ public:
uint32_t index() const { return _index; }
void set_index(RunContext&, uint32_t index) { _index = index; }
- inline bool is_a(PortType type) const { return _type == type; }
+ bool is_a(PortType type) const { return _type == type; }
bool has_value() const;
diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp
index 2df3aa9d..65f87d02 100644
--- a/src/server/PortType.hpp
+++ b/src/server/PortType.hpp
@@ -59,22 +59,22 @@ public:
PortType(ID id) noexcept : _id(id) {}
- inline const URI& uri() const { return type_uri(_id); }
- inline ID id() const { return _id; }
+ const URI& uri() const { return type_uri(_id); }
+ ID id() const { return _id; }
- inline bool operator==(const ID& id) const { return (_id == id); }
- inline bool operator!=(const ID& id) const { return (_id != id); }
- inline bool operator==(const PortType& type) const { return (_id == type._id); }
- inline bool operator!=(const PortType& type) const { return (_id != type._id); }
- inline bool operator<(const PortType& type) const { return (_id < type._id); }
+ bool operator==(const ID& id) const { return (_id == id); }
+ bool operator!=(const ID& id) const { return (_id != id); }
+ bool operator==(const PortType& type) const { return (_id == type._id); }
+ bool operator!=(const PortType& type) const { return (_id != type._id); }
+ bool operator<(const PortType& type) const { return (_id < type._id); }
- inline bool is_audio() { return _id == AUDIO; }
- inline bool is_control() { return _id == CONTROL; }
- inline bool is_cv() { return _id == CV; }
- inline bool is_atom() { return _id == ATOM; }
+ bool is_audio() { return _id == AUDIO; }
+ bool is_control() { return _id == CONTROL; }
+ bool is_cv() { return _id == CV; }
+ bool is_atom() { return _id == ATOM; }
private:
- static inline const URI& type_uri(unsigned id_num) {
+ static const URI& type_uri(unsigned id_num) {
assert(id_num <= ATOM);
static const URI uris[] = {
URI("http://www.w3.org/2002/07/owl#Nothing"),
diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp
index ff0b5fff..c17e4d87 100644
--- a/src/server/PreProcessor.hpp
+++ b/src/server/PreProcessor.hpp
@@ -42,7 +42,7 @@ public:
~PreProcessor();
/** Return true iff no events are enqueued. */
- inline bool empty() const { return !_head.load(); }
+ bool empty() const { return !_head.load(); }
/** Enqueue an event.
* This is safe to call from any non-realtime thread (it locks).
diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp
index 1e5b3657..f4e9219c 100644
--- a/src/server/RunContext.cpp
+++ b/src/server/RunContext.cpp
@@ -41,12 +41,12 @@ namespace ingen {
namespace server {
struct Notification {
- explicit inline Notification(PortImpl* p = nullptr,
- FrameTime f = 0,
- LV2_URID k = 0,
- uint32_t s = 0,
- LV2_URID t = 0)
- : port(p), time(f), key(k), size(s), type(t)
+ explicit Notification(PortImpl* p = nullptr,
+ FrameTime f = 0,
+ LV2_URID k = 0,
+ uint32_t s = 0,
+ LV2_URID t = 0)
+ : port(p), time(f), key(k), size(s), type(t)
{}
PortImpl* port;
diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp
index f39b5864..30f87efd 100644
--- a/src/server/RunContext.hpp
+++ b/src/server/RunContext.hpp
@@ -103,17 +103,17 @@ public:
* cycle (other than the fact that it must be processed in significantly
* less time to avoid a dropout when running in real time).
*/
- inline uint64_t duration() const {
+ uint64_t duration() const {
return static_cast<uint64_t>(_nframes) * 1e6 / _rate;
}
- inline void locate(FrameTime s, SampleCount nframes) {
+ void locate(FrameTime s, SampleCount nframes) {
_start = s;
_end = s + nframes;
_nframes = nframes;
}
- inline void slice(SampleCount offset, SampleCount nframes) {
+ void slice(SampleCount offset, SampleCount nframes) {
_offset = offset;
_nframes = nframes;
}
@@ -129,16 +129,16 @@ public:
void join();
- inline Engine& engine() const { return _engine; }
- inline Task* task() const { return _task; }
- inline unsigned id() const { return _id; }
- inline FrameTime start() const { return _start; }
- inline FrameTime time() const { return _start + _offset; }
- inline FrameTime end() const { return _end; }
- inline SampleCount offset() const { return _offset; }
- inline SampleCount nframes() const { return _nframes; }
- inline SampleCount rate() const { return _rate; }
- inline bool realtime() const { return _realtime; }
+ Engine& engine() const { return _engine; }
+ Task* task() const { return _task; }
+ unsigned id() const { return _id; }
+ FrameTime start() const { return _start; }
+ FrameTime time() const { return _start + _offset; }
+ FrameTime end() const { return _end; }
+ SampleCount offset() const { return _offset; }
+ SampleCount nframes() const { return _nframes; }
+ SampleCount rate() const { return _rate; }
+ bool realtime() const { return _realtime; }
protected:
void run();
diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp
index 7c895607..b25c6eed 100644
--- a/src/server/ThreadManager.hpp
+++ b/src/server/ThreadManager.hpp
@@ -34,23 +34,23 @@ enum ThreadFlag {
class INGEN_SERVER_API ThreadManager
{
public:
- static inline void set_flag(ThreadFlag f) {
+ static void set_flag(ThreadFlag f) {
#ifndef NDEBUG
flags = (static_cast<unsigned>(flags) | f);
#endif
}
- static inline void unset_flag(ThreadFlag f) {
+ static void unset_flag(ThreadFlag f) {
#ifndef NDEBUG
flags = (static_cast<unsigned>(flags) & (~f));
#endif
}
- static inline void assert_thread(ThreadFlag f) {
+ static void assert_thread(ThreadFlag f) {
assert(single_threaded || (flags & f));
}
- static inline void assert_not_thread(ThreadFlag f) {
+ static void assert_not_thread(ThreadFlag f) {
assert(single_threaded || !(flags & f));
}
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index 5ce635e6..71ad4204 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -68,8 +68,8 @@ public:
bool execute(RunContext& ctx, bool set_head_buffers);
- inline PortImpl* tail() { return _tail; }
- inline InputPort* head() { return _head; }
+ PortImpl* tail() { return _tail; }
+ InputPort* head() { return _head; }
private:
Engine& _engine;