summaryrefslogtreecommitdiffstats
path: root/src/server/PatchImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-14 04:30:00 +0000
committerDavid Robillard <d@drobilla.net>2012-05-14 04:30:00 +0000
commitf180683d453814dcd4a00eb5f0946fd7fc5677c4 (patch)
treeddd150d207c237c72ebf424acf517ce847bf2674 /src/server/PatchImpl.cpp
parent121b8a2c33125225e11539b83d87cb9a1d70e537 (diff)
downloadingen-f180683d453814dcd4a00eb5f0946fd7fc5677c4.tar.gz
ingen-f180683d453814dcd4a00eb5f0946fd7fc5677c4.tar.bz2
ingen-f180683d453814dcd4a00eb5f0946fd7fc5677c4.zip
Remove Thread context stuff and add a thread-specific variable class, ThreadVar, which can be used for this and many other things.
ClientBroadcaster => Broadcaster. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4405 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PatchImpl.cpp')
-rw-r--r--src/server/PatchImpl.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp
index 9a21ee23..9ba7b6cf 100644
--- a/src/server/PatchImpl.cpp
+++ b/src/server/PatchImpl.cpp
@@ -324,12 +324,10 @@ PatchImpl::has_edge(const PortImpl* tail, const PortImpl* dst_port) const
}
uint32_t
-PatchImpl::num_ports() const
+PatchImpl::num_ports_non_rt() const
{
- if (ThreadManager::thread_is(THREAD_PROCESS))
- return NodeImpl::num_ports();
- else
- return _inputs.size() + _outputs.size();
+ ThreadManager::assert_not_thread(THREAD_PROCESS);
+ return _inputs.size() + _outputs.size();
}
/** Create a port. Not realtime safe.
@@ -352,7 +350,7 @@ PatchImpl::create_port(BufferFactory& bufs,
if (type == PortType::CONTROL || type == PortType::CV)
value = bufs.forge().make(0.0f);
- return new DuplexPort(bufs, this, name, num_ports(), polyphonic, _polyphony,
+ return new DuplexPort(bufs, this, name, num_ports_non_rt(), polyphonic, _polyphony,
type, buffer_type, value, buffer_size, is_output);
}