updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / milkytracker / jack_autoconnect.patch
blobd0895eab6018ad8a0596108e6f8f4f7286d695bc
1 diff -cx .svn milkytracker-0.90.85/src/milkyplay/drivers/jack/AudioDriver_JACK.cpp milkytracker-trunk/src/milkyplay/drivers/jack/AudioDriver_JACK.cpp
2 *** milkytracker-0.90.85/src/milkyplay/drivers/jack/AudioDriver_JACK.cpp 2009-03-28 11:19:41.392162000 +0000
3 --- milkytracker-trunk/src/milkyplay/drivers/jack/AudioDriver_JACK.cpp 2010-01-03 18:48:15.616918068 +0000
4 ***************
5 *** 102,124 ****
6 // Each function has to be cast.. surely there must be an easier way?
7 dlerror();
8 jack_port_get_buffer = (void* (*)(jack_port_t*, jack_nframes_t))
9 ! dlsym(libJack, "jack_port_get_buffer");
10 jack_client_new = (jack_client_t* (*)(const char*))
11 ! dlsym(libJack, "jack_client_new");
12 jack_port_register = (jack_port_t* (*)(jack_client_t*, const char*, const char*, long unsigned int, long unsigned int))
13 ! dlsym(libJack, "jack_port_register");
14 jack_set_process_callback = (int (*)(jack_client_t*, int (*)(jack_nframes_t, void*), void*))
15 ! dlsym(libJack, "jack_set_process_callback");
16 jack_get_buffer_size = (jack_nframes_t (*)(jack_client_t*))
17 ! dlsym(libJack, "jack_get_buffer_size");
18 jack_deactivate = (int (*)(jack_client_t*))
19 ! dlsym(libJack, "jack_deactivate");
20 jack_client_close = (int (*)(jack_client_t*))
21 ! dlsym(libJack, "jack_client_close");
22 jack_activate = (int (*)(jack_client_t*))
23 ! dlsym(libJack, "jack_activate");
24 jack_get_sample_rate = (jack_nframes_t (*)(jack_client_t *))
25 ! dlsym(libJack, "jack_get_sample_rate");
26 if(dlerror()) {
27 fprintf(stderr, "JACK: An error occured whilst loading symbols, aborting.\n");
28 return -1;
29 --- 102,130 ----
30 // Each function has to be cast.. surely there must be an easier way?
31 dlerror();
32 jack_port_get_buffer = (void* (*)(jack_port_t*, jack_nframes_t))
33 ! dlsym(libJack, "jack_port_get_buffer");
34 jack_client_new = (jack_client_t* (*)(const char*))
35 ! dlsym(libJack, "jack_client_new");
36 jack_port_register = (jack_port_t* (*)(jack_client_t*, const char*, const char*, long unsigned int, long unsigned int))
37 ! dlsym(libJack, "jack_port_register");
38 jack_set_process_callback = (int (*)(jack_client_t*, int (*)(jack_nframes_t, void*), void*))
39 ! dlsym(libJack, "jack_set_process_callback");
40 jack_get_buffer_size = (jack_nframes_t (*)(jack_client_t*))
41 ! dlsym(libJack, "jack_get_buffer_size");
42 jack_deactivate = (int (*)(jack_client_t*))
43 ! dlsym(libJack, "jack_deactivate");
44 jack_client_close = (int (*)(jack_client_t*))
45 ! dlsym(libJack, "jack_client_close");
46 jack_activate = (int (*)(jack_client_t*))
47 ! dlsym(libJack, "jack_activate");
48 jack_get_sample_rate = (jack_nframes_t (*)(jack_client_t *))
49 ! dlsym(libJack, "jack_get_sample_rate");
50 ! jack_get_ports = (const char** (*)(jack_client_t *, const char *, const char *, unsigned long))
51 ! dlsym(libJack, "jack_get_ports");
52 ! jack_connect = (int (*)(jack_client_t *, const char *source_port, const char *destination_port))
53 ! dlsym(libJack, "jack_connect");
54 ! jack_port_name = (const char* (*)(const jack_port_t *))
55 ! dlsym(libJack, "jack_port_name");
56 if(dlerror()) {
57 fprintf(stderr, "JACK: An error occured whilst loading symbols, aborting.\n");
58 return -1;
59 ***************
60 *** 179,184 ****
61 --- 185,196 ----
63 mp_sint32 AudioDriver_JACK::start()
65 + jack_get_ports = (const char** (*)(jack_client_t *, const char *, const char *, unsigned long))
66 + dlsym(libJack, "jack_get_ports");
67 + jack_connect = (int (*)(jack_client_t *, const char *source_port, const char *destination_port))
68 + dlsym(libJack, "jack_connect");
69 + jack_port_name = (const char* (*)(const jack_port_t *))
70 + dlsym(libJack, "jack_port_name");
71 jack_activate(hJack);
72 deviceHasStarted = true;
73 return 0;
74 diff -cx .svn milkytracker-0.90.85/src/milkyplay/drivers/jack/AudioDriver_JACK.h milkytracker-trunk/src/milkyplay/drivers/jack/AudioDriver_JACK.h
75 *** milkytracker-0.90.85/src/milkyplay/drivers/jack/AudioDriver_JACK.h 2009-03-28 11:19:41.392162000 +0000
76 --- milkytracker-trunk/src/milkyplay/drivers/jack/AudioDriver_JACK.h 2010-01-03 18:38:35.835648568 +0000
77 ***************
78 *** 57,74 ****
79 jack_client_t *(*jack_client_new) (const char *client_name);
80 int (*jack_client_close) (jack_client_t *client);
81 int (*jack_set_process_callback) (jack_client_t *client,
82 ! JackProcessCallback process_callback,
83 ! void *arg);
84 int (*jack_activate) (jack_client_t *client);
85 int (*jack_deactivate) (jack_client_t *client);
86 jack_port_t *(*jack_port_register) (jack_client_t *client,
87 ! const char *port_name,
88 ! const char *port_type,
89 ! unsigned long flags,
90 ! unsigned long buffer_size);
91 void *(*jack_port_get_buffer) (jack_port_t *, jack_nframes_t);
92 jack_nframes_t (*jack_get_buffer_size) (jack_client_t *);
93 jack_nframes_t (*jack_get_sample_rate) (jack_client_t *);
95 public:
96 AudioDriver_JACK();
97 --- 57,83 ----
98 jack_client_t *(*jack_client_new) (const char *client_name);
99 int (*jack_client_close) (jack_client_t *client);
100 int (*jack_set_process_callback) (jack_client_t *client,
101 ! JackProcessCallback process_callback,
102 ! void *arg);
103 int (*jack_activate) (jack_client_t *client);
104 int (*jack_deactivate) (jack_client_t *client);
105 jack_port_t *(*jack_port_register) (jack_client_t *client,
106 ! const char *port_name,
107 ! const char *port_type,
108 ! unsigned long flags,
109 ! unsigned long buffer_size);
110 void *(*jack_port_get_buffer) (jack_port_t *, jack_nframes_t);
111 jack_nframes_t (*jack_get_buffer_size) (jack_client_t *);
112 jack_nframes_t (*jack_get_sample_rate) (jack_client_t *);
113 + const char ** (*jack_get_ports) (jack_client_t *,
114 + const char *port_name_pattern,
115 + const char *type_name_pattern,
116 + unsigned long flags);
117 + int (*jack_connect) (jack_client_t *,
118 + const char *source_port,
119 + const char *destination_port);
120 + const char* (*jack_port_name) (const jack_port_t *);
123 public:
124 AudioDriver_JACK();