diff options
Diffstat (limited to 'src/lib/nojack.cpp')
-rwxr-xr-x | src/lib/nojack.cpp | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/src/lib/nojack.cpp b/src/lib/nojack.cpp new file mode 100755 index 0000000..206557d --- /dev/null +++ b/src/lib/nojack.cpp | |||
@@ -0,0 +1,223 @@ | |||
1 | #include "nojack.h" | ||
2 | #ifndef NULL | ||
3 | #define NULL 0 | ||
4 | #endif | ||
5 | jack_client_t *jack_client_new (const char *client_name) { return NULL; }; | ||
6 | int jack_client_close (jack_client_t *client) { return 0; }; | ||
7 | int jack_client_name_size(void) { return 0; }; | ||
8 | int jack_internal_client_new (const char *client_name, const char *so_name, | ||
9 | const char *so_data) { return 0; }; | ||
10 | void jack_internal_client_close (const char *client_name) { return; } | ||
11 | int jack_is_realtime (jack_client_t *client) { return 0; } | ||
12 | void jack_on_shutdown (jack_client_t *client, void (*function)(void *arg), void *arg) { return; } | ||
13 | int jack_set_process_callback (jack_client_t *client, | ||
14 | JackProcessCallback process_callback, | ||
15 | void *arg) {return 0; } | ||
16 | int jack_set_thread_init_callback (jack_client_t *client, | ||
17 | JackThreadInitCallback thread_init_callback, | ||
18 | void *arg) { return 0;} | ||
19 | int jack_set_freewheel_callback (jack_client_t *client, | ||
20 | JackFreewheelCallback freewheel_callback, | ||
21 | void *arg) { return 0;} | ||
22 | int jack_set_freewheel(jack_client_t* client, int onoff) { return 0;} | ||
23 | |||
24 | int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes) {return 0;} | ||
25 | int jack_set_buffer_size_callback (jack_client_t *client, | ||
26 | JackBufferSizeCallback bufsize_callback, | ||
27 | void *arg) {return 0;}; | ||
28 | int jack_set_sample_rate_callback (jack_client_t *client, | ||
29 | JackSampleRateCallback srate_callback, | ||
30 | void *arg) { return 0;}; | ||
31 | int jack_transport_query(jack_client_t *x,__uint64* y) {return 0;} | ||
32 | int jack_set_port_registration_callback (jack_client_t *, | ||
33 | JackPortRegistrationCallback | ||
34 | registration_callback, void *arg) {return 0;}; | ||
35 | int jack_set_graph_order_callback (jack_client_t *, JackGraphOrderCallback graph_callback, void *) {return 0;}; | ||
36 | |||
37 | int jack_set_xrun_callback (jack_client_t *, JackXRunCallback xrun_callback, void *arg) { return 0;}; | ||
38 | int jack_activate (jack_client_t *client) {return 0;}; | ||
39 | int jack_deactivate (jack_client_t *client) {return 0;}; | ||
40 | jack_port_t *jack_port_register (jack_client_t *client, | ||
41 | const char *port_name, | ||
42 | const char *port_type, | ||
43 | unsigned long flags, | ||
44 | unsigned long buffer_size) { return NULL; } | ||
45 | int jack_port_unregister (jack_client_t *, jack_port_t *) { return 0; } | ||
46 | void *jack_port_get_buffer (jack_port_t *, jack_nframes_t) { return NULL;} | ||
47 | const char *jack_port_name (const jack_port_t *port) { return NULL; } | ||
48 | const char *jack_port_short_name (const jack_port_t *port) { return NULL; } | ||
49 | int jack_port_flags (const jack_port_t *port) { return 0;} | ||
50 | const char *jack_port_type (const jack_port_t *port) { return 0;} | ||
51 | |||
52 | int jack_port_is_mine (const jack_client_t *, const jack_port_t *port) {return 0;}; | ||
53 | |||
54 | int jack_port_connected (const jack_port_t *port); | ||
55 | int jack_port_connected_to (const jack_port_t *port, | ||
56 | const char *port_name); | ||
57 | const char **jack_port_get_connections (const jack_port_t *port); | ||
58 | const char **jack_port_get_all_connections (const jack_client_t *client, | ||
59 | const jack_port_t *port); | ||
60 | int jack_port_tie (jack_port_t *src, jack_port_t *dst); | ||
61 | int jack_port_untie (jack_port_t *port); | ||
62 | int jack_port_lock (jack_client_t *, jack_port_t *); | ||
63 | int jack_port_unlock (jack_client_t *, jack_port_t *); | ||
64 | jack_nframes_t jack_port_get_latency (jack_port_t *port); | ||
65 | jack_nframes_t jack_port_get_total_latency (jack_client_t *, | ||
66 | jack_port_t *port); | ||
67 | void jack_port_set_latency (jack_port_t *, jack_nframes_t); | ||
68 | int jack_port_set_name (jack_port_t *port, const char *port_name); | ||
69 | int jack_port_request_monitor (jack_port_t *port, int onoff); | ||
70 | int jack_port_ensure_monitor (jack_port_t *port, int onoff); | ||
71 | int jack_port_monitoring_input (jack_port_t *port); | ||
72 | int jack_connect (jack_client_t *, | ||
73 | const char *source_port, | ||
74 | const char *destination_port); | ||
75 | int jack_disconnect (jack_client_t *, | ||
76 | const char *source_port, | ||
77 | const char *destination_port); | ||
78 | int jack_port_disconnect (jack_client_t *, jack_port_t *); | ||
79 | int jack_port_name_size(void); | ||
80 | |||
81 | /** | ||
82 | * @return the maximum number of characters in a JACK port type name | ||
83 | * including the final NULL character. This value is a constant. | ||
84 | */ | ||
85 | int jack_port_type_size(void); | ||
86 | |||
87 | /** | ||
88 | * @return the sample rate of the jack system, as set by the user when | ||
89 | * jackd was started. | ||
90 | */ | ||
91 | jack_nframes_t jack_get_sample_rate (jack_client_t *); | ||
92 | |||
93 | /** | ||
94 | * @return the current maximum size that will ever be passed to the @a | ||
95 | * process_callback. It should only be used *before* the client has | ||
96 | * been activated. This size may change, clients that depend on it | ||
97 | * must register a @a bufsize_callback so they will be notified if it | ||
98 | * does. | ||
99 | * | ||
100 | * @see jack_set_buffer_size_callback() | ||
101 | */ | ||
102 | jack_nframes_t jack_get_buffer_size (jack_client_t *); | ||
103 | |||
104 | /** | ||
105 | * @param port_name_pattern A regular expression used to select | ||
106 | * ports by name. If NULL or of zero length, no selection based | ||
107 | * on name will be carried out. | ||
108 | * @param type_name_pattern A regular expression used to select | ||
109 | * ports by type. If NULL or of zero length, no selection based | ||
110 | * on type will be carried out. | ||
111 | * @param flags A value used to select ports by their flags. | ||
112 | * If zero, no selection based on flags will be carried out. | ||
113 | * | ||
114 | * @return a NULL-terminated array of ports that match the specified | ||
115 | * arguments. The caller is responsible for calling free(3) any | ||
116 | * non-NULL returned value. | ||
117 | * | ||
118 | * @see jack_port_name_size(), jack_port_type_size() | ||
119 | */ | ||
120 | const char **jack_get_ports (jack_client_t *, | ||
121 | const char *port_name_pattern, | ||
122 | const char *type_name_pattern, | ||
123 | unsigned long flags); | ||
124 | |||
125 | /** | ||
126 | * @return address of the jack_port_t named @a port_name. | ||
127 | * | ||
128 | * @see jack_port_name_size() | ||
129 | */ | ||
130 | jack_port_t *jack_port_by_name (jack_client_t *, const char *port_name); | ||
131 | |||
132 | /** | ||
133 | * @return address of the jack_port_t of a @a port_id. | ||
134 | */ | ||
135 | jack_port_t *jack_port_by_id (const jack_client_t *client, | ||
136 | jack_port_id_t port_id); | ||
137 | |||
138 | /** | ||
139 | * Old-style interface to become the timebase for the entire JACK | ||
140 | * subsystem. | ||
141 | * | ||
142 | * @deprecated This function still exists for compatibility with the | ||
143 | * earlier transport interface, but it does nothing. Instead, see | ||
144 | * transport.h and use jack_set_timebase_callback(). | ||
145 | * | ||
146 | * @return ENOSYS, function not implemented. | ||
147 | */ | ||
148 | int jack_engine_takeover_timebase (jack_client_t *); | ||
149 | |||
150 | /** | ||
151 | * @return the time in frames that has passed since the JACK server | ||
152 | * began the current process cycle. | ||
153 | */ | ||
154 | jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *); | ||
155 | |||
156 | /** | ||
157 | * @return an estimate of the current time in frames. This is a | ||
158 | * running counter, no significance should be attached to its value, | ||
159 | * but it can be compared to a previously returned value. | ||
160 | */ | ||
161 | jack_nframes_t jack_frame_time (const jack_client_t *); | ||
162 | |||
163 | /** | ||
164 | * @return the frame_time after the last processing of the graph | ||
165 | * this is only to be used from the process callback. | ||
166 | * | ||
167 | * This function can be used to put timestamps generated by | ||
168 | * jack_frame_time() in correlation to the current process cycle. | ||
169 | */ | ||
170 | jack_nframes_t jack_last_frame_time (const jack_client_t *client); | ||
171 | |||
172 | |||
173 | /** | ||
174 | * @return the current CPU load estimated by JACK. This is a running | ||
175 | * average of the time it takes to execute a full process cycle for | ||
176 | * all clients as a percentage of the real time available per cycle | ||
177 | * determined by the buffer size and sample rate. | ||
178 | */ | ||
179 | float jack_cpu_load (jack_client_t *client); | ||
180 | |||
181 | /** | ||
182 | * Set the directory in which the server is expected | ||
183 | * to have put its communication FIFOs. A client | ||
184 | * will need to call this before calling | ||
185 | * jack_client_new() if the server was started | ||
186 | * with arguments telling it to use a non-standard | ||
187 | * directory. | ||
188 | * | ||
189 | * @deprecated This function is deprecated. Don't use in new programs | ||
190 | * and remove it in old programs. | ||
191 | */ | ||
192 | void jack_set_server_dir (const char *path); | ||
193 | |||
194 | /** | ||
195 | * @return the pthread ID of the thread running the JACK client side | ||
196 | * code. | ||
197 | */ | ||
198 | pthread_t jack_client_thread_id (jack_client_t *); | ||
199 | |||
200 | /** | ||
201 | * Display JACK error message. | ||
202 | * | ||
203 | * Set via jack_set_error_function(), otherwise a JACK-provided | ||
204 | * default will print @a msg (plus a newline) to stderr. | ||
205 | * | ||
206 | * @param msg error message text (no newline at end). | ||
207 | */ | ||
208 | extern void (*jack_error_callback)(const char *msg); | ||
209 | |||
210 | /** | ||
211 | * Set the @ref jack_error_callback for error message display. | ||
212 | * | ||
213 | * The JACK library provides two built-in callbacks for this purpose: | ||
214 | * default_jack_error_callback() and silent_jack_error_callback(). | ||
215 | */ | ||
216 | void jack_set_error_function (void (*func)(const char *)); | ||
217 | __uint64 jack_get_current_transport_frame(void* client) { return 0; } | ||
218 | void jack_transport_stop (void * dummy) { return; }; | ||
219 | void jack_transport_start (void * dummy) { return; }; | ||
220 | void jack_transport_locate (void * dummy,int x) { return; }; | ||
221 | //void* jack_port_register (void* dummy,const void* dum2,int q,int y,int z) {return NULL;}; | ||
222 | #define JACK_DEFAULT_AUDIO_TYPE 0 | ||
223 | |||