summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-14 22:49:22 +0000
committerDavid Robillard <d@drobilla.net>2011-09-14 22:49:22 +0000
commit728f510e8c542db2907dcd439a9ab99d07282220 (patch)
tree6aa01740b1def7a1fa0a32e22fef929bdc231a62 /src/server
parente18380569bdbe1926be7540f3e2f9ebdf49a8e70 (diff)
downloadingen-728f510e8c542db2907dcd439a9ab99d07282220.tar.gz
ingen-728f510e8c542db2907dcd439a9ab99d07282220.tar.bz2
ingen-728f510e8c542db2907dcd439a9ab99d07282220.zip
Support lv2:sampleRate controls (mostly) correctly.
Fix initial control port values (was always 0.0). Fix numeric values in control window. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3460 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/events/RegisterClient.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/server/events/RegisterClient.cpp b/src/server/events/RegisterClient.cpp
index 71ec26bc..32c1a0c9 100644
--- a/src/server/events/RegisterClient.cpp
+++ b/src/server/events/RegisterClient.cpp
@@ -15,10 +15,12 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "ClientBroadcaster.hpp"
+#include "Driver.hpp"
+#include "Engine.hpp"
#include "Request.hpp"
#include "events/RegisterClient.hpp"
-#include "Engine.hpp"
-#include "ClientBroadcaster.hpp"
+#include "shared/LV2URIMap.hpp"
using namespace Raul;
@@ -49,6 +51,16 @@ void
RegisterClient::post_process()
{
_request->respond_ok();
+
+ /* Tell the client the engine's sample rate (which it needs to know to
+ interpret control bounds for lv2:sampleRate ports). This is a bit of a
+ kludge. TODO: keep a proper RDF model to describe the engine and send
+ that to clients.
+ */
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ _client->set_property(uris.ingen_engine,
+ uris.ingen_sampleRate,
+ int32_t(_engine.driver()->sample_rate()));
}
} // namespace Server