summaryrefslogtreecommitdiff
path: root/libs/plugins
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-10-27 09:52:46 +0100
committerRobin Gareus <robin@gareus.org>2013-10-27 09:52:46 +0100
commitbe6d6231fbe56875815c81999e1fc41db0e21a23 (patch)
tree709c30e2321ea34b586560c5a7c821d99df77c37 /libs/plugins
parentcaa7c3b579c82d1b075b94d35f4e5bef7301b7c1 (diff)
expand tabs in reaonablesynth code
Diffstat (limited to 'libs/plugins')
-rw-r--r--libs/plugins/reasonablesynth.lv2/lv2.c16
-rw-r--r--libs/plugins/reasonablesynth.lv2/rsynth.c28
2 files changed, 22 insertions, 22 deletions
diff --git a/libs/plugins/reasonablesynth.lv2/lv2.c b/libs/plugins/reasonablesynth.lv2/lv2.c
index d6bc654ff4..ce3f5c16f5 100644
--- a/libs/plugins/reasonablesynth.lv2/lv2.c
+++ b/libs/plugins/reasonablesynth.lv2/lv2.c
@@ -137,13 +137,13 @@ run(LV2_Handle handle, uint32_t n_samples)
LV2_Atom_Event const* ev = (LV2_Atom_Event const*) ((&(self->midiin)->body) + 1); // lv2_atom_sequence_begin
while( (const uint8_t*)ev < ((const uint8_t*) &(self->midiin)->body + (self->midiin)->atom.size) ) {
if (ev->body.type == self->midi_MidiEvent) {
- if (written + BUFFER_SIZE_SAMPLES < ev->time.frames
- && ev->time.frames < n_samples) {
- /* first synthesize sound up until the message timestamp */
- written = synth_sound(self->synth, written, ev->time.frames, audio);
- }
- /* send midi message to synth */
- synth_parse_midi(self->synth, (const uint8_t*)(ev+1), ev->body.size);
+ if (written + BUFFER_SIZE_SAMPLES < ev->time.frames
+ && ev->time.frames < n_samples) {
+ /* first synthesize sound up until the message timestamp */
+ written = synth_sound(self->synth, written, ev->time.frames, audio);
+ }
+ /* send midi message to synth */
+ synth_parse_midi(self->synth, (const uint8_t*)(ev+1), ev->body.size);
}
ev = (LV2_Atom_Event const*)((const uint8_t*)ev + sizeof(LV2_Atom_Event) + ((ev->body.size + 7) & ~7));
}
@@ -191,4 +191,4 @@ lv2_descriptor(uint32_t index)
}
}
-/* vi:set ts=8 sts=2 sw=2: */
+/* vi:set ts=8 sts=2 sw=2 et: */
diff --git a/libs/plugins/reasonablesynth.lv2/rsynth.c b/libs/plugins/reasonablesynth.lv2/rsynth.c
index ff88d58b64..d2d5b3e905 100644
--- a/libs/plugins/reasonablesynth.lv2/rsynth.c
+++ b/libs/plugins/reasonablesynth.lv2/rsynth.c
@@ -240,8 +240,8 @@ static void process_key (void *synth,
// note off
if (sc->adsr_cnt[note] <= sc->adsr.off[1]) {
if (sc->adsr_cnt[note] != sc->adsr.off[1]) {
- // x-fade to release
- sc->adsr_amp[note] = adsr_env(sc, note);
+ // x-fade to release
+ sc->adsr_amp[note] = adsr_env(sc, note);
}
sc->adsr_cnt[note] = sc->adsr.off[1] + 1;
}
@@ -337,31 +337,31 @@ static void synth_process_midi_event(void *synth, struct rmidi_event_t *ev) {
switch(ev->type) {
case NOTE_ON:
if (rs->sc[ev->channel].miditable[ev->d.tone.note] <= 0)
- rs->sc[ev->channel].miditable[ev->d.tone.note] = ev->d.tone.velocity;
+ rs->sc[ev->channel].miditable[ev->d.tone.note] = ev->d.tone.velocity;
break;
case NOTE_OFF:
if (rs->sc[ev->channel].miditable[ev->d.tone.note] > 0)
- rs->sc[ev->channel].miditable[ev->d.tone.note] *= -1.0;
+ rs->sc[ev->channel].miditable[ev->d.tone.note] *= -1.0;
break;
case PROGRAM_CHANGE:
break;
case CONTROL_CHANGE:
if (ev->d.control.param == 0x00 || ev->d.control.param == 0x20) {
- /* 0x00 and 0x20 are used for BANK select */
- break;
+ /* 0x00 and 0x20 are used for BANK select */
+ break;
} else
if (ev->d.control.param == 121) {
- /* reset all controllers */
- break;
+ /* reset all controllers */
+ break;
} else
if (ev->d.control.param == 120 || ev->d.control.param == 123) {
- /* Midi panic: 120: all sound off, 123: all notes off*/
- synth_reset_channel(&(rs->sc[ev->channel]));
- break;
+ /* Midi panic: 120: all sound off, 123: all notes off*/
+ synth_reset_channel(&(rs->sc[ev->channel]));
+ break;
} else
if (ev->d.control.param >= 120) {
- /* params 122-127 are reserved - skip them. */
- break;
+ /* params 122-127 are reserved - skip them. */
+ break;
}
break;
default:
@@ -493,4 +493,4 @@ static void * synth_alloc(void) {
static void synth_free(void *synth) {
free(synth);
}
-/* vi:set ts=8 sts=2 sw=2: */
+/* vi:set ts=8 sts=2 sw=2 et: */