projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix missing colon in extension of LXVST search path
[ardour.git]
/
libs
/
fst
/
vsti.c
diff --git
a/libs/fst/vsti.c
b/libs/fst/vsti.c
index f6d8725ddffccd7ffcf011e2acbe5f4e7091e054..e5c7d9c6c978f2e5b69441967950196663919b99 100644
(file)
--- a/
libs/fst/vsti.c
+++ b/
libs/fst/vsti.c
@@
-30,7
+30,11
@@
#include <fcntl.h>
#include <stdbool.h>
#include <jackvst.h>
#include <fcntl.h>
#include <stdbool.h>
#include <jackvst.h>
-#include <vst/aeffectx.h>
+#include <pthread.h>
+#include <sched.h>
+#include "ardour/vestige/aeffectx.h"
+
+#ifdef HAVE_ALSAMIDIVSTIXXX // not used in ardour 3
snd_seq_t *
create_sequencer (const char* client_name, bool isinput)
snd_seq_t *
create_sequencer (const char* client_name, bool isinput)
@@
-64,17
+68,17
@@
create_sequencer (const char* client_name, bool isinput)
static void
queue_midi (JackVST *jvst, int val1, int val2, int val3)
{
static void
queue_midi (JackVST *jvst, int val1, int val2, int val3)
{
-
struct
VstMidiEvent *pevent;
+ VstMidiEvent *pevent;
jack_ringbuffer_data_t vec[2];
jack_ringbuffer_get_write_vector (jvst->event_queue, vec);
jack_ringbuffer_data_t vec[2];
jack_ringbuffer_get_write_vector (jvst->event_queue, vec);
- if (vec[0].len < sizeof (
struct
VstMidiEvent)) {
+ if (vec[0].len < sizeof (VstMidiEvent)) {
fst_error ("event queue has no write space");
return;
}
fst_error ("event queue has no write space");
return;
}
- pevent = (
struct VstMidiEe
vent *) vec[0].buf;
+ pevent = (
VstMidiE
vent *) vec[0].buf;
// printf("note: %d\n",note);
// printf("note: %d\n",note);
@@
-95,7
+99,7
@@
queue_midi (JackVST *jvst, int val1, int val2, int val3)
//printf("Sending: %x %x %x\n",val1,val2,val3);
//printf("Sending: %x %x %x\n",val1,val2,val3);
- jack_ringbuffer_write_advance (jvst->event_queue, sizeof (
struct
VstMidiEvent));
+ jack_ringbuffer_write_advance (jvst->event_queue, sizeof (VstMidiEvent));
}
void *midireceiver(void *arg)
}
void *midireceiver(void *arg)
@@
-104,6
+108,13
@@
void *midireceiver(void *arg)
JackVST *jvst = (JackVST* )arg;
int val;
JackVST *jvst = (JackVST* )arg;
int val;
+ struct sched_param scp;
+ scp.sched_priority = 50;
+
+ // Try to set fifo priority...
+ // this works, if we are root or newe sched-cap manegment is used...
+ pthread_setschedparam( pthread_self(), SCHED_FIFO, &scp );
+
while (1) {
snd_seq_event_input (jvst->seq, &event);
while (1) {
snd_seq_event_input (jvst->seq, &event);
@@
-176,6
+187,6
@@
void stop_midireceiver (JackVST *jvst)
pthread_join (jvst->midi_thread,NULL);
snd_seq_close (jvst->seq);
}
pthread_join (jvst->midi_thread,NULL);
snd_seq_close (jvst->seq);
}
-
+#endif