| // Auto-generated with: android/scripts/gen-entries.py --mode=wrapper audio/wrappers/pulse-audio.entries |
| // DO NOT EDIT THIS FILE |
| |
| #include <dlfcn.h> |
| #include <pulse/pulseaudio.h> |
| |
| /// |
| /// W R A P P E R P O I N T E R S |
| /// |
| |
| static int (*__dll_pa_context_connect)(pa_context * c, const char * server, pa_context_flags_t flags, const pa_spawn_api * api) = 0; |
| static void (*__dll_pa_context_disconnect)(pa_context * c) = 0; |
| static int (*__dll_pa_context_errno)(pa_context * c) = 0; |
| static pa_context_state_t (*__dll_pa_context_get_state)(pa_context * c) = 0; |
| static pa_context * (*__dll_pa_context_new)(pa_mainloop_api * mainloop, const char * name) = 0; |
| static pa_operation* (*__dll_pa_context_set_sink_input_mute)(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata) = 0; |
| static pa_operation* (*__dll_pa_context_set_sink_input_volume)(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata) = 0; |
| static pa_operation* (*__dll_pa_context_set_source_mute_by_index)(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata) = 0; |
| static pa_operation* (*__dll_pa_context_set_source_volume_by_index)(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata) = 0; |
| static void (*__dll_pa_context_set_state_callback)(pa_context * c, pa_context_notify_cb_t cb, void * userdata) = 0; |
| static void (*__dll_pa_context_unref)(pa_context * c) = 0; |
| static pa_cvolume* (*__dll_pa_cvolume_init)(pa_cvolume * a) = 0; |
| static void (*__dll_pa_operation_unref)(pa_operation * o) = 0; |
| static int (*__dll_pa_stream_connect_playback)(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags, const pa_cvolume * volume, pa_stream * sync_stream) = 0; |
| static int (*__dll_pa_stream_connect_record)(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags) = 0; |
| static int (*__dll_pa_stream_drop)(pa_stream * p) = 0; |
| static uint32_t (*__dll_pa_stream_get_device_index)(pa_stream * s) = 0; |
| static uint32_t (*__dll_pa_stream_get_index)(pa_stream * s) = 0; |
| static pa_stream_state_t (*__dll_pa_stream_get_state)(pa_stream * p) = 0; |
| static pa_stream* (*__dll_pa_stream_new)(pa_context * c, const char * name, const pa_sample_spec * ss, const pa_channel_map * map) = 0; |
| static int (*__dll_pa_stream_peek)(pa_stream * p, const void ** data, size_t * nbytes) = 0; |
| static void (*__dll_pa_stream_set_read_callback)(pa_stream * p, pa_stream_request_cb_t cb, void * userdata) = 0; |
| static void (*__dll_pa_stream_set_state_callback)(pa_stream * s, pa_stream_notify_cb_t cb, void * userdata) = 0; |
| static void (*__dll_pa_stream_set_write_callback)(pa_stream * p, pa_stream_request_cb_t cb, void * userdata) = 0; |
| static void (*__dll_pa_stream_unref)(pa_stream * s) = 0; |
| static size_t (*__dll_pa_stream_writable_size)(pa_stream * p) = 0; |
| static int (*__dll_pa_stream_write)(pa_stream * p, const void * data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek) = 0; |
| static const char* (*__dll_pa_strerror)(int error) = 0; |
| static void (*__dll_pa_threaded_mainloop_free)(pa_threaded_mainloop* m) = 0; |
| static pa_mainloop_api* (*__dll_pa_threaded_mainloop_get_api)(pa_threaded_mainloop* m) = 0; |
| static void (*__dll_pa_threaded_mainloop_lock)(pa_threaded_mainloop * m) = 0; |
| static pa_threaded_mainloop * (*__dll_pa_threaded_mainloop_new)() = 0; |
| static void (*__dll_pa_threaded_mainloop_signal)(pa_threaded_mainloop * m, int wait_for_accept) = 0; |
| static int (*__dll_pa_threaded_mainloop_start)(pa_threaded_mainloop * m) = 0; |
| static void (*__dll_pa_threaded_mainloop_stop)(pa_threaded_mainloop * m) = 0; |
| static void (*__dll_pa_threaded_mainloop_unlock)(pa_threaded_mainloop * m) = 0; |
| static void (*__dll_pa_threaded_mainloop_wait)(pa_threaded_mainloop * m) = 0; |
| static size_t (*__dll_pa_usec_to_bytes)(pa_usec_t t, const pa_sample_spec * spec) = 0; |
| |
| /// |
| /// W R A P P E R F U N C T I O N S |
| /// |
| |
| int pa_context_connect(pa_context * c, const char * server, pa_context_flags_t flags, const pa_spawn_api * api) { |
| return __dll_pa_context_connect(c, server, flags, api); |
| } |
| |
| void pa_context_disconnect(pa_context * c) { |
| __dll_pa_context_disconnect(c); |
| } |
| |
| int pa_context_errno(pa_context * c) { |
| return __dll_pa_context_errno(c); |
| } |
| |
| pa_context_state_t pa_context_get_state(pa_context * c) { |
| return __dll_pa_context_get_state(c); |
| } |
| |
| pa_context * pa_context_new(pa_mainloop_api * mainloop, const char * name) { |
| return __dll_pa_context_new(mainloop, name); |
| } |
| |
| pa_operation* pa_context_set_sink_input_mute(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata) { |
| return __dll_pa_context_set_sink_input_mute(c, idx, mute, cb, userdata); |
| } |
| |
| pa_operation* pa_context_set_sink_input_volume(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata) { |
| return __dll_pa_context_set_sink_input_volume(c, idx, volume, cb, userdata); |
| } |
| |
| pa_operation* pa_context_set_source_mute_by_index(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata) { |
| return __dll_pa_context_set_source_mute_by_index(c, idx, mute, cb, userdata); |
| } |
| |
| pa_operation* pa_context_set_source_volume_by_index(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata) { |
| return __dll_pa_context_set_source_volume_by_index(c, idx, volume, cb, userdata); |
| } |
| |
| void pa_context_set_state_callback(pa_context * c, pa_context_notify_cb_t cb, void * userdata) { |
| __dll_pa_context_set_state_callback(c, cb, userdata); |
| } |
| |
| void pa_context_unref(pa_context * c) { |
| __dll_pa_context_unref(c); |
| } |
| |
| pa_cvolume* pa_cvolume_init(pa_cvolume * a) { |
| return __dll_pa_cvolume_init(a); |
| } |
| |
| void pa_operation_unref(pa_operation * o) { |
| __dll_pa_operation_unref(o); |
| } |
| |
| int pa_stream_connect_playback(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags, const pa_cvolume * volume, pa_stream * sync_stream) { |
| return __dll_pa_stream_connect_playback(s, dev, attr, flags, volume, sync_stream); |
| } |
| |
| int pa_stream_connect_record(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags) { |
| return __dll_pa_stream_connect_record(s, dev, attr, flags); |
| } |
| |
| int pa_stream_drop(pa_stream * p) { |
| return __dll_pa_stream_drop(p); |
| } |
| |
| uint32_t pa_stream_get_device_index(pa_stream * s) { |
| return __dll_pa_stream_get_device_index(s); |
| } |
| |
| uint32_t pa_stream_get_index(pa_stream * s) { |
| return __dll_pa_stream_get_index(s); |
| } |
| |
| pa_stream_state_t pa_stream_get_state(pa_stream * p) { |
| return __dll_pa_stream_get_state(p); |
| } |
| |
| pa_stream* pa_stream_new(pa_context * c, const char * name, const pa_sample_spec * ss, const pa_channel_map * map) { |
| return __dll_pa_stream_new(c, name, ss, map); |
| } |
| |
| int pa_stream_peek(pa_stream * p, const void ** data, size_t * nbytes) { |
| return __dll_pa_stream_peek(p, data, nbytes); |
| } |
| |
| void pa_stream_set_read_callback(pa_stream * p, pa_stream_request_cb_t cb, void * userdata) { |
| __dll_pa_stream_set_read_callback(p, cb, userdata); |
| } |
| |
| void pa_stream_set_state_callback(pa_stream * s, pa_stream_notify_cb_t cb, void * userdata) { |
| __dll_pa_stream_set_state_callback(s, cb, userdata); |
| } |
| |
| void pa_stream_set_write_callback(pa_stream * p, pa_stream_request_cb_t cb, void * userdata) { |
| __dll_pa_stream_set_write_callback(p, cb, userdata); |
| } |
| |
| void pa_stream_unref(pa_stream * s) { |
| __dll_pa_stream_unref(s); |
| } |
| |
| size_t pa_stream_writable_size(pa_stream * p) { |
| return __dll_pa_stream_writable_size(p); |
| } |
| |
| int pa_stream_write(pa_stream * p, const void * data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek) { |
| return __dll_pa_stream_write(p, data, nbytes, free_cb, offset, seek); |
| } |
| |
| const char* pa_strerror(int error) { |
| return __dll_pa_strerror(error); |
| } |
| |
| void pa_threaded_mainloop_free(pa_threaded_mainloop* m) { |
| __dll_pa_threaded_mainloop_free(m); |
| } |
| |
| pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop* m) { |
| return __dll_pa_threaded_mainloop_get_api(m); |
| } |
| |
| void pa_threaded_mainloop_lock(pa_threaded_mainloop * m) { |
| __dll_pa_threaded_mainloop_lock(m); |
| } |
| |
| pa_threaded_mainloop * pa_threaded_mainloop_new() { |
| return __dll_pa_threaded_mainloop_new(); |
| } |
| |
| void pa_threaded_mainloop_signal(pa_threaded_mainloop * m, int wait_for_accept) { |
| __dll_pa_threaded_mainloop_signal(m, wait_for_accept); |
| } |
| |
| int pa_threaded_mainloop_start(pa_threaded_mainloop * m) { |
| return __dll_pa_threaded_mainloop_start(m); |
| } |
| |
| void pa_threaded_mainloop_stop(pa_threaded_mainloop * m) { |
| __dll_pa_threaded_mainloop_stop(m); |
| } |
| |
| void pa_threaded_mainloop_unlock(pa_threaded_mainloop * m) { |
| __dll_pa_threaded_mainloop_unlock(m); |
| } |
| |
| void pa_threaded_mainloop_wait(pa_threaded_mainloop * m) { |
| __dll_pa_threaded_mainloop_wait(m); |
| } |
| |
| size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec * spec) { |
| return __dll_pa_usec_to_bytes(t, spec); |
| } |
| |
| |
| /// |
| /// I N I T I A L I Z A T I O N F U N C T I O N |
| /// |
| |
| int pulse_audio_dynlink_init(void* lib) { |
| __dll_pa_context_connect = (int(*)(pa_context * c, const char * server, pa_context_flags_t flags, const pa_spawn_api * api))dlsym(lib, "pa_context_connect"); |
| if (!__dll_pa_context_connect) return -1; |
| __dll_pa_context_disconnect = (void(*)(pa_context * c))dlsym(lib, "pa_context_disconnect"); |
| if (!__dll_pa_context_disconnect) return -1; |
| __dll_pa_context_errno = (int(*)(pa_context * c))dlsym(lib, "pa_context_errno"); |
| if (!__dll_pa_context_errno) return -1; |
| __dll_pa_context_get_state = (pa_context_state_t(*)(pa_context * c))dlsym(lib, "pa_context_get_state"); |
| if (!__dll_pa_context_get_state) return -1; |
| __dll_pa_context_new = (pa_context *(*)(pa_mainloop_api * mainloop, const char * name))dlsym(lib, "pa_context_new"); |
| if (!__dll_pa_context_new) return -1; |
| __dll_pa_context_set_sink_input_mute = (pa_operation*(*)(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata))dlsym(lib, "pa_context_set_sink_input_mute"); |
| if (!__dll_pa_context_set_sink_input_mute) return -1; |
| __dll_pa_context_set_sink_input_volume = (pa_operation*(*)(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata))dlsym(lib, "pa_context_set_sink_input_volume"); |
| if (!__dll_pa_context_set_sink_input_volume) return -1; |
| __dll_pa_context_set_source_mute_by_index = (pa_operation*(*)(pa_context * c, uint32_t idx, int mute, pa_context_success_cb_t cb, void * userdata))dlsym(lib, "pa_context_set_source_mute_by_index"); |
| if (!__dll_pa_context_set_source_mute_by_index) return -1; |
| __dll_pa_context_set_source_volume_by_index = (pa_operation*(*)(pa_context * c, uint32_t idx, const pa_cvolume * volume, pa_context_success_cb_t cb, void * userdata))dlsym(lib, "pa_context_set_source_volume_by_index"); |
| if (!__dll_pa_context_set_source_volume_by_index) return -1; |
| __dll_pa_context_set_state_callback = (void(*)(pa_context * c, pa_context_notify_cb_t cb, void * userdata))dlsym(lib, "pa_context_set_state_callback"); |
| if (!__dll_pa_context_set_state_callback) return -1; |
| __dll_pa_context_unref = (void(*)(pa_context * c))dlsym(lib, "pa_context_unref"); |
| if (!__dll_pa_context_unref) return -1; |
| __dll_pa_cvolume_init = (pa_cvolume*(*)(pa_cvolume * a))dlsym(lib, "pa_cvolume_init"); |
| if (!__dll_pa_cvolume_init) return -1; |
| __dll_pa_operation_unref = (void(*)(pa_operation * o))dlsym(lib, "pa_operation_unref"); |
| if (!__dll_pa_operation_unref) return -1; |
| __dll_pa_stream_connect_playback = (int(*)(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags, const pa_cvolume * volume, pa_stream * sync_stream))dlsym(lib, "pa_stream_connect_playback"); |
| if (!__dll_pa_stream_connect_playback) return -1; |
| __dll_pa_stream_connect_record = (int(*)(pa_stream * s, const char * dev, const pa_buffer_attr * attr, pa_stream_flags_t flags))dlsym(lib, "pa_stream_connect_record"); |
| if (!__dll_pa_stream_connect_record) return -1; |
| __dll_pa_stream_drop = (int(*)(pa_stream * p))dlsym(lib, "pa_stream_drop"); |
| if (!__dll_pa_stream_drop) return -1; |
| __dll_pa_stream_get_device_index = (uint32_t(*)(pa_stream * s))dlsym(lib, "pa_stream_get_device_index"); |
| if (!__dll_pa_stream_get_device_index) return -1; |
| __dll_pa_stream_get_index = (uint32_t(*)(pa_stream * s))dlsym(lib, "pa_stream_get_index"); |
| if (!__dll_pa_stream_get_index) return -1; |
| __dll_pa_stream_get_state = (pa_stream_state_t(*)(pa_stream * p))dlsym(lib, "pa_stream_get_state"); |
| if (!__dll_pa_stream_get_state) return -1; |
| __dll_pa_stream_new = (pa_stream*(*)(pa_context * c, const char * name, const pa_sample_spec * ss, const pa_channel_map * map))dlsym(lib, "pa_stream_new"); |
| if (!__dll_pa_stream_new) return -1; |
| __dll_pa_stream_peek = (int(*)(pa_stream * p, const void ** data, size_t * nbytes))dlsym(lib, "pa_stream_peek"); |
| if (!__dll_pa_stream_peek) return -1; |
| __dll_pa_stream_set_read_callback = (void(*)(pa_stream * p, pa_stream_request_cb_t cb, void * userdata))dlsym(lib, "pa_stream_set_read_callback"); |
| if (!__dll_pa_stream_set_read_callback) return -1; |
| __dll_pa_stream_set_state_callback = (void(*)(pa_stream * s, pa_stream_notify_cb_t cb, void * userdata))dlsym(lib, "pa_stream_set_state_callback"); |
| if (!__dll_pa_stream_set_state_callback) return -1; |
| __dll_pa_stream_set_write_callback = (void(*)(pa_stream * p, pa_stream_request_cb_t cb, void * userdata))dlsym(lib, "pa_stream_set_write_callback"); |
| if (!__dll_pa_stream_set_write_callback) return -1; |
| __dll_pa_stream_unref = (void(*)(pa_stream * s))dlsym(lib, "pa_stream_unref"); |
| if (!__dll_pa_stream_unref) return -1; |
| __dll_pa_stream_writable_size = (size_t(*)(pa_stream * p))dlsym(lib, "pa_stream_writable_size"); |
| if (!__dll_pa_stream_writable_size) return -1; |
| __dll_pa_stream_write = (int(*)(pa_stream * p, const void * data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek))dlsym(lib, "pa_stream_write"); |
| if (!__dll_pa_stream_write) return -1; |
| __dll_pa_strerror = (const char*(*)(int error))dlsym(lib, "pa_strerror"); |
| if (!__dll_pa_strerror) return -1; |
| __dll_pa_threaded_mainloop_free = (void(*)(pa_threaded_mainloop* m))dlsym(lib, "pa_threaded_mainloop_free"); |
| if (!__dll_pa_threaded_mainloop_free) return -1; |
| __dll_pa_threaded_mainloop_get_api = (pa_mainloop_api*(*)(pa_threaded_mainloop* m))dlsym(lib, "pa_threaded_mainloop_get_api"); |
| if (!__dll_pa_threaded_mainloop_get_api) return -1; |
| __dll_pa_threaded_mainloop_lock = (void(*)(pa_threaded_mainloop * m))dlsym(lib, "pa_threaded_mainloop_lock"); |
| if (!__dll_pa_threaded_mainloop_lock) return -1; |
| __dll_pa_threaded_mainloop_new = (pa_threaded_mainloop *(*)())dlsym(lib, "pa_threaded_mainloop_new"); |
| if (!__dll_pa_threaded_mainloop_new) return -1; |
| __dll_pa_threaded_mainloop_signal = (void(*)(pa_threaded_mainloop * m, int wait_for_accept))dlsym(lib, "pa_threaded_mainloop_signal"); |
| if (!__dll_pa_threaded_mainloop_signal) return -1; |
| __dll_pa_threaded_mainloop_start = (int(*)(pa_threaded_mainloop * m))dlsym(lib, "pa_threaded_mainloop_start"); |
| if (!__dll_pa_threaded_mainloop_start) return -1; |
| __dll_pa_threaded_mainloop_stop = (void(*)(pa_threaded_mainloop * m))dlsym(lib, "pa_threaded_mainloop_stop"); |
| if (!__dll_pa_threaded_mainloop_stop) return -1; |
| __dll_pa_threaded_mainloop_unlock = (void(*)(pa_threaded_mainloop * m))dlsym(lib, "pa_threaded_mainloop_unlock"); |
| if (!__dll_pa_threaded_mainloop_unlock) return -1; |
| __dll_pa_threaded_mainloop_wait = (void(*)(pa_threaded_mainloop * m))dlsym(lib, "pa_threaded_mainloop_wait"); |
| if (!__dll_pa_threaded_mainloop_wait) return -1; |
| __dll_pa_usec_to_bytes = (size_t(*)(pa_usec_t t, const pa_sample_spec * spec))dlsym(lib, "pa_usec_to_bytes"); |
| if (!__dll_pa_usec_to_bytes) return -1; |
| return 0; |
| } |