summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Block.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-25 15:26:48 -0500
committerDavid Robillard <d@drobilla.net>2017-12-25 16:26:13 -0500
commit15b3b0e9f8823752f80c7e597a70749813e61c79 (patch)
tree3f324c6e2a455be8b929456dadbf06520889d435 /src/server/LV2Block.cpp
parentd6a9571641bcb34acb3521feb08eea33195fd9ca (diff)
downloadingen-15b3b0e9f8823752f80c7e597a70749813e61c79.tar.gz
ingen-15b3b0e9f8823752f80c7e597a70749813e61c79.tar.bz2
ingen-15b3b0e9f8823752f80c7e597a70749813e61c79.zip
Always use braces
Diffstat (limited to 'src/server/LV2Block.cpp')
-rw-r--r--src/server/LV2Block.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index 91490e69..05b76737 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -163,13 +163,15 @@ LV2Block::make_instance(URIs& uris,
bool
LV2Block::prepare_poly(BufferFactory& bufs, uint32_t poly)
{
- if (!_polyphonic)
+ if (!_polyphonic) {
poly = 1;
+ }
BlockImpl::prepare_poly(bufs, poly);
- if (_polyphony == poly)
+ if (_polyphony == poly) {
return true;
+ }
const SampleRate rate = bufs.engine().sample_rate();
assert(!_prepared_instances);
@@ -195,8 +197,9 @@ LV2Block::prepare_poly(BufferFactory& bufs, uint32_t poly)
bool
LV2Block::apply_poly(RunContext& context, uint32_t poly)
{
- if (!_polyphonic)
+ if (!_polyphonic) {
poly = 1;
+ }
if (_prepared_instances) {
_instances = std::move(_prepared_instances);
@@ -528,8 +531,9 @@ LV2Block::activate(BufferFactory& bufs)
{
BlockImpl::activate(bufs);
- for (uint32_t i = 0; i < _polyphony; ++i)
+ for (uint32_t i = 0; i < _polyphony; ++i) {
lilv_instance_activate(instance(i));
+ }
}
void
@@ -537,8 +541,9 @@ LV2Block::deactivate()
{
BlockImpl::deactivate();
- for (uint32_t i = 0; i < _polyphony; ++i)
+ for (uint32_t i = 0; i < _polyphony; ++i) {
lilv_instance_deactivate(instance(i));
+ }
}
LV2_Worker_Status
@@ -572,8 +577,9 @@ LV2Block::work(uint32_t size, const void* data)
void
LV2Block::run(RunContext& context)
{
- for (uint32_t i = 0; i < _polyphony; ++i)
+ for (uint32_t i = 0; i < _polyphony; ++i) {
lilv_instance_run(instance(i), context.nframes());
+ }
}
void