| 1 |
// This code is generated. |
| 2 |
|
| 3 |
use super::*; |
| 4 |
|
| 5 |
#[cfg(feature = "dlopen")] |
| 6 |
macro_rules! cstr { |
| 7 |
($x:expr) => { |
| 8 |
concat!($x, "\0").as_bytes().as_ptr() as *const c_char |
| 9 |
}; |
| 10 |
} |
| 11 |
|
| 12 |
#[cfg(not(feature = "dlopen"))] |
| 13 |
mod static_fns { |
| 14 |
use super::*; |
| 15 |
use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void}; |
| 16 |
|
| 17 |
#[link(name = "pulse")] |
| 18 |
extern "C" { |
| 19 |
pub fn pa_get_library_version() -> *const c_char; |
| 20 |
pub fn pa_channel_map_can_balance(map: *const pa_channel_map) -> c_int; |
| 21 |
pub fn pa_channel_map_init(m: *mut pa_channel_map) -> *mut pa_channel_map; |
| 22 |
pub fn pa_channel_map_init_auto( |
| 23 |
m: *mut pa_channel_map, |
| 24 |
ch: u32, |
| 25 |
def: pa_channel_map_def_t, |
| 26 |
) -> *mut pa_channel_map; |
| 27 |
pub fn pa_context_connect( |
| 28 |
c: *mut pa_context, |
| 29 |
server: *const c_char, |
| 30 |
flags: pa_context_flags_t, |
| 31 |
api: *const pa_spawn_api, |
| 32 |
) -> c_int; |
| 33 |
pub fn pa_context_disconnect(c: *mut pa_context); |
| 34 |
pub fn pa_context_drain( |
| 35 |
c: *mut pa_context, |
| 36 |
cb: pa_context_notify_cb_t, |
| 37 |
userdata: *mut c_void, |
| 38 |
) -> *mut pa_operation; |
| 39 |
pub fn pa_context_get_server_info( |
| 40 |
c: *const pa_context, |
| 41 |
cb: pa_server_info_cb_t, |
| 42 |
userdata: *mut c_void, |
| 43 |
) -> *mut pa_operation; |
| 44 |
pub fn pa_context_get_sink_info_by_name( |
| 45 |
c: *const pa_context, |
| 46 |
name: *const c_char, |
| 47 |
cb: pa_sink_info_cb_t, |
| 48 |
userdata: *mut c_void, |
| 49 |
) -> *mut pa_operation; |
| 50 |
pub fn pa_context_get_sink_info_list( |
| 51 |
c: *const pa_context, |
| 52 |
cb: pa_sink_info_cb_t, |
| 53 |
userdata: *mut c_void, |
| 54 |
) -> *mut pa_operation; |
| 55 |
pub fn pa_context_get_sink_input_info( |
| 56 |
c: *const pa_context, |
| 57 |
idx: u32, |
| 58 |
cb: pa_sink_input_info_cb_t, |
| 59 |
userdata: *mut c_void, |
| 60 |
) -> *mut pa_operation; |
| 61 |
pub fn pa_context_get_source_info_list( |
| 62 |
c: *const pa_context, |
| 63 |
cb: pa_source_info_cb_t, |
| 64 |
userdata: *mut c_void, |
| 65 |
) -> *mut pa_operation; |
| 66 |
pub fn pa_context_get_state(c: *const pa_context) -> pa_context_state_t; |
| 67 |
pub fn pa_context_new( |
| 68 |
mainloop: *mut pa_mainloop_api, |
| 69 |
name: *const c_char, |
| 70 |
) -> *mut pa_context; |
| 71 |
pub fn pa_context_rttime_new( |
| 72 |
c: *const pa_context, |
| 73 |
usec: pa_usec_t, |
| 74 |
cb: pa_time_event_cb_t, |
| 75 |
userdata: *mut c_void, |
| 76 |
) -> *mut pa_time_event; |
| 77 |
pub fn pa_context_set_sink_input_volume( |
| 78 |
c: *mut pa_context, |
| 79 |
idx: u32, |
| 80 |
volume: *const pa_cvolume, |
| 81 |
cb: pa_context_success_cb_t, |
| 82 |
userdata: *mut c_void, |
| 83 |
) -> *mut pa_operation; |
| 84 |
pub fn pa_context_set_state_callback( |
| 85 |
c: *mut pa_context, |
| 86 |
cb: pa_context_notify_cb_t, |
| 87 |
userdata: *mut c_void, |
| 88 |
); |
| 89 |
pub fn pa_context_errno(c: *mut pa_context) -> c_int; |
| 90 |
pub fn pa_context_set_subscribe_callback( |
| 91 |
c: *mut pa_context, |
| 92 |
cb: pa_context_subscribe_cb_t, |
| 93 |
userdata: *mut c_void, |
| 94 |
); |
| 95 |
pub fn pa_context_subscribe( |
| 96 |
c: *mut pa_context, |
| 97 |
m: pa_subscription_mask_t, |
| 98 |
cb: pa_context_success_cb_t, |
| 99 |
userdata: *mut c_void, |
| 100 |
) -> *mut pa_operation; |
| 101 |
pub fn pa_context_ref(c: *mut pa_context) -> *mut pa_context; |
| 102 |
pub fn pa_context_unref(c: *mut pa_context); |
| 103 |
pub fn pa_cvolume_set( |
| 104 |
a: *mut pa_cvolume, |
| 105 |
channels: c_uint, |
| 106 |
v: pa_volume_t, |
| 107 |
) -> *mut pa_cvolume; |
| 108 |
pub fn pa_cvolume_set_balance( |
| 109 |
v: *mut pa_cvolume, |
| 110 |
map: *const pa_channel_map, |
| 111 |
new_balance: c_float, |
| 112 |
) -> *mut pa_cvolume; |
| 113 |
pub fn pa_frame_size(spec: *const pa_sample_spec) -> usize; |
| 114 |
pub fn pa_sample_size(spec: *const pa_sample_spec) -> usize; |
| 115 |
pub fn pa_mainloop_api_once( |
| 116 |
m: *mut pa_mainloop_api, |
| 117 |
callback: pa_mainloop_api_once_cb_t, |
| 118 |
userdata: *mut c_void, |
| 119 |
); |
| 120 |
pub fn pa_strerror(error: pa_error_code_t) -> *const c_char; |
| 121 |
pub fn pa_operation_ref(o: *mut pa_operation) -> *mut pa_operation; |
| 122 |
pub fn pa_operation_unref(o: *mut pa_operation); |
| 123 |
pub fn pa_operation_cancel(o: *mut pa_operation); |
| 124 |
pub fn pa_operation_get_state(o: *const pa_operation) -> pa_operation_state_t; |
| 125 |
pub fn pa_operation_set_state_callback( |
| 126 |
o: *mut pa_operation, |
| 127 |
cb: pa_operation_notify_cb_t, |
| 128 |
userdata: *mut c_void, |
| 129 |
); |
| 130 |
pub fn pa_proplist_gets(p: *mut pa_proplist, key: *const c_char) -> *const c_char; |
| 131 |
pub fn pa_rtclock_now() -> pa_usec_t; |
| 132 |
pub fn pa_stream_begin_write( |
| 133 |
p: *mut pa_stream, |
| 134 |
data: *mut *mut c_void, |
| 135 |
nbytes: *mut usize, |
| 136 |
) -> c_int; |
| 137 |
pub fn pa_stream_cancel_write(p: *mut pa_stream) -> c_int; |
| 138 |
pub fn pa_stream_is_suspended(s: *const pa_stream) -> c_int; |
| 139 |
pub fn pa_stream_is_corked(s: *const pa_stream) -> c_int; |
| 140 |
pub fn pa_stream_connect_playback( |
| 141 |
s: *mut pa_stream, |
| 142 |
dev: *const c_char, |
| 143 |
attr: *const pa_buffer_attr, |
| 144 |
flags: pa_stream_flags_t, |
| 145 |
volume: *const pa_cvolume, |
| 146 |
sync_stream: *const pa_stream, |
| 147 |
) -> c_int; |
| 148 |
pub fn pa_stream_connect_record( |
| 149 |
s: *mut pa_stream, |
| 150 |
dev: *const c_char, |
| 151 |
attr: *const pa_buffer_attr, |
| 152 |
flags: pa_stream_flags_t, |
| 153 |
) -> c_int; |
| 154 |
pub fn pa_stream_cork( |
| 155 |
s: *mut pa_stream, |
| 156 |
b: c_int, |
| 157 |
cb: pa_stream_success_cb_t, |
| 158 |
userdata: *mut c_void, |
| 159 |
) -> *mut pa_operation; |
| 160 |
pub fn pa_stream_disconnect(s: *mut pa_stream) -> c_int; |
| 161 |
pub fn pa_stream_drop(p: *mut pa_stream) -> c_int; |
| 162 |
pub fn pa_stream_get_buffer_attr(s: *const pa_stream) -> *const pa_buffer_attr; |
| 163 |
pub fn pa_stream_get_channel_map(s: *const pa_stream) -> *const pa_channel_map; |
| 164 |
pub fn pa_stream_get_device_name(s: *const pa_stream) -> *const c_char; |
| 165 |
pub fn pa_stream_get_index(s: *const pa_stream) -> u32; |
| 166 |
pub fn pa_stream_get_latency( |
| 167 |
s: *const pa_stream, |
| 168 |
r_usec: *mut pa_usec_t, |
| 169 |
negative: *mut c_int, |
| 170 |
) -> c_int; |
| 171 |
pub fn pa_stream_get_sample_spec(s: *const pa_stream) -> *const pa_sample_spec; |
| 172 |
pub fn pa_stream_get_state(p: *const pa_stream) -> pa_stream_state_t; |
| 173 |
pub fn pa_stream_get_context(s: *const pa_stream) -> *mut pa_context; |
| 174 |
pub fn pa_stream_get_time(s: *const pa_stream, r_usec: *mut pa_usec_t) -> c_int; |
| 175 |
pub fn pa_stream_new( |
| 176 |
c: *mut pa_context, |
| 177 |
name: *const c_char, |
| 178 |
ss: *const pa_sample_spec, |
| 179 |
map: *const pa_channel_map, |
| 180 |
) -> *mut pa_stream; |
| 181 |
pub fn pa_stream_peek( |
| 182 |
p: *mut pa_stream, |
| 183 |
data: *mut *const c_void, |
| 184 |
nbytes: *mut usize, |
| 185 |
) -> c_int; |
| 186 |
pub fn pa_stream_readable_size(p: *const pa_stream) -> usize; |
| 187 |
pub fn pa_stream_set_state_callback( |
| 188 |
s: *mut pa_stream, |
| 189 |
cb: pa_stream_notify_cb_t, |
| 190 |
userdata: *mut c_void, |
| 191 |
); |
| 192 |
pub fn pa_stream_set_write_callback( |
| 193 |
p: *mut pa_stream, |
| 194 |
cb: pa_stream_request_cb_t, |
| 195 |
userdata: *mut c_void, |
| 196 |
); |
| 197 |
pub fn pa_stream_set_read_callback( |
| 198 |
p: *mut pa_stream, |
| 199 |
cb: pa_stream_request_cb_t, |
| 200 |
userdata: *mut c_void, |
| 201 |
); |
| 202 |
pub fn pa_stream_ref(s: *mut pa_stream) -> *mut pa_stream; |
| 203 |
pub fn pa_stream_unref(s: *mut pa_stream); |
| 204 |
pub fn pa_stream_update_timing_info( |
| 205 |
p: *mut pa_stream, |
| 206 |
cb: pa_stream_success_cb_t, |
| 207 |
userdata: *mut c_void, |
| 208 |
) -> *mut pa_operation; |
| 209 |
pub fn pa_stream_writable_size(p: *const pa_stream) -> usize; |
| 210 |
pub fn pa_stream_write( |
| 211 |
p: *mut pa_stream, |
| 212 |
data: *const c_void, |
| 213 |
nbytes: usize, |
| 214 |
free_cb: pa_free_cb_t, |
| 215 |
offset: i64, |
| 216 |
seek: pa_seek_mode_t, |
| 217 |
) -> c_int; |
| 218 |
pub fn pa_stream_set_name( |
| 219 |
s: *mut pa_stream, |
| 220 |
name: *const c_char, |
| 221 |
cb: pa_stream_success_cb_t, |
| 222 |
userdata: *mut c_void, |
| 223 |
) -> *mut pa_operation; |
| 224 |
pub fn pa_sw_volume_from_linear(v: c_double) -> pa_volume_t; |
| 225 |
pub fn pa_threaded_mainloop_free(m: *mut pa_threaded_mainloop); |
| 226 |
pub fn pa_threaded_mainloop_get_api(m: *mut pa_threaded_mainloop) -> *mut pa_mainloop_api; |
| 227 |
pub fn pa_threaded_mainloop_in_thread(m: *mut pa_threaded_mainloop) -> c_int; |
| 228 |
pub fn pa_threaded_mainloop_lock(m: *mut pa_threaded_mainloop); |
| 229 |
pub fn pa_threaded_mainloop_new() -> *mut pa_threaded_mainloop; |
| 230 |
pub fn pa_threaded_mainloop_signal(m: *mut pa_threaded_mainloop, wait_for_accept: c_int); |
| 231 |
pub fn pa_threaded_mainloop_start(m: *mut pa_threaded_mainloop) -> c_int; |
| 232 |
pub fn pa_threaded_mainloop_stop(m: *mut pa_threaded_mainloop); |
| 233 |
pub fn pa_threaded_mainloop_unlock(m: *mut pa_threaded_mainloop); |
| 234 |
pub fn pa_threaded_mainloop_wait(m: *mut pa_threaded_mainloop); |
| 235 |
pub fn pa_usec_to_bytes(t: pa_usec_t, spec: *const pa_sample_spec) -> usize; |
| 236 |
pub fn pa_xrealloc(ptr: *mut c_void, size: usize) -> *mut c_void; |
| 237 |
} |
| 238 |
} |
| 239 |
|
| 240 |
#[cfg(not(feature = "dlopen"))] |
| 241 |
pub use self::static_fns::*; |
| 242 |
|
| 243 |
#[cfg(feature = "dlopen")] |
| 244 |
mod dynamic_fns { |
| 245 |
use super::*; |
| 246 |
use libc::{dlclose, dlopen, dlsym, RTLD_LAZY}; |
| 247 |
use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void}; |
| 248 |
|
| 249 |
#[derive(Debug)] |
| 250 |
pub struct LibLoader { |
| 251 |
_lib: *mut ::libc::c_void, |
| 252 |
} |
| 253 |
|
| 254 |
impl LibLoader { |
| 255 |
pub unsafe fn open() -> Option<LibLoader> { |
| 256 |
let h = dlopen(cstr!("libpulse.so.0"), RTLD_LAZY); |
| 257 |
if h.is_null() { |
| 258 |
return None; |
| 259 |
} |
| 260 |
|
| 261 |
PA_GET_LIBRARY_VERSION = { |
| 262 |
let fp = dlsym(h, cstr!("pa_get_library_version")); |
| 263 |
if fp.is_null() { |
| 264 |
return None; |
| 265 |
} |
| 266 |
fp |
| 267 |
}; |
| 268 |
PA_CHANNEL_MAP_CAN_BALANCE = { |
| 269 |
let fp = dlsym(h, cstr!("pa_channel_map_can_balance")); |
| 270 |
if fp.is_null() { |
| 271 |
return None; |
| 272 |
} |
| 273 |
fp |
| 274 |
}; |
| 275 |
PA_CHANNEL_MAP_INIT = { |
| 276 |
let fp = dlsym(h, cstr!("pa_channel_map_init")); |
| 277 |
if fp.is_null() { |
| 278 |
return None; |
| 279 |
} |
| 280 |
fp |
| 281 |
}; |
| 282 |
PA_CHANNEL_MAP_INIT_AUTO = { |
| 283 |
let fp = dlsym(h, cstr!("pa_channel_map_init_auto")); |
| 284 |
if fp.is_null() { |
| 285 |
return None; |
| 286 |
} |
| 287 |
fp |
| 288 |
}; |
| 289 |
PA_CONTEXT_CONNECT = { |
| 290 |
let fp = dlsym(h, cstr!("pa_context_connect")); |
| 291 |
if fp.is_null() { |
| 292 |
return None; |
| 293 |
} |
| 294 |
fp |
| 295 |
}; |
| 296 |
PA_CONTEXT_DISCONNECT = { |
| 297 |
let fp = dlsym(h, cstr!("pa_context_disconnect")); |
| 298 |
if fp.is_null() { |
| 299 |
return None; |
| 300 |
} |
| 301 |
fp |
| 302 |
}; |
| 303 |
PA_CONTEXT_DRAIN = { |
| 304 |
let fp = dlsym(h, cstr!("pa_context_drain")); |
| 305 |
if fp.is_null() { |
| 306 |
return None; |
| 307 |
} |
| 308 |
fp |
| 309 |
}; |
| 310 |
PA_CONTEXT_GET_SERVER_INFO = { |
| 311 |
let fp = dlsym(h, cstr!("pa_context_get_server_info")); |
| 312 |
if fp.is_null() { |
| 313 |
return None; |
| 314 |
} |
| 315 |
fp |
| 316 |
}; |
| 317 |
PA_CONTEXT_GET_SINK_INFO_BY_NAME = { |
| 318 |
let fp = dlsym(h, cstr!("pa_context_get_sink_info_by_name")); |
| 319 |
if fp.is_null() { |
| 320 |
return None; |
| 321 |
} |
| 322 |
fp |
| 323 |
}; |
| 324 |
PA_CONTEXT_GET_SINK_INFO_LIST = { |
| 325 |
let fp = dlsym(h, cstr!("pa_context_get_sink_info_list")); |
| 326 |
if fp.is_null() { |
| 327 |
return None; |
| 328 |
} |
| 329 |
fp |
| 330 |
}; |
| 331 |
PA_CONTEXT_GET_SINK_INPUT_INFO = { |
| 332 |
let fp = dlsym(h, cstr!("pa_context_get_sink_input_info")); |
| 333 |
if fp.is_null() { |
| 334 |
return None; |
| 335 |
} |
| 336 |
fp |
| 337 |
}; |
| 338 |
PA_CONTEXT_GET_SOURCE_INFO_LIST = { |
| 339 |
let fp = dlsym(h, cstr!("pa_context_get_source_info_list")); |
| 340 |
if fp.is_null() { |
| 341 |
return None; |
| 342 |
} |
| 343 |
fp |
| 344 |
}; |
| 345 |
PA_CONTEXT_GET_STATE = { |
| 346 |
let fp = dlsym(h, cstr!("pa_context_get_state")); |
| 347 |
if fp.is_null() { |
| 348 |
return None; |
| 349 |
} |
| 350 |
fp |
| 351 |
}; |
| 352 |
PA_CONTEXT_NEW = { |
| 353 |
let fp = dlsym(h, cstr!("pa_context_new")); |
| 354 |
if fp.is_null() { |
| 355 |
return None; |
| 356 |
} |
| 357 |
fp |
| 358 |
}; |
| 359 |
PA_CONTEXT_RTTIME_NEW = { |
| 360 |
let fp = dlsym(h, cstr!("pa_context_rttime_new")); |
| 361 |
if fp.is_null() { |
| 362 |
return None; |
| 363 |
} |
| 364 |
fp |
| 365 |
}; |
| 366 |
PA_CONTEXT_SET_SINK_INPUT_VOLUME = { |
| 367 |
let fp = dlsym(h, cstr!("pa_context_set_sink_input_volume")); |
| 368 |
if fp.is_null() { |
| 369 |
return None; |
| 370 |
} |
| 371 |
fp |
| 372 |
}; |
| 373 |
PA_CONTEXT_SET_STATE_CALLBACK = { |
| 374 |
let fp = dlsym(h, cstr!("pa_context_set_state_callback")); |
| 375 |
if fp.is_null() { |
| 376 |
return None; |
| 377 |
} |
| 378 |
fp |
| 379 |
}; |
| 380 |
PA_CONTEXT_ERRNO = { |
| 381 |
let fp = dlsym(h, cstr!("pa_context_errno")); |
| 382 |
if fp.is_null() { |
| 383 |
return None; |
| 384 |
} |
| 385 |
fp |
| 386 |
}; |
| 387 |
PA_CONTEXT_SET_SUBSCRIBE_CALLBACK = { |
| 388 |
let fp = dlsym(h, cstr!("pa_context_set_subscribe_callback")); |
| 389 |
if fp.is_null() { |
| 390 |
return None; |
| 391 |
} |
| 392 |
fp |
| 393 |
}; |
| 394 |
PA_CONTEXT_SUBSCRIBE = { |
| 395 |
let fp = dlsym(h, cstr!("pa_context_subscribe")); |
| 396 |
if fp.is_null() { |
| 397 |
return None; |
| 398 |
} |
| 399 |
fp |
| 400 |
}; |
| 401 |
PA_CONTEXT_REF = { |
| 402 |
let fp = dlsym(h, cstr!("pa_context_ref")); |
| 403 |
if fp.is_null() { |
| 404 |
return None; |
| 405 |
} |
| 406 |
fp |
| 407 |
}; |
| 408 |
PA_CONTEXT_UNREF = { |
| 409 |
let fp = dlsym(h, cstr!("pa_context_unref")); |
| 410 |
if fp.is_null() { |
| 411 |
return None; |
| 412 |
} |
| 413 |
fp |
| 414 |
}; |
| 415 |
PA_CVOLUME_SET = { |
| 416 |
let fp = dlsym(h, cstr!("pa_cvolume_set")); |
| 417 |
if fp.is_null() { |
| 418 |
return None; |
| 419 |
} |
| 420 |
fp |
| 421 |
}; |
| 422 |
PA_CVOLUME_SET_BALANCE = { |
| 423 |
let fp = dlsym(h, cstr!("pa_cvolume_set_balance")); |
| 424 |
if fp.is_null() { |
| 425 |
return None; |
| 426 |
} |
| 427 |
fp |
| 428 |
}; |
| 429 |
PA_FRAME_SIZE = { |
| 430 |
let fp = dlsym(h, cstr!("pa_frame_size")); |
| 431 |
if fp.is_null() { |
| 432 |
return None; |
| 433 |
} |
| 434 |
fp |
| 435 |
}; |
| 436 |
PA_SAMPLE_SIZE = { |
| 437 |
let fp = dlsym(h, cstr!("pa_sample_size")); |
| 438 |
if fp.is_null() { |
| 439 |
return None; |
| 440 |
} |
| 441 |
fp |
| 442 |
}; |
| 443 |
PA_MAINLOOP_API_ONCE = { |
| 444 |
let fp = dlsym(h, cstr!("pa_mainloop_api_once")); |
| 445 |
if fp.is_null() { |
| 446 |
return None; |
| 447 |
} |
| 448 |
fp |
| 449 |
}; |
| 450 |
PA_STRERROR = { |
| 451 |
let fp = dlsym(h, cstr!("pa_strerror")); |
| 452 |
if fp.is_null() { |
| 453 |
return None; |
| 454 |
} |
| 455 |
fp |
| 456 |
}; |
| 457 |
PA_OPERATION_REF = { |
| 458 |
let fp = dlsym(h, cstr!("pa_operation_ref")); |
| 459 |
if fp.is_null() { |
| 460 |
return None; |
| 461 |
} |
| 462 |
fp |
| 463 |
}; |
| 464 |
PA_OPERATION_UNREF = { |
| 465 |
let fp = dlsym(h, cstr!("pa_operation_unref")); |
| 466 |
if fp.is_null() { |
| 467 |
return None; |
| 468 |
} |
| 469 |
fp |
| 470 |
}; |
| 471 |
PA_OPERATION_CANCEL = { |
| 472 |
let fp = dlsym(h, cstr!("pa_operation_cancel")); |
| 473 |
if fp.is_null() { |
| 474 |
return None; |
| 475 |
} |
| 476 |
fp |
| 477 |
}; |
| 478 |
PA_OPERATION_GET_STATE = { |
| 479 |
let fp = dlsym(h, cstr!("pa_operation_get_state")); |
| 480 |
if fp.is_null() { |
| 481 |
return None; |
| 482 |
} |
| 483 |
fp |
| 484 |
}; |
| 485 |
PA_OPERATION_SET_STATE_CALLBACK = { |
| 486 |
let fp = dlsym(h, cstr!("pa_operation_set_state_callback")); |
| 487 |
if fp.is_null() { |
| 488 |
return None; |
| 489 |
} |
| 490 |
fp |
| 491 |
}; |
| 492 |
PA_PROPLIST_GETS = { |
| 493 |
let fp = dlsym(h, cstr!("pa_proplist_gets")); |
| 494 |
if fp.is_null() { |
| 495 |
return None; |
| 496 |
} |
| 497 |
fp |
| 498 |
}; |
| 499 |
PA_RTCLOCK_NOW = { |
| 500 |
let fp = dlsym(h, cstr!("pa_rtclock_now")); |
| 501 |
if fp.is_null() { |
| 502 |
return None; |
| 503 |
} |
| 504 |
fp |
| 505 |
}; |
| 506 |
PA_STREAM_BEGIN_WRITE = { |
| 507 |
let fp = dlsym(h, cstr!("pa_stream_begin_write")); |
| 508 |
if fp.is_null() { |
| 509 |
return None; |
| 510 |
} |
| 511 |
fp |
| 512 |
}; |
| 513 |
PA_STREAM_CANCEL_WRITE = { |
| 514 |
let fp = dlsym(h, cstr!("pa_stream_cancel_write")); |
| 515 |
if fp.is_null() { |
| 516 |
return None; |
| 517 |
} |
| 518 |
fp |
| 519 |
}; |
| 520 |
PA_STREAM_IS_SUSPENDED = { |
| 521 |
let fp = dlsym(h, cstr!("pa_stream_is_suspended")); |
| 522 |
if fp.is_null() { |
| 523 |
return None; |
| 524 |
} |
| 525 |
fp |
| 526 |
}; |
| 527 |
PA_STREAM_IS_CORKED = { |
| 528 |
let fp = dlsym(h, cstr!("pa_stream_is_corked")); |
| 529 |
if fp.is_null() { |
| 530 |
return None; |
| 531 |
} |
| 532 |
fp |
| 533 |
}; |
| 534 |
PA_STREAM_CONNECT_PLAYBACK = { |
| 535 |
let fp = dlsym(h, cstr!("pa_stream_connect_playback")); |
| 536 |
if fp.is_null() { |
| 537 |
return None; |
| 538 |
} |
| 539 |
fp |
| 540 |
}; |
| 541 |
PA_STREAM_CONNECT_RECORD = { |
| 542 |
let fp = dlsym(h, cstr!("pa_stream_connect_record")); |
| 543 |
if fp.is_null() { |
| 544 |
return None; |
| 545 |
} |
| 546 |
fp |
| 547 |
}; |
| 548 |
PA_STREAM_CORK = { |
| 549 |
let fp = dlsym(h, cstr!("pa_stream_cork")); |
| 550 |
if fp.is_null() { |
| 551 |
return None; |
| 552 |
} |
| 553 |
fp |
| 554 |
}; |
| 555 |
PA_STREAM_DISCONNECT = { |
| 556 |
let fp = dlsym(h, cstr!("pa_stream_disconnect")); |
| 557 |
if fp.is_null() { |
| 558 |
return None; |
| 559 |
} |
| 560 |
fp |
| 561 |
}; |
| 562 |
PA_STREAM_DROP = { |
| 563 |
let fp = dlsym(h, cstr!("pa_stream_drop")); |
| 564 |
if fp.is_null() { |
| 565 |
return None; |
| 566 |
} |
| 567 |
fp |
| 568 |
}; |
| 569 |
PA_STREAM_GET_BUFFER_ATTR = { |
| 570 |
let fp = dlsym(h, cstr!("pa_stream_get_buffer_attr")); |
| 571 |
if fp.is_null() { |
| 572 |
return None; |
| 573 |
} |
| 574 |
fp |
| 575 |
}; |
| 576 |
PA_STREAM_GET_CHANNEL_MAP = { |
| 577 |
let fp = dlsym(h, cstr!("pa_stream_get_channel_map")); |
| 578 |
if fp.is_null() { |
| 579 |
return None; |
| 580 |
} |
| 581 |
fp |
| 582 |
}; |
| 583 |
PA_STREAM_GET_DEVICE_NAME = { |
| 584 |
let fp = dlsym(h, cstr!("pa_stream_get_device_name")); |
| 585 |
if fp.is_null() { |
| 586 |
return None; |
| 587 |
} |
| 588 |
fp |
| 589 |
}; |
| 590 |
PA_STREAM_GET_INDEX = { |
| 591 |
let fp = dlsym(h, cstr!("pa_stream_get_index")); |
| 592 |
if fp.is_null() { |
| 593 |
return None; |
| 594 |
} |
| 595 |
fp |
| 596 |
}; |
| 597 |
PA_STREAM_GET_LATENCY = { |
| 598 |
let fp = dlsym(h, cstr!("pa_stream_get_latency")); |
| 599 |
if fp.is_null() { |
| 600 |
return None; |
| 601 |
} |
| 602 |
fp |
| 603 |
}; |
| 604 |
PA_STREAM_GET_SAMPLE_SPEC = { |
| 605 |
let fp = dlsym(h, cstr!("pa_stream_get_sample_spec")); |
| 606 |
if fp.is_null() { |
| 607 |
return None; |
| 608 |
} |
| 609 |
fp |
| 610 |
}; |
| 611 |
PA_STREAM_GET_STATE = { |
| 612 |
let fp = dlsym(h, cstr!("pa_stream_get_state")); |
| 613 |
if fp.is_null() { |
| 614 |
return None; |
| 615 |
} |
| 616 |
fp |
| 617 |
}; |
| 618 |
PA_STREAM_GET_CONTEXT = { |
| 619 |
let fp = dlsym(h, cstr!("pa_stream_get_context")); |
| 620 |
if fp.is_null() { |
| 621 |
return None; |
| 622 |
} |
| 623 |
fp |
| 624 |
}; |
| 625 |
PA_STREAM_GET_TIME = { |
| 626 |
let fp = dlsym(h, cstr!("pa_stream_get_time")); |
| 627 |
if fp.is_null() { |
| 628 |
return None; |
| 629 |
} |
| 630 |
fp |
| 631 |
}; |
| 632 |
PA_STREAM_NEW = { |
| 633 |
let fp = dlsym(h, cstr!("pa_stream_new")); |
| 634 |
if fp.is_null() { |
| 635 |
return None; |
| 636 |
} |
| 637 |
fp |
| 638 |
}; |
| 639 |
PA_STREAM_PEEK = { |
| 640 |
let fp = dlsym(h, cstr!("pa_stream_peek")); |
| 641 |
if fp.is_null() { |
| 642 |
return None; |
| 643 |
} |
| 644 |
fp |
| 645 |
}; |
| 646 |
PA_STREAM_READABLE_SIZE = { |
| 647 |
let fp = dlsym(h, cstr!("pa_stream_readable_size")); |
| 648 |
if fp.is_null() { |
| 649 |
return None; |
| 650 |
} |
| 651 |
fp |
| 652 |
}; |
| 653 |
PA_STREAM_SET_STATE_CALLBACK = { |
| 654 |
let fp = dlsym(h, cstr!("pa_stream_set_state_callback")); |
| 655 |
if fp.is_null() { |
| 656 |
return None; |
| 657 |
} |
| 658 |
fp |
| 659 |
}; |
| 660 |
PA_STREAM_SET_WRITE_CALLBACK = { |
| 661 |
let fp = dlsym(h, cstr!("pa_stream_set_write_callback")); |
| 662 |
if fp.is_null() { |
| 663 |
return None; |
| 664 |
} |
| 665 |
fp |
| 666 |
}; |
| 667 |
PA_STREAM_SET_READ_CALLBACK = { |
| 668 |
let fp = dlsym(h, cstr!("pa_stream_set_read_callback")); |
| 669 |
if fp.is_null() { |
| 670 |
return None; |
| 671 |
} |
| 672 |
fp |
| 673 |
}; |
| 674 |
PA_STREAM_REF = { |
| 675 |
let fp = dlsym(h, cstr!("pa_stream_ref")); |
| 676 |
if fp.is_null() { |
| 677 |
return None; |
| 678 |
} |
| 679 |
fp |
| 680 |
}; |
| 681 |
PA_STREAM_UNREF = { |
| 682 |
let fp = dlsym(h, cstr!("pa_stream_unref")); |
| 683 |
if fp.is_null() { |
| 684 |
return None; |
| 685 |
} |
| 686 |
fp |
| 687 |
}; |
| 688 |
PA_STREAM_UPDATE_TIMING_INFO = { |
| 689 |
let fp = dlsym(h, cstr!("pa_stream_update_timing_info")); |
| 690 |
if fp.is_null() { |
| 691 |
return None; |
| 692 |
} |
| 693 |
fp |
| 694 |
}; |
| 695 |
PA_STREAM_WRITABLE_SIZE = { |
| 696 |
let fp = dlsym(h, cstr!("pa_stream_writable_size")); |
| 697 |
if fp.is_null() { |
| 698 |
return None; |
| 699 |
} |
| 700 |
fp |
| 701 |
}; |
| 702 |
PA_STREAM_WRITE = { |
| 703 |
let fp = dlsym(h, cstr!("pa_stream_write")); |
| 704 |
if fp.is_null() { |
| 705 |
return None; |
| 706 |
} |
| 707 |
fp |
| 708 |
}; |
| 709 |
PA_STREAM_SET_NAME = { |
| 710 |
let fp = dlsym(h, cstr!("pa_stream_set_name")); |
| 711 |
if fp.is_null() { |
| 712 |
return None; |
| 713 |
} |
| 714 |
fp |
| 715 |
}; |
| 716 |
PA_SW_VOLUME_FROM_LINEAR = { |
| 717 |
let fp = dlsym(h, cstr!("pa_sw_volume_from_linear")); |
| 718 |
if fp.is_null() { |
| 719 |
return None; |
| 720 |
} |
| 721 |
fp |
| 722 |
}; |
| 723 |
PA_THREADED_MAINLOOP_FREE = { |
| 724 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_free")); |
| 725 |
if fp.is_null() { |
| 726 |
return None; |
| 727 |
} |
| 728 |
fp |
| 729 |
}; |
| 730 |
PA_THREADED_MAINLOOP_GET_API = { |
| 731 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_get_api")); |
| 732 |
if fp.is_null() { |
| 733 |
return None; |
| 734 |
} |
| 735 |
fp |
| 736 |
}; |
| 737 |
PA_THREADED_MAINLOOP_IN_THREAD = { |
| 738 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_in_thread")); |
| 739 |
if fp.is_null() { |
| 740 |
return None; |
| 741 |
} |
| 742 |
fp |
| 743 |
}; |
| 744 |
PA_THREADED_MAINLOOP_LOCK = { |
| 745 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_lock")); |
| 746 |
if fp.is_null() { |
| 747 |
return None; |
| 748 |
} |
| 749 |
fp |
| 750 |
}; |
| 751 |
PA_THREADED_MAINLOOP_NEW = { |
| 752 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_new")); |
| 753 |
if fp.is_null() { |
| 754 |
return None; |
| 755 |
} |
| 756 |
fp |
| 757 |
}; |
| 758 |
PA_THREADED_MAINLOOP_SIGNAL = { |
| 759 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_signal")); |
| 760 |
if fp.is_null() { |
| 761 |
return None; |
| 762 |
} |
| 763 |
fp |
| 764 |
}; |
| 765 |
PA_THREADED_MAINLOOP_START = { |
| 766 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_start")); |
| 767 |
if fp.is_null() { |
| 768 |
return None; |
| 769 |
} |
| 770 |
fp |
| 771 |
}; |
| 772 |
PA_THREADED_MAINLOOP_STOP = { |
| 773 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_stop")); |
| 774 |
if fp.is_null() { |
| 775 |
return None; |
| 776 |
} |
| 777 |
fp |
| 778 |
}; |
| 779 |
PA_THREADED_MAINLOOP_UNLOCK = { |
| 780 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_unlock")); |
| 781 |
if fp.is_null() { |
| 782 |
return None; |
| 783 |
} |
| 784 |
fp |
| 785 |
}; |
| 786 |
PA_THREADED_MAINLOOP_WAIT = { |
| 787 |
let fp = dlsym(h, cstr!("pa_threaded_mainloop_wait")); |
| 788 |
if fp.is_null() { |
| 789 |
return None; |
| 790 |
} |
| 791 |
fp |
| 792 |
}; |
| 793 |
PA_USEC_TO_BYTES = { |
| 794 |
let fp = dlsym(h, cstr!("pa_usec_to_bytes")); |
| 795 |
if fp.is_null() { |
| 796 |
return None; |
| 797 |
} |
| 798 |
fp |
| 799 |
}; |
| 800 |
PA_XREALLOC = { |
| 801 |
let fp = dlsym(h, cstr!("pa_xrealloc")); |
| 802 |
if fp.is_null() { |
| 803 |
return None; |
| 804 |
} |
| 805 |
fp |
| 806 |
}; |
| 807 |
|
| 808 |
Some(LibLoader { _lib: h }) |
| 809 |
} |
| 810 |
} |
| 811 |
|
| 812 |
impl ::std::ops::Drop for LibLoader { |
| 813 |
#[inline] |
| 814 |
fn drop(&mut self) { |
| 815 |
unsafe { |
| 816 |
dlclose(self._lib); |
| 817 |
} |
| 818 |
} |
| 819 |
} |
| 820 |
|
| 821 |
static mut PA_GET_LIBRARY_VERSION: *mut ::libc::c_void = 0 as *mut _; |
| 822 |
#[inline] |
| 823 |
pub unsafe fn pa_get_library_version() -> *const c_char { |
| 824 |
(::std::mem::transmute::<_, extern "C" fn() -> *const c_char>(PA_GET_LIBRARY_VERSION))() |
| 825 |
} |
| 826 |
|
| 827 |
static mut PA_CHANNEL_MAP_CAN_BALANCE: *mut ::libc::c_void = 0 as *mut _; |
| 828 |
#[inline] |
| 829 |
pub unsafe fn pa_channel_map_can_balance(map: *const pa_channel_map) -> c_int { |
| 830 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_channel_map) -> c_int>( |
| 831 |
PA_CHANNEL_MAP_CAN_BALANCE, |
| 832 |
))(map) |
| 833 |
} |
| 834 |
|
| 835 |
static mut PA_CHANNEL_MAP_INIT: *mut ::libc::c_void = 0 as *mut _; |
| 836 |
#[inline] |
| 837 |
pub unsafe fn pa_channel_map_init(m: *mut pa_channel_map) -> *mut pa_channel_map { |
| 838 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_channel_map) -> *mut pa_channel_map>( |
| 839 |
PA_CHANNEL_MAP_INIT, |
| 840 |
))(m) |
| 841 |
} |
| 842 |
|
| 843 |
static mut PA_CHANNEL_MAP_INIT_AUTO: *mut ::libc::c_void = 0 as *mut _; |
| 844 |
#[inline] |
| 845 |
pub unsafe fn pa_channel_map_init_auto( |
| 846 |
m: *mut pa_channel_map, |
| 847 |
ch: u32, |
| 848 |
def: pa_channel_map_def_t, |
| 849 |
) -> *mut pa_channel_map { |
| 850 |
(::std::mem::transmute::< |
| 851 |
_, |
| 852 |
extern "C" fn(*mut pa_channel_map, u32, pa_channel_map_def_t) -> *mut pa_channel_map, |
| 853 |
>(PA_CHANNEL_MAP_INIT_AUTO))(m, ch, def) |
| 854 |
} |
| 855 |
|
| 856 |
static mut PA_CONTEXT_CONNECT: *mut ::libc::c_void = 0 as *mut _; |
| 857 |
#[inline] |
| 858 |
pub unsafe fn pa_context_connect( |
| 859 |
c: *mut pa_context, |
| 860 |
server: *const c_char, |
| 861 |
flags: pa_context_flags_t, |
| 862 |
api: *const pa_spawn_api, |
| 863 |
) -> c_int { |
| 864 |
(::std::mem::transmute::< |
| 865 |
_, |
| 866 |
extern "C" fn( |
| 867 |
*mut pa_context, |
| 868 |
*const c_char, |
| 869 |
pa_context_flags_t, |
| 870 |
*const pa_spawn_api, |
| 871 |
) -> c_int, |
| 872 |
>(PA_CONTEXT_CONNECT))(c, server, flags, api) |
| 873 |
} |
| 874 |
|
| 875 |
static mut PA_CONTEXT_DISCONNECT: *mut ::libc::c_void = 0 as *mut _; |
| 876 |
#[inline] |
| 877 |
pub unsafe fn pa_context_disconnect(c: *mut pa_context) { |
| 878 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_context)>(PA_CONTEXT_DISCONNECT))(c) |
| 879 |
} |
| 880 |
|
| 881 |
static mut PA_CONTEXT_DRAIN: *mut ::libc::c_void = 0 as *mut _; |
| 882 |
#[inline] |
| 883 |
pub unsafe fn pa_context_drain( |
| 884 |
c: *mut pa_context, |
| 885 |
cb: pa_context_notify_cb_t, |
| 886 |
userdata: *mut c_void, |
| 887 |
) -> *mut pa_operation { |
| 888 |
(::std::mem::transmute::< |
| 889 |
_, |
| 890 |
extern "C" fn( |
| 891 |
*mut pa_context, |
| 892 |
pa_context_notify_cb_t, |
| 893 |
*mut c_void, |
| 894 |
) -> *mut pa_operation, |
| 895 |
>(PA_CONTEXT_DRAIN))(c, cb, userdata) |
| 896 |
} |
| 897 |
|
| 898 |
static mut PA_CONTEXT_GET_SERVER_INFO: *mut ::libc::c_void = 0 as *mut _; |
| 899 |
#[inline] |
| 900 |
pub unsafe fn pa_context_get_server_info( |
| 901 |
c: *const pa_context, |
| 902 |
cb: pa_server_info_cb_t, |
| 903 |
userdata: *mut c_void, |
| 904 |
) -> *mut pa_operation { |
| 905 |
(::std::mem::transmute::< |
| 906 |
_, |
| 907 |
extern "C" fn(*const pa_context, pa_server_info_cb_t, *mut c_void) -> *mut pa_operation, |
| 908 |
>(PA_CONTEXT_GET_SERVER_INFO))(c, cb, userdata) |
| 909 |
} |
| 910 |
|
| 911 |
static mut PA_CONTEXT_GET_SINK_INFO_BY_NAME: *mut ::libc::c_void = 0 as *mut _; |
| 912 |
#[inline] |
| 913 |
pub unsafe fn pa_context_get_sink_info_by_name( |
| 914 |
c: *const pa_context, |
| 915 |
name: *const c_char, |
| 916 |
cb: pa_sink_info_cb_t, |
| 917 |
userdata: *mut c_void, |
| 918 |
) -> *mut pa_operation { |
| 919 |
(::std::mem::transmute::< |
| 920 |
_, |
| 921 |
extern "C" fn( |
| 922 |
*const pa_context, |
| 923 |
*const c_char, |
| 924 |
pa_sink_info_cb_t, |
| 925 |
*mut c_void, |
| 926 |
) -> *mut pa_operation, |
| 927 |
>(PA_CONTEXT_GET_SINK_INFO_BY_NAME))(c, name, cb, userdata) |
| 928 |
} |
| 929 |
|
| 930 |
static mut PA_CONTEXT_GET_SINK_INFO_LIST: *mut ::libc::c_void = 0 as *mut _; |
| 931 |
#[inline] |
| 932 |
pub unsafe fn pa_context_get_sink_info_list( |
| 933 |
c: *const pa_context, |
| 934 |
cb: pa_sink_info_cb_t, |
| 935 |
userdata: *mut c_void, |
| 936 |
) -> *mut pa_operation { |
| 937 |
(::std::mem::transmute::< |
| 938 |
_, |
| 939 |
extern "C" fn(*const pa_context, pa_sink_info_cb_t, *mut c_void) -> *mut pa_operation, |
| 940 |
>(PA_CONTEXT_GET_SINK_INFO_LIST))(c, cb, userdata) |
| 941 |
} |
| 942 |
|
| 943 |
static mut PA_CONTEXT_GET_SINK_INPUT_INFO: *mut ::libc::c_void = 0 as *mut _; |
| 944 |
#[inline] |
| 945 |
pub unsafe fn pa_context_get_sink_input_info( |
| 946 |
c: *const pa_context, |
| 947 |
idx: u32, |
| 948 |
cb: pa_sink_input_info_cb_t, |
| 949 |
userdata: *mut c_void, |
| 950 |
) -> *mut pa_operation { |
| 951 |
(::std::mem::transmute::< |
| 952 |
_, |
| 953 |
extern "C" fn( |
| 954 |
*const pa_context, |
| 955 |
u32, |
| 956 |
pa_sink_input_info_cb_t, |
| 957 |
*mut c_void, |
| 958 |
) -> *mut pa_operation, |
| 959 |
>(PA_CONTEXT_GET_SINK_INPUT_INFO))(c, idx, cb, userdata) |
| 960 |
} |
| 961 |
|
| 962 |
static mut PA_CONTEXT_GET_SOURCE_INFO_LIST: *mut ::libc::c_void = 0 as *mut _; |
| 963 |
#[inline] |
| 964 |
pub unsafe fn pa_context_get_source_info_list( |
| 965 |
c: *const pa_context, |
| 966 |
cb: pa_source_info_cb_t, |
| 967 |
userdata: *mut c_void, |
| 968 |
) -> *mut pa_operation { |
| 969 |
(::std::mem::transmute::< |
| 970 |
_, |
| 971 |
extern "C" fn(*const pa_context, pa_source_info_cb_t, *mut c_void) -> *mut pa_operation, |
| 972 |
>(PA_CONTEXT_GET_SOURCE_INFO_LIST))(c, cb, userdata) |
| 973 |
} |
| 974 |
|
| 975 |
static mut PA_CONTEXT_GET_STATE: *mut ::libc::c_void = 0 as *mut _; |
| 976 |
#[inline] |
| 977 |
pub unsafe fn pa_context_get_state(c: *const pa_context) -> pa_context_state_t { |
| 978 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_context) -> pa_context_state_t>( |
| 979 |
PA_CONTEXT_GET_STATE, |
| 980 |
))(c) |
| 981 |
} |
| 982 |
|
| 983 |
static mut PA_CONTEXT_NEW: *mut ::libc::c_void = 0 as *mut _; |
| 984 |
#[inline] |
| 985 |
pub unsafe fn pa_context_new( |
| 986 |
mainloop: *mut pa_mainloop_api, |
| 987 |
name: *const c_char, |
| 988 |
) -> *mut pa_context { |
| 989 |
(::std::mem::transmute::< |
| 990 |
_, |
| 991 |
extern "C" fn(*mut pa_mainloop_api, *const c_char) -> *mut pa_context, |
| 992 |
>(PA_CONTEXT_NEW))(mainloop, name) |
| 993 |
} |
| 994 |
|
| 995 |
static mut PA_CONTEXT_RTTIME_NEW: *mut ::libc::c_void = 0 as *mut _; |
| 996 |
#[inline] |
| 997 |
pub unsafe fn pa_context_rttime_new( |
| 998 |
c: *const pa_context, |
| 999 |
usec: pa_usec_t, |
| 1000 |
cb: pa_time_event_cb_t, |
| 1001 |
userdata: *mut c_void, |
| 1002 |
) -> *mut pa_time_event { |
| 1003 |
(::std::mem::transmute::< |
| 1004 |
_, |
| 1005 |
extern "C" fn( |
| 1006 |
*const pa_context, |
| 1007 |
pa_usec_t, |
| 1008 |
pa_time_event_cb_t, |
| 1009 |
*mut c_void, |
| 1010 |
) -> *mut pa_time_event, |
| 1011 |
>(PA_CONTEXT_RTTIME_NEW))(c, usec, cb, userdata) |
| 1012 |
} |
| 1013 |
|
| 1014 |
static mut PA_CONTEXT_SET_SINK_INPUT_VOLUME: *mut ::libc::c_void = 0 as *mut _; |
| 1015 |
#[inline] |
| 1016 |
pub unsafe fn pa_context_set_sink_input_volume( |
| 1017 |
c: *mut pa_context, |
| 1018 |
idx: u32, |
| 1019 |
volume: *const pa_cvolume, |
| 1020 |
cb: pa_context_success_cb_t, |
| 1021 |
userdata: *mut c_void, |
| 1022 |
) -> *mut pa_operation { |
| 1023 |
(::std::mem::transmute::< |
| 1024 |
_, |
| 1025 |
extern "C" fn( |
| 1026 |
*mut pa_context, |
| 1027 |
u32, |
| 1028 |
*const pa_cvolume, |
| 1029 |
pa_context_success_cb_t, |
| 1030 |
*mut c_void, |
| 1031 |
) -> *mut pa_operation, |
| 1032 |
>(PA_CONTEXT_SET_SINK_INPUT_VOLUME))(c, idx, volume, cb, userdata) |
| 1033 |
} |
| 1034 |
|
| 1035 |
static mut PA_CONTEXT_SET_STATE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1036 |
#[inline] |
| 1037 |
pub unsafe fn pa_context_set_state_callback( |
| 1038 |
c: *mut pa_context, |
| 1039 |
cb: pa_context_notify_cb_t, |
| 1040 |
userdata: *mut c_void, |
| 1041 |
) { |
| 1042 |
(::std::mem::transmute::< |
| 1043 |
_, |
| 1044 |
extern "C" fn(*mut pa_context, pa_context_notify_cb_t, *mut c_void), |
| 1045 |
>(PA_CONTEXT_SET_STATE_CALLBACK))(c, cb, userdata) |
| 1046 |
} |
| 1047 |
|
| 1048 |
static mut PA_CONTEXT_ERRNO: *mut ::libc::c_void = 0 as *mut _; |
| 1049 |
#[inline] |
| 1050 |
pub unsafe fn pa_context_errno(c: *mut pa_context) -> c_int { |
| 1051 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_context) -> c_int>(PA_CONTEXT_ERRNO))(c) |
| 1052 |
} |
| 1053 |
|
| 1054 |
static mut PA_CONTEXT_SET_SUBSCRIBE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1055 |
#[inline] |
| 1056 |
pub unsafe fn pa_context_set_subscribe_callback( |
| 1057 |
c: *mut pa_context, |
| 1058 |
cb: pa_context_subscribe_cb_t, |
| 1059 |
userdata: *mut c_void, |
| 1060 |
) { |
| 1061 |
(::std::mem::transmute::< |
| 1062 |
_, |
| 1063 |
extern "C" fn(*mut pa_context, pa_context_subscribe_cb_t, *mut c_void), |
| 1064 |
>(PA_CONTEXT_SET_SUBSCRIBE_CALLBACK))(c, cb, userdata) |
| 1065 |
} |
| 1066 |
|
| 1067 |
static mut PA_CONTEXT_SUBSCRIBE: *mut ::libc::c_void = 0 as *mut _; |
| 1068 |
#[inline] |
| 1069 |
pub unsafe fn pa_context_subscribe( |
| 1070 |
c: *mut pa_context, |
| 1071 |
m: pa_subscription_mask_t, |
| 1072 |
cb: pa_context_success_cb_t, |
| 1073 |
userdata: *mut c_void, |
| 1074 |
) -> *mut pa_operation { |
| 1075 |
(::std::mem::transmute::< |
| 1076 |
_, |
| 1077 |
extern "C" fn( |
| 1078 |
*mut pa_context, |
| 1079 |
pa_subscription_mask_t, |
| 1080 |
pa_context_success_cb_t, |
| 1081 |
*mut c_void, |
| 1082 |
) -> *mut pa_operation, |
| 1083 |
>(PA_CONTEXT_SUBSCRIBE))(c, m, cb, userdata) |
| 1084 |
} |
| 1085 |
|
| 1086 |
static mut PA_CONTEXT_REF: *mut ::libc::c_void = 0 as *mut _; |
| 1087 |
#[inline] |
| 1088 |
pub unsafe fn pa_context_ref(c: *mut pa_context) -> *mut pa_context { |
| 1089 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_context) -> *mut pa_context>( |
| 1090 |
PA_CONTEXT_REF, |
| 1091 |
))(c) |
| 1092 |
} |
| 1093 |
|
| 1094 |
static mut PA_CONTEXT_UNREF: *mut ::libc::c_void = 0 as *mut _; |
| 1095 |
#[inline] |
| 1096 |
pub unsafe fn pa_context_unref(c: *mut pa_context) { |
| 1097 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_context)>(PA_CONTEXT_UNREF))(c) |
| 1098 |
} |
| 1099 |
|
| 1100 |
static mut PA_CVOLUME_SET: *mut ::libc::c_void = 0 as *mut _; |
| 1101 |
#[inline] |
| 1102 |
pub unsafe fn pa_cvolume_set( |
| 1103 |
a: *mut pa_cvolume, |
| 1104 |
channels: c_uint, |
| 1105 |
v: pa_volume_t, |
| 1106 |
) -> *mut pa_cvolume { |
| 1107 |
(::std::mem::transmute::< |
| 1108 |
_, |
| 1109 |
extern "C" fn(*mut pa_cvolume, c_uint, pa_volume_t) -> *mut pa_cvolume, |
| 1110 |
>(PA_CVOLUME_SET))(a, channels, v) |
| 1111 |
} |
| 1112 |
|
| 1113 |
static mut PA_CVOLUME_SET_BALANCE: *mut ::libc::c_void = 0 as *mut _; |
| 1114 |
#[inline] |
| 1115 |
pub unsafe fn pa_cvolume_set_balance( |
| 1116 |
v: *mut pa_cvolume, |
| 1117 |
map: *const pa_channel_map, |
| 1118 |
new_balance: c_float, |
| 1119 |
) -> *mut pa_cvolume { |
| 1120 |
(::std::mem::transmute::< |
| 1121 |
_, |
| 1122 |
extern "C" fn(*mut pa_cvolume, *const pa_channel_map, c_float) -> *mut pa_cvolume, |
| 1123 |
>(PA_CVOLUME_SET_BALANCE))(v, map, new_balance) |
| 1124 |
} |
| 1125 |
|
| 1126 |
static mut PA_FRAME_SIZE: *mut ::libc::c_void = 0 as *mut _; |
| 1127 |
#[inline] |
| 1128 |
pub unsafe fn pa_frame_size(spec: *const pa_sample_spec) -> usize { |
| 1129 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_sample_spec) -> usize>(PA_FRAME_SIZE))( |
| 1130 |
spec, |
| 1131 |
) |
| 1132 |
} |
| 1133 |
|
| 1134 |
static mut PA_SAMPLE_SIZE: *mut ::libc::c_void = 0 as *mut _; |
| 1135 |
#[inline] |
| 1136 |
pub unsafe fn pa_sample_size(spec: *const pa_sample_spec) -> usize { |
| 1137 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_sample_spec) -> usize>(PA_SAMPLE_SIZE))( |
| 1138 |
spec, |
| 1139 |
) |
| 1140 |
} |
| 1141 |
|
| 1142 |
static mut PA_MAINLOOP_API_ONCE: *mut ::libc::c_void = 0 as *mut _; |
| 1143 |
#[inline] |
| 1144 |
pub unsafe fn pa_mainloop_api_once( |
| 1145 |
m: *mut pa_mainloop_api, |
| 1146 |
callback: pa_mainloop_api_once_cb_t, |
| 1147 |
userdata: *mut c_void, |
| 1148 |
) { |
| 1149 |
(::std::mem::transmute::< |
| 1150 |
_, |
| 1151 |
extern "C" fn(*mut pa_mainloop_api, pa_mainloop_api_once_cb_t, *mut c_void), |
| 1152 |
>(PA_MAINLOOP_API_ONCE))(m, callback, userdata) |
| 1153 |
} |
| 1154 |
|
| 1155 |
static mut PA_STRERROR: *mut ::libc::c_void = 0 as *mut _; |
| 1156 |
#[inline] |
| 1157 |
pub unsafe fn pa_strerror(error: pa_error_code_t) -> *const c_char { |
| 1158 |
(::std::mem::transmute::<_, extern "C" fn(pa_error_code_t) -> *const c_char>(PA_STRERROR))( |
| 1159 |
error, |
| 1160 |
) |
| 1161 |
} |
| 1162 |
|
| 1163 |
static mut PA_OPERATION_REF: *mut ::libc::c_void = 0 as *mut _; |
| 1164 |
#[inline] |
| 1165 |
pub unsafe fn pa_operation_ref(o: *mut pa_operation) -> *mut pa_operation { |
| 1166 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_operation) -> *mut pa_operation>( |
| 1167 |
PA_OPERATION_REF, |
| 1168 |
))(o) |
| 1169 |
} |
| 1170 |
|
| 1171 |
static mut PA_OPERATION_UNREF: *mut ::libc::c_void = 0 as *mut _; |
| 1172 |
#[inline] |
| 1173 |
pub unsafe fn pa_operation_unref(o: *mut pa_operation) { |
| 1174 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_operation)>(PA_OPERATION_UNREF))(o) |
| 1175 |
} |
| 1176 |
|
| 1177 |
static mut PA_OPERATION_CANCEL: *mut ::libc::c_void = 0 as *mut _; |
| 1178 |
#[inline] |
| 1179 |
pub unsafe fn pa_operation_cancel(o: *mut pa_operation) { |
| 1180 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_operation)>(PA_OPERATION_CANCEL))(o) |
| 1181 |
} |
| 1182 |
|
| 1183 |
static mut PA_OPERATION_GET_STATE: *mut ::libc::c_void = 0 as *mut _; |
| 1184 |
#[inline] |
| 1185 |
pub unsafe fn pa_operation_get_state(o: *const pa_operation) -> pa_operation_state_t { |
| 1186 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_operation) -> pa_operation_state_t>( |
| 1187 |
PA_OPERATION_GET_STATE, |
| 1188 |
))(o) |
| 1189 |
} |
| 1190 |
|
| 1191 |
static mut PA_OPERATION_SET_STATE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1192 |
#[inline] |
| 1193 |
pub unsafe fn pa_operation_set_state_callback( |
| 1194 |
o: *mut pa_operation, |
| 1195 |
cb: pa_operation_notify_cb_t, |
| 1196 |
userdata: *mut c_void, |
| 1197 |
) { |
| 1198 |
(::std::mem::transmute::< |
| 1199 |
_, |
| 1200 |
extern "C" fn(*mut pa_operation, pa_operation_notify_cb_t, *mut c_void), |
| 1201 |
>(PA_OPERATION_SET_STATE_CALLBACK))(o, cb, userdata) |
| 1202 |
} |
| 1203 |
|
| 1204 |
static mut PA_PROPLIST_GETS: *mut ::libc::c_void = 0 as *mut _; |
| 1205 |
#[inline] |
| 1206 |
pub unsafe fn pa_proplist_gets(p: *mut pa_proplist, key: *const c_char) -> *const c_char { |
| 1207 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_proplist, *const c_char) -> *const c_char>( |
| 1208 |
PA_PROPLIST_GETS, |
| 1209 |
))(p, key) |
| 1210 |
} |
| 1211 |
|
| 1212 |
static mut PA_RTCLOCK_NOW: *mut ::libc::c_void = 0 as *mut _; |
| 1213 |
#[inline] |
| 1214 |
pub unsafe fn pa_rtclock_now() -> pa_usec_t { |
| 1215 |
(::std::mem::transmute::<_, extern "C" fn() -> pa_usec_t>(PA_RTCLOCK_NOW))() |
| 1216 |
} |
| 1217 |
|
| 1218 |
static mut PA_STREAM_BEGIN_WRITE: *mut ::libc::c_void = 0 as *mut _; |
| 1219 |
#[inline] |
| 1220 |
pub unsafe fn pa_stream_begin_write( |
| 1221 |
p: *mut pa_stream, |
| 1222 |
data: *mut *mut c_void, |
| 1223 |
nbytes: *mut usize, |
| 1224 |
) -> c_int { |
| 1225 |
(::std::mem::transmute::< |
| 1226 |
_, |
| 1227 |
extern "C" fn(*mut pa_stream, *mut *mut c_void, *mut usize) -> c_int, |
| 1228 |
>(PA_STREAM_BEGIN_WRITE))(p, data, nbytes) |
| 1229 |
} |
| 1230 |
|
| 1231 |
static mut PA_STREAM_CANCEL_WRITE: *mut ::libc::c_void = 0 as *mut _; |
| 1232 |
#[inline] |
| 1233 |
pub unsafe fn pa_stream_cancel_write(p: *mut pa_stream) -> c_int { |
| 1234 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> c_int>(PA_STREAM_CANCEL_WRITE))( |
| 1235 |
p, |
| 1236 |
) |
| 1237 |
} |
| 1238 |
|
| 1239 |
static mut PA_STREAM_IS_SUSPENDED: *mut ::libc::c_void = 0 as *mut _; |
| 1240 |
#[inline] |
| 1241 |
pub unsafe fn pa_stream_is_suspended(s: *const pa_stream) -> c_int { |
| 1242 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> c_int>( |
| 1243 |
PA_STREAM_IS_SUSPENDED, |
| 1244 |
))(s) |
| 1245 |
} |
| 1246 |
|
| 1247 |
static mut PA_STREAM_IS_CORKED: *mut ::libc::c_void = 0 as *mut _; |
| 1248 |
#[inline] |
| 1249 |
pub unsafe fn pa_stream_is_corked(s: *const pa_stream) -> c_int { |
| 1250 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> c_int>(PA_STREAM_IS_CORKED))( |
| 1251 |
s, |
| 1252 |
) |
| 1253 |
} |
| 1254 |
|
| 1255 |
static mut PA_STREAM_CONNECT_PLAYBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1256 |
#[inline] |
| 1257 |
pub unsafe fn pa_stream_connect_playback( |
| 1258 |
s: *mut pa_stream, |
| 1259 |
dev: *const c_char, |
| 1260 |
attr: *const pa_buffer_attr, |
| 1261 |
flags: pa_stream_flags_t, |
| 1262 |
volume: *const pa_cvolume, |
| 1263 |
sync_stream: *const pa_stream, |
| 1264 |
) -> c_int { |
| 1265 |
(::std::mem::transmute::< |
| 1266 |
_, |
| 1267 |
extern "C" fn( |
| 1268 |
*mut pa_stream, |
| 1269 |
*const c_char, |
| 1270 |
*const pa_buffer_attr, |
| 1271 |
pa_stream_flags_t, |
| 1272 |
*const pa_cvolume, |
| 1273 |
*const pa_stream, |
| 1274 |
) -> c_int, |
| 1275 |
>(PA_STREAM_CONNECT_PLAYBACK))(s, dev, attr, flags, volume, sync_stream) |
| 1276 |
} |
| 1277 |
|
| 1278 |
static mut PA_STREAM_CONNECT_RECORD: *mut ::libc::c_void = 0 as *mut _; |
| 1279 |
#[inline] |
| 1280 |
pub unsafe fn pa_stream_connect_record( |
| 1281 |
s: *mut pa_stream, |
| 1282 |
dev: *const c_char, |
| 1283 |
attr: *const pa_buffer_attr, |
| 1284 |
flags: pa_stream_flags_t, |
| 1285 |
) -> c_int { |
| 1286 |
(::std::mem::transmute::< |
| 1287 |
_, |
| 1288 |
extern "C" fn( |
| 1289 |
*mut pa_stream, |
| 1290 |
*const c_char, |
| 1291 |
*const pa_buffer_attr, |
| 1292 |
pa_stream_flags_t, |
| 1293 |
) -> c_int, |
| 1294 |
>(PA_STREAM_CONNECT_RECORD))(s, dev, attr, flags) |
| 1295 |
} |
| 1296 |
|
| 1297 |
static mut PA_STREAM_CORK: *mut ::libc::c_void = 0 as *mut _; |
| 1298 |
#[inline] |
| 1299 |
pub unsafe fn pa_stream_cork( |
| 1300 |
s: *mut pa_stream, |
| 1301 |
b: c_int, |
| 1302 |
cb: pa_stream_success_cb_t, |
| 1303 |
userdata: *mut c_void, |
| 1304 |
) -> *mut pa_operation { |
| 1305 |
(::std::mem::transmute::< |
| 1306 |
_, |
| 1307 |
extern "C" fn( |
| 1308 |
*mut pa_stream, |
| 1309 |
c_int, |
| 1310 |
pa_stream_success_cb_t, |
| 1311 |
*mut c_void, |
| 1312 |
) -> *mut pa_operation, |
| 1313 |
>(PA_STREAM_CORK))(s, b, cb, userdata) |
| 1314 |
} |
| 1315 |
|
| 1316 |
static mut PA_STREAM_DISCONNECT: *mut ::libc::c_void = 0 as *mut _; |
| 1317 |
#[inline] |
| 1318 |
pub unsafe fn pa_stream_disconnect(s: *mut pa_stream) -> c_int { |
| 1319 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> c_int>(PA_STREAM_DISCONNECT))( |
| 1320 |
s, |
| 1321 |
) |
| 1322 |
} |
| 1323 |
|
| 1324 |
static mut PA_STREAM_DROP: *mut ::libc::c_void = 0 as *mut _; |
| 1325 |
#[inline] |
| 1326 |
pub unsafe fn pa_stream_drop(p: *mut pa_stream) -> c_int { |
| 1327 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> c_int>(PA_STREAM_DROP))(p) |
| 1328 |
} |
| 1329 |
|
| 1330 |
static mut PA_STREAM_GET_BUFFER_ATTR: *mut ::libc::c_void = 0 as *mut _; |
| 1331 |
#[inline] |
| 1332 |
pub unsafe fn pa_stream_get_buffer_attr(s: *const pa_stream) -> *const pa_buffer_attr { |
| 1333 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *const pa_buffer_attr>( |
| 1334 |
PA_STREAM_GET_BUFFER_ATTR, |
| 1335 |
))(s) |
| 1336 |
} |
| 1337 |
|
| 1338 |
static mut PA_STREAM_GET_CHANNEL_MAP: *mut ::libc::c_void = 0 as *mut _; |
| 1339 |
#[inline] |
| 1340 |
pub unsafe fn pa_stream_get_channel_map(s: *const pa_stream) -> *const pa_channel_map { |
| 1341 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *const pa_channel_map>( |
| 1342 |
PA_STREAM_GET_CHANNEL_MAP, |
| 1343 |
))(s) |
| 1344 |
} |
| 1345 |
|
| 1346 |
static mut PA_STREAM_GET_DEVICE_NAME: *mut ::libc::c_void = 0 as *mut _; |
| 1347 |
#[inline] |
| 1348 |
pub unsafe fn pa_stream_get_device_name(s: *const pa_stream) -> *const c_char { |
| 1349 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *const c_char>( |
| 1350 |
PA_STREAM_GET_DEVICE_NAME, |
| 1351 |
))(s) |
| 1352 |
} |
| 1353 |
|
| 1354 |
static mut PA_STREAM_GET_INDEX: *mut ::libc::c_void = 0 as *mut _; |
| 1355 |
#[inline] |
| 1356 |
pub unsafe fn pa_stream_get_index(s: *const pa_stream) -> u32 { |
| 1357 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> u32>(PA_STREAM_GET_INDEX))(s) |
| 1358 |
} |
| 1359 |
|
| 1360 |
static mut PA_STREAM_GET_LATENCY: *mut ::libc::c_void = 0 as *mut _; |
| 1361 |
#[inline] |
| 1362 |
pub unsafe fn pa_stream_get_latency( |
| 1363 |
s: *const pa_stream, |
| 1364 |
r_usec: *mut pa_usec_t, |
| 1365 |
negative: *mut c_int, |
| 1366 |
) -> c_int { |
| 1367 |
(::std::mem::transmute::< |
| 1368 |
_, |
| 1369 |
extern "C" fn(*const pa_stream, *mut pa_usec_t, *mut c_int) -> c_int, |
| 1370 |
>(PA_STREAM_GET_LATENCY))(s, r_usec, negative) |
| 1371 |
} |
| 1372 |
|
| 1373 |
static mut PA_STREAM_GET_SAMPLE_SPEC: *mut ::libc::c_void = 0 as *mut _; |
| 1374 |
#[inline] |
| 1375 |
pub unsafe fn pa_stream_get_sample_spec(s: *const pa_stream) -> *const pa_sample_spec { |
| 1376 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *const pa_sample_spec>( |
| 1377 |
PA_STREAM_GET_SAMPLE_SPEC, |
| 1378 |
))(s) |
| 1379 |
} |
| 1380 |
|
| 1381 |
static mut PA_STREAM_GET_STATE: *mut ::libc::c_void = 0 as *mut _; |
| 1382 |
#[inline] |
| 1383 |
pub unsafe fn pa_stream_get_state(p: *const pa_stream) -> pa_stream_state_t { |
| 1384 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> pa_stream_state_t>( |
| 1385 |
PA_STREAM_GET_STATE, |
| 1386 |
))(p) |
| 1387 |
} |
| 1388 |
|
| 1389 |
static mut PA_STREAM_GET_CONTEXT: *mut ::libc::c_void = 0 as *mut _; |
| 1390 |
#[inline] |
| 1391 |
pub unsafe fn pa_stream_get_context(s: *const pa_stream) -> *mut pa_context { |
| 1392 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *mut pa_context>( |
| 1393 |
PA_STREAM_GET_CONTEXT, |
| 1394 |
))(s) |
| 1395 |
} |
| 1396 |
|
| 1397 |
static mut PA_STREAM_GET_TIME: *mut ::libc::c_void = 0 as *mut _; |
| 1398 |
#[inline] |
| 1399 |
pub unsafe fn pa_stream_get_time(s: *const pa_stream, r_usec: *mut pa_usec_t) -> c_int { |
| 1400 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream, *mut pa_usec_t) -> c_int>( |
| 1401 |
PA_STREAM_GET_TIME, |
| 1402 |
))(s, r_usec) |
| 1403 |
} |
| 1404 |
|
| 1405 |
static mut PA_STREAM_NEW: *mut ::libc::c_void = 0 as *mut _; |
| 1406 |
#[inline] |
| 1407 |
pub unsafe fn pa_stream_new( |
| 1408 |
c: *mut pa_context, |
| 1409 |
name: *const c_char, |
| 1410 |
ss: *const pa_sample_spec, |
| 1411 |
map: *const pa_channel_map, |
| 1412 |
) -> *mut pa_stream { |
| 1413 |
(::std::mem::transmute::< |
| 1414 |
_, |
| 1415 |
extern "C" fn( |
| 1416 |
*mut pa_context, |
| 1417 |
*const c_char, |
| 1418 |
*const pa_sample_spec, |
| 1419 |
*const pa_channel_map, |
| 1420 |
) -> *mut pa_stream, |
| 1421 |
>(PA_STREAM_NEW))(c, name, ss, map) |
| 1422 |
} |
| 1423 |
|
| 1424 |
static mut PA_STREAM_PEEK: *mut ::libc::c_void = 0 as *mut _; |
| 1425 |
#[inline] |
| 1426 |
pub unsafe fn pa_stream_peek( |
| 1427 |
p: *mut pa_stream, |
| 1428 |
data: *mut *const c_void, |
| 1429 |
nbytes: *mut usize, |
| 1430 |
) -> c_int { |
| 1431 |
(::std::mem::transmute::< |
| 1432 |
_, |
| 1433 |
extern "C" fn(*mut pa_stream, *mut *const c_void, *mut usize) -> c_int, |
| 1434 |
>(PA_STREAM_PEEK))(p, data, nbytes) |
| 1435 |
} |
| 1436 |
|
| 1437 |
static mut PA_STREAM_READABLE_SIZE: *mut ::libc::c_void = 0 as *mut _; |
| 1438 |
#[inline] |
| 1439 |
pub unsafe fn pa_stream_readable_size(p: *const pa_stream) -> usize { |
| 1440 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> usize>( |
| 1441 |
PA_STREAM_READABLE_SIZE, |
| 1442 |
))(p) |
| 1443 |
} |
| 1444 |
|
| 1445 |
static mut PA_STREAM_SET_STATE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1446 |
#[inline] |
| 1447 |
pub unsafe fn pa_stream_set_state_callback( |
| 1448 |
s: *mut pa_stream, |
| 1449 |
cb: pa_stream_notify_cb_t, |
| 1450 |
userdata: *mut c_void, |
| 1451 |
) { |
| 1452 |
(::std::mem::transmute::< |
| 1453 |
_, |
| 1454 |
extern "C" fn(*mut pa_stream, pa_stream_notify_cb_t, *mut c_void), |
| 1455 |
>(PA_STREAM_SET_STATE_CALLBACK))(s, cb, userdata) |
| 1456 |
} |
| 1457 |
|
| 1458 |
static mut PA_STREAM_SET_WRITE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1459 |
#[inline] |
| 1460 |
pub unsafe fn pa_stream_set_write_callback( |
| 1461 |
p: *mut pa_stream, |
| 1462 |
cb: pa_stream_request_cb_t, |
| 1463 |
userdata: *mut c_void, |
| 1464 |
) { |
| 1465 |
(::std::mem::transmute::< |
| 1466 |
_, |
| 1467 |
extern "C" fn(*mut pa_stream, pa_stream_request_cb_t, *mut c_void), |
| 1468 |
>(PA_STREAM_SET_WRITE_CALLBACK))(p, cb, userdata) |
| 1469 |
} |
| 1470 |
|
| 1471 |
static mut PA_STREAM_SET_READ_CALLBACK: *mut ::libc::c_void = 0 as *mut _; |
| 1472 |
#[inline] |
| 1473 |
pub unsafe fn pa_stream_set_read_callback( |
| 1474 |
p: *mut pa_stream, |
| 1475 |
cb: pa_stream_request_cb_t, |
| 1476 |
userdata: *mut c_void, |
| 1477 |
) { |
| 1478 |
(::std::mem::transmute::< |
| 1479 |
_, |
| 1480 |
extern "C" fn(*mut pa_stream, pa_stream_request_cb_t, *mut c_void), |
| 1481 |
>(PA_STREAM_SET_READ_CALLBACK))(p, cb, userdata) |
| 1482 |
} |
| 1483 |
|
| 1484 |
static mut PA_STREAM_REF: *mut ::libc::c_void = 0 as *mut _; |
| 1485 |
#[inline] |
| 1486 |
pub unsafe fn pa_stream_ref(s: *mut pa_stream) -> *mut pa_stream { |
| 1487 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> *mut pa_stream>(PA_STREAM_REF))( |
| 1488 |
s, |
| 1489 |
) |
| 1490 |
} |
| 1491 |
|
| 1492 |
static mut PA_STREAM_UNREF: *mut ::libc::c_void = 0 as *mut _; |
| 1493 |
#[inline] |
| 1494 |
pub unsafe fn pa_stream_unref(s: *mut pa_stream) { |
| 1495 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_stream)>(PA_STREAM_UNREF))(s) |
| 1496 |
} |
| 1497 |
|
| 1498 |
static mut PA_STREAM_UPDATE_TIMING_INFO: *mut ::libc::c_void = 0 as *mut _; |
| 1499 |
#[inline] |
| 1500 |
pub unsafe fn pa_stream_update_timing_info( |
| 1501 |
p: *mut pa_stream, |
| 1502 |
cb: pa_stream_success_cb_t, |
| 1503 |
userdata: *mut c_void, |
| 1504 |
) -> *mut pa_operation { |
| 1505 |
(::std::mem::transmute::< |
| 1506 |
_, |
| 1507 |
extern "C" fn(*mut pa_stream, pa_stream_success_cb_t, *mut c_void) -> *mut pa_operation, |
| 1508 |
>(PA_STREAM_UPDATE_TIMING_INFO))(p, cb, userdata) |
| 1509 |
} |
| 1510 |
|
| 1511 |
static mut PA_STREAM_WRITABLE_SIZE: *mut ::libc::c_void = 0 as *mut _; |
| 1512 |
#[inline] |
| 1513 |
pub unsafe fn pa_stream_writable_size(p: *const pa_stream) -> usize { |
| 1514 |
(::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> usize>( |
| 1515 |
PA_STREAM_WRITABLE_SIZE, |
| 1516 |
))(p) |
| 1517 |
} |
| 1518 |
|
| 1519 |
static mut PA_STREAM_WRITE: *mut ::libc::c_void = 0 as *mut _; |
| 1520 |
#[inline] |
| 1521 |
pub unsafe fn pa_stream_write( |
| 1522 |
p: *mut pa_stream, |
| 1523 |
data: *const c_void, |
| 1524 |
nbytes: usize, |
| 1525 |
free_cb: pa_free_cb_t, |
| 1526 |
offset: i64, |
| 1527 |
seek: pa_seek_mode_t, |
| 1528 |
) -> c_int { |
| 1529 |
(::std::mem::transmute::< |
| 1530 |
_, |
| 1531 |
extern "C" fn( |
| 1532 |
*mut pa_stream, |
| 1533 |
*const c_void, |
| 1534 |
usize, |
| 1535 |
pa_free_cb_t, |
| 1536 |
i64, |
| 1537 |
pa_seek_mode_t, |
| 1538 |
) -> c_int, |
| 1539 |
>(PA_STREAM_WRITE))(p, data, nbytes, free_cb, offset, seek) |
| 1540 |
} |
| 1541 |
|
| 1542 |
static mut PA_STREAM_SET_NAME: *mut ::libc::c_void = 0 as *mut _; |
| 1543 |
#[inline] |
| 1544 |
pub unsafe fn pa_stream_set_name( |
| 1545 |
s: *mut pa_stream, |
| 1546 |
name: *const c_char, |
| 1547 |
cb: pa_stream_success_cb_t, |
| 1548 |
userdata: *mut c_void, |
| 1549 |
) -> *mut pa_operation { |
| 1550 |
(::std::mem::transmute::< |
| 1551 |
_, |
| 1552 |
extern "C" fn( |
| 1553 |
*mut pa_stream, |
| 1554 |
*const c_char, |
| 1555 |
pa_stream_success_cb_t, |
| 1556 |
*mut c_void, |
| 1557 |
) -> *mut pa_operation, |
| 1558 |
>(PA_STREAM_SET_NAME))(s, name, cb, userdata) |
| 1559 |
} |
| 1560 |
|
| 1561 |
static mut PA_SW_VOLUME_FROM_LINEAR: *mut ::libc::c_void = 0 as *mut _; |
| 1562 |
#[inline] |
| 1563 |
pub unsafe fn pa_sw_volume_from_linear(v: c_double) -> pa_volume_t { |
| 1564 |
(::std::mem::transmute::<_, extern "C" fn(c_double) -> pa_volume_t>( |
| 1565 |
PA_SW_VOLUME_FROM_LINEAR, |
| 1566 |
))(v) |
| 1567 |
} |
| 1568 |
|
| 1569 |
static mut PA_THREADED_MAINLOOP_FREE: *mut ::libc::c_void = 0 as *mut _; |
| 1570 |
#[inline] |
| 1571 |
pub unsafe fn pa_threaded_mainloop_free(m: *mut pa_threaded_mainloop) { |
| 1572 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop)>( |
| 1573 |
PA_THREADED_MAINLOOP_FREE, |
| 1574 |
))(m) |
| 1575 |
} |
| 1576 |
|
| 1577 |
static mut PA_THREADED_MAINLOOP_GET_API: *mut ::libc::c_void = 0 as *mut _; |
| 1578 |
#[inline] |
| 1579 |
pub unsafe fn pa_threaded_mainloop_get_api( |
| 1580 |
m: *mut pa_threaded_mainloop, |
| 1581 |
) -> *mut pa_mainloop_api { |
| 1582 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop) -> *mut pa_mainloop_api>( |
| 1583 |
PA_THREADED_MAINLOOP_GET_API, |
| 1584 |
))(m) |
| 1585 |
} |
| 1586 |
|
| 1587 |
static mut PA_THREADED_MAINLOOP_IN_THREAD: *mut ::libc::c_void = 0 as *mut _; |
| 1588 |
#[inline] |
| 1589 |
pub unsafe fn pa_threaded_mainloop_in_thread(m: *mut pa_threaded_mainloop) -> c_int { |
| 1590 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop) -> c_int>( |
| 1591 |
PA_THREADED_MAINLOOP_IN_THREAD, |
| 1592 |
))(m) |
| 1593 |
} |
| 1594 |
|
| 1595 |
static mut PA_THREADED_MAINLOOP_LOCK: *mut ::libc::c_void = 0 as *mut _; |
| 1596 |
#[inline] |
| 1597 |
pub unsafe fn pa_threaded_mainloop_lock(m: *mut pa_threaded_mainloop) { |
| 1598 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop)>( |
| 1599 |
PA_THREADED_MAINLOOP_LOCK, |
| 1600 |
))(m) |
| 1601 |
} |
| 1602 |
|
| 1603 |
static mut PA_THREADED_MAINLOOP_NEW: *mut ::libc::c_void = 0 as *mut _; |
| 1604 |
#[inline] |
| 1605 |
pub unsafe fn pa_threaded_mainloop_new() -> *mut pa_threaded_mainloop { |
| 1606 |
(::std::mem::transmute::<_, extern "C" fn() -> *mut pa_threaded_mainloop>( |
| 1607 |
PA_THREADED_MAINLOOP_NEW, |
| 1608 |
))() |
| 1609 |
} |
| 1610 |
|
| 1611 |
static mut PA_THREADED_MAINLOOP_SIGNAL: *mut ::libc::c_void = 0 as *mut _; |
| 1612 |
#[inline] |
| 1613 |
pub unsafe fn pa_threaded_mainloop_signal( |
| 1614 |
m: *mut pa_threaded_mainloop, |
| 1615 |
wait_for_accept: c_int, |
| 1616 |
) { |
| 1617 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop, c_int)>( |
| 1618 |
PA_THREADED_MAINLOOP_SIGNAL, |
| 1619 |
))(m, wait_for_accept) |
| 1620 |
} |
| 1621 |
|
| 1622 |
static mut PA_THREADED_MAINLOOP_START: *mut ::libc::c_void = 0 as *mut _; |
| 1623 |
#[inline] |
| 1624 |
pub unsafe fn pa_threaded_mainloop_start(m: *mut pa_threaded_mainloop) -> c_int { |
| 1625 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop) -> c_int>( |
| 1626 |
PA_THREADED_MAINLOOP_START, |
| 1627 |
))(m) |
| 1628 |
} |
| 1629 |
|
| 1630 |
static mut PA_THREADED_MAINLOOP_STOP: *mut ::libc::c_void = 0 as *mut _; |
| 1631 |
#[inline] |
| 1632 |
pub unsafe fn pa_threaded_mainloop_stop(m: *mut pa_threaded_mainloop) { |
| 1633 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop)>( |
| 1634 |
PA_THREADED_MAINLOOP_STOP, |
| 1635 |
))(m) |
| 1636 |
} |
| 1637 |
|
| 1638 |
static mut PA_THREADED_MAINLOOP_UNLOCK: *mut ::libc::c_void = 0 as *mut _; |
| 1639 |
#[inline] |
| 1640 |
pub unsafe fn pa_threaded_mainloop_unlock(m: *mut pa_threaded_mainloop) { |
| 1641 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop)>( |
| 1642 |
PA_THREADED_MAINLOOP_UNLOCK, |
| 1643 |
))(m) |
| 1644 |
} |
| 1645 |
|
| 1646 |
static mut PA_THREADED_MAINLOOP_WAIT: *mut ::libc::c_void = 0 as *mut _; |
| 1647 |
#[inline] |
| 1648 |
pub unsafe fn pa_threaded_mainloop_wait(m: *mut pa_threaded_mainloop) { |
| 1649 |
(::std::mem::transmute::<_, extern "C" fn(*mut pa_threaded_mainloop)>( |
| 1650 |
PA_THREADED_MAINLOOP_WAIT, |
| 1651 |
))(m) |
| 1652 |
} |
| 1653 |
|
| 1654 |
static mut PA_USEC_TO_BYTES: *mut ::libc::c_void = 0 as *mut _; |
| 1655 |
#[inline] |
| 1656 |
pub unsafe fn pa_usec_to_bytes(t: pa_usec_t, spec: *const pa_sample_spec) -> usize { |
| 1657 |
(::std::mem::transmute::<_, extern "C" fn(pa_usec_t, *const pa_sample_spec) -> usize>( |
| 1658 |
PA_USEC_TO_BYTES, |
| 1659 |
))(t, spec) |
| 1660 |
} |
| 1661 |
|
| 1662 |
static mut PA_XREALLOC: *mut ::libc::c_void = 0 as *mut _; |
| 1663 |
#[inline] |
| 1664 |
pub unsafe fn pa_xrealloc(ptr: *mut c_void, size: usize) -> *mut c_void { |
| 1665 |
(::std::mem::transmute::<_, extern "C" fn(*mut c_void, usize) -> *mut c_void>(PA_XREALLOC))( |
| 1666 |
ptr, size, |
| 1667 |
) |
| 1668 |
} |
| 1669 |
} |
| 1670 |
|
| 1671 |
#[cfg(feature = "dlopen")] |
| 1672 |
pub use self::dynamic_fns::*; |