USA.
***/
-
void pa_ltdl_init(void);
void pa_ltdl_done(void);
snd_mixer_t *mixer;
};
-
struct pa_alsa_mixer_pdata *pa_alsa_mixer_pdata_new(void) {
struct pa_alsa_mixer_pdata *pd;
return 0;
}
-
-
static const snd_mixer_selem_channel_id_t alsa_channel_ids[PA_CHANNEL_POSITION_MAX] = {
[PA_CHANNEL_POSITION_MONO] = SND_MIXER_SCHN_MONO, /* The ALSA name is just an alias! */
return j;
}
-
static pa_alsa_option* option_get(pa_alsa_path *p, const char *section) {
char *en;
const char *on;
pa_alsa_path_dump(p);
}
-
static pa_bool_t options_have_option(pa_alsa_option *options, const char *alsa_name) {
pa_alsa_option *o;
return;
}
-
PA_HASHMAP_FOREACH(p, ps->paths, state) {
if (pa_alsa_path_probe(p, mixer_handle, hctl_handle, m->profile_set->ignore_dB) < 0) {
pa_hashmap_remove(ps->paths, p);
break;
}
-
if (++j > 10) {
#ifdef DEBUG_TIMING
pa_log_debug("Not filling up, because already too many iterations.");
n_bytes = (size_t) n * u->frame_size;
-
#ifdef DEBUG_TIMING
pa_log_debug("avail: %lu", (unsigned long) n_bytes);
#endif
break;
}
-
if (++j > 10) {
#ifdef DEBUG_TIMING
pa_log_debug("Not filling up, because already too many iterations.");
return snd_hctl_find_elem(hctl, id);
}
-
static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t **hctl) {
int err;
} else
dbus_bus_remove_match(pa_dbus_connection_get(u->dbus_connection), filter1, NULL);
-
if (add) {
dbus_bus_add_match(pa_dbus_connection_get(u->dbus_connection), filter2, &e);
return pa_sink_process_msg(o, code, data, offset, chunk);
}
-
/* Called from main context */
static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
struct userdata *u;
pa_sink_attach_within_thread(u->sink);
}
-
/* Called from source I/O thread context. */
static void source_output_detach_cb(pa_source_output *o) {
struct userdata *u;
return FALSE;
}
-
pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
pa_sample_spec *rec_ss, pa_channel_map *rec_map,
pa_sample_spec *play_ss, pa_channel_map *play_map,
goto fail;
}
-
hpf = DEFAULT_HIGH_PASS_FILTER;
if (pa_modargs_get_value_boolean(ma, "high_pass_filter", &hpf) < 0) {
pa_log("Failed to parse high_pass_filter value");
"module-jack-source"
};
-
struct userdata {
pa_module *module;
pa_core *core;
int jack_module_index[JACK_SS_COUNT];
};
-
static void ensure_ports_stopped(struct userdata* u) {
int i;
pa_assert(u);
}
}
-
static pa_bool_t check_service_started(struct userdata* u) {
DBusError error;
DBusMessage *m = NULL, *reply = NULL;
return module ? 0 : -1;
}
-
void pa__done(pa_module*m) {
struct userdata *u;
return -1;
}
-
void pa__done(pa_module *m) {
struct userdata *u;
SUBCOMMAND_EVENT
};
-
/* Forward declarations */
#ifdef DUMP_DATABASE
static void dump_database(struct userdata *);
#endif
static void notify_subscribers(struct userdata *);
-
static void save_time_callback(pa_mainloop_api*a, pa_time_event* e, const struct timeval *t, void *userdata) {
struct userdata *u = userdata;
}
}
-
static void route_sink_input(struct userdata *u, pa_sink_input *si) {
const char *role;
uint32_t role_index, device_index;
return PA_HOOK_OK;
}
-
static pa_hook_result_t sink_put_hook_callback(pa_core *c, PA_GCC_UNUSED pa_sink *sink, struct userdata *u) {
pa_assert(c);
pa_assert(u);
return route_source_outputs(u, source);
}
-
static void apply_entry(struct userdata *u, const char *name, struct entry *e) {
uint32_t idx;
char *n;
}
}
-
#define EXT_VERSION 1
static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connection *c, uint32_t tag, pa_tagstruct *t) {
for (uint32_t j = 0; j < i; ++j)
subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_NEW, p_i[j].index, u);
-
/* We cycle over all the available sources so that they are added to our database if they are not in it yet */
i = 0;
PA_IDXSET_FOREACH(source, m->core->sources, idx) {
SUBCOMMAND_SAVE_FORMATS
};
-
#define ENTRY_VERSION 1
struct entry {
u->save_time_event = pa_core_rttime_new(u->core, pa_rtclock_now() + SAVE_INTERVAL, save_time_callback, u);
}
-
#ifdef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT
/* Some forward declarations */
static pa_bool_t legacy_entry_read(struct userdata *u, pa_datum *data, struct entry **entry, struct perportentry **perportentry);
}
}
-
pa_assert(e);
if (olde) {
entry_free(e);
}
-
pa_assert(ppe);
if (oldppe) {
return pa_sink_process_msg(o, code, data, offset, chunk);
}
-
/* Called from main context */
static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
struct userdata *u;
pa_aupdate_write_end(u->a_H[r_channel]);
pa_xfree(ys);
-
pa_dbus_send_empty_reply(conn, msg);
pa_assert_se((message = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
return -1;
-
}
void pa__done(pa_module *m) {
return 0;
}
-
int pa__init(pa_module*m) {
struct userdata *u;
pa_sample_spec ss;
}
}
-
u->block_size = pa_frame_align(pa_mempool_block_size_max(m->core->mempool), &ss);
/* Create buffers */
Copyright 2013 bct electronic GmbH
Contributor: Stefan Huber <s.huber@bct-electronic.com>
-
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License,
return -1;
-
}
void pa__done(pa_module *m) {
" </interface>" \
"</node>"
-
static const char* const valid_modargs[] = {
"display_name",
NULL
SUBCOMMAND_EVENT
};
-
static struct entry* entry_new(void);
static void entry_free(struct entry *e);
static struct entry *entry_read(struct userdata *u, const char *name);
return PA_HOOK_OK;
}
-
int pa__init(pa_module*m) {
struct userdata *u;
return 0;
-
case SINK_MESSAGE_REMOTE_SUSPEND:
stream_suspend_within_thread(u, !!PA_PTR_TO_UINT(data));
return 0;
-
case SINK_MESSAGE_UPDATE_LATENCY: {
pa_usec_t y;
return 0;
}
-
static int read_formats(struct userdata *u, pa_tagstruct *t) {
uint8_t n_formats;
pa_format_info *format;
}
-
/* Called from I/O thread context */
static void sink_request_rewind_cb(pa_sink *s) {
struct userdata *u;
pa_source_post(u->source, chunk);
}
-
}
/* Called from input thread context */
}
}
-
int pa__init(pa_module*m) {
struct userdata *u;
pa_sample_spec ss;
pa_log_debug("trigger: %i", enable_bits);
-
if (u->use_mmap) {
if (!quick)
#define RAOP_PORT 5000
-
struct pa_raop_client {
pa_core *core;
char *host;
return c;
}
-
void pa_raop_client_free(pa_raop_client* c) {
pa_assert(c);
pa_xfree(c);
}
-
int pa_raop_connect(pa_raop_client* c) {
char *sci;
struct {
return pa_rtsp_connect(c->rtsp);
}
-
int pa_raop_flush(pa_raop_client* c) {
pa_assert(c);
return 0;
}
-
int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume) {
int rv;
double db;
return rv;
}
-
int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded) {
uint16_t len;
size_t bufmax;
return 0;
}
-
void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata) {
pa_assert(c);
return c;
}
-
void pa_rtsp_client_free(pa_rtsp_client* c) {
pa_assert(c);
pa_xfree(c);
}
-
static void headers_read(pa_rtsp_client *c) {
char* token;
char delimiters[] = ";";
c->callback(c, c->state, c->response_headers, c->userdata);
}
-
static void line_callback(pa_ioline *line, const char *s, void *userdata) {
char *delimpos;
char *s2, *s2p;
pa_xfree(s2);
}
-
static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata) {
pa_rtsp_client *c = userdata;
union {
c->ioline = NULL;
}
-
const char* pa_rtsp_localip(pa_rtsp_client* c) {
pa_assert(c);
return 0;
}
-
int pa_rtsp_announce(pa_rtsp_client *c, const char* sdp) {
pa_assert(c);
if (!sdp)
return rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL);
}
-
int pa_rtsp_setup(pa_rtsp_client* c) {
pa_headerlist* headers;
int rv;
return rv;
}
-
int pa_rtsp_record(pa_rtsp_client* c, uint16_t* seq, uint32_t* rtptime) {
pa_headerlist* headers;
int rv;
return rv;
}
-
int pa_rtsp_teardown(pa_rtsp_client *c) {
pa_assert(c);
return rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL);
}
-
int pa_rtsp_setparameter(pa_rtsp_client *c, const char* param) {
pa_assert(c);
if (!param)
return rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL);
}
-
int pa_rtsp_flush(pa_rtsp_client *c, uint16_t seq, uint32_t rtptime) {
pa_headerlist* headers;
int rv;
USA.
***/
-
#include <pulse/proplist.h>
int pa_udev_get_info(int card_idx, pa_proplist *p);
static int process_render(struct userdata *u) {
pa_assert(u);
-
if (u->memchunk.length <= 0)
pa_sink_render(u->sink, ioring->usable_buffer_space, &u->memchunk);
-
pa_assert(u->memchunk.length > 0);
xc_evtchn_notify(xce, xen_evtchn_port);
}
-
static int alloc_gref(struct ioctl_gntalloc_alloc_gref *gref_, void **addr) {
int alloc_fd, dev_fd, rv;
return xs_read(xsh, 0, keybuf, &len);
}
-
static int publish_spec(pa_sample_spec *sample_spec) {
/* Publish spec and set state to XenbusStateInitWait*/
int ret;
return ret;
}
-
static int read_backend_default_spec(pa_sample_spec *sample_spec) {
/* Read spec from backend */
char *out;
return NULL;
}
-
default:
pa_assert_not_reached();
}
pa_context_unref(c);
}
-
void pa_command_client_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_context *c = userdata;
pa_proplist *pl = NULL;
pa_assert(PA_REFCNT_VALUE(c) >= 1);
pa_assert(c->mainloop);
-
if (usec == PA_USEC_INVALID)
c->mainloop->time_restart(e, NULL);
else {
return -pa_context_set_error((context), (error)); \
} while(FALSE)
-
#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) \
do { \
if (!(expression)) { \
cb(o->context, idx, o->userdata);
}
-
finish:
pa_operation_done(o);
pa_operation_unref(o);
pa_assert(m->defer_events_please_scan == 0);
}
-
void pa_mainloop_free(pa_mainloop *m) {
pa_assert(m);
pa_operation_unref(o);
}
-
pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_context_success_cb_t cb, void *userdata) {
pa_operation *o;
pa_tagstruct *t;
PA_STREAM_RELATIVE_VOLUME|
PA_STREAM_PASSTHROUGH)), PA_ERR_INVALID);
-
PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED);
PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED);
PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
goto finish;
}
-
if (!pa_tagstruct_eof(t)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
pa_operation_unref(o);
}
-
pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata) {
pa_operation *o;
pa_tagstruct *t;
pa_operation_unref(o);
}
-
pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata) {
pa_operation *o;
pa_tagstruct *t;
#ifndef fooarpa_inethfoo
#define fooarpa_inethfoo
-
#if defined(HAVE_ARPA_INET_H)
#include <arpa/inet.h>
#endif
-
#endif
return -1;
}
-
return pa_play_file(sink, fname, NULL);
}
cmn = pa_channel_map_to_pretty_name(&sink->channel_map);
-
pa_strbuf_printf(
s,
" %c index: %u\n"
return pa_strbuf_tostring_free(s);
}
-
char *pa_source_output_list_to_string(pa_core *c) {
pa_strbuf *s;
pa_source_output *o;
} else
volume_str = pa_xstrdup("n/a");
-
pa_strbuf_printf(
s,
" index: %u\n"
#include "database.h"
-
typedef struct simple_data {
char *filename;
char *tmp_filename;
pa_xfree(p);
}
-
pa_device_port *pa_device_port_new(pa_core *c, pa_device_port_new_data *data, size_t extra) {
pa_device_port *p;
/* Most of the following is blatantly stolen from esound. */
-
/* path and name of the default EsounD domain socket */
#define ESD_UNIX_SOCKET_DIR "/tmp/.esd"
#define ESD_UNIX_SOCKET_NAME "/tmp/.esd/socket"
#define ESD_VOLUME_BASE (256)
-
/*************************************/
/* what can we do to/with the EsounD */
enum esd_proto {
/* server and the client match; if it's SWAP_ENDIAN_KEY, swap data */
#define ESD_SWAP_ENDIAN_KEY (PA_UINT32_SWAP(ESD_ENDIAN_KEY))
-
#endif
int pa_fdsem_before_poll(pa_fdsem *f);
int pa_fdsem_after_poll(pa_fdsem *f);
-
#endif
typedef struct pa_memblockq pa_memblockq;
-
/* Parameters:
- name: name for debugging purposes
} \
struct __stupid_useless_struct_to_allow_trailing_semicolon
-
#endif
short int revents; /* Types of events that actually occurred. */
};
-
/* Poll the file descriptors described by the NFDS structures starting at
FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for
an event to occur; if TIMEOUT is -1, block until an event occurs.
unsigned n_signals;
} pa_dbus_interface_info;
-
/* The following functions may only be called from the main thread. */
/* Registers the given interface to the given object path. It doesn't matter
return pa_sink_input_process_msg(o, code, userdata, offset, chunk);
}
-
static bool handle_input_underrun(playback_stream *s, bool force) {
bool send_drain;
return handle_input_underrun(s, true);
}
-
/* Called from thread context */
static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
playback_stream *s;
}
}
-
if (!pa_tagstruct_eof(t)) {
protocol_error(c);
goto finish;
}
}
-
/* default C implementation */
static pa_init_remap_func_t remap_func = init_remap_c;
#define _Y do { } while(0)
#endif
-
struct pa_shmasyncq {
pa_fdsem *read_fdsem, *write_fdsem;
pa_shmasyncq_data *data;
/* Similar to pa_asyncq, but stores data in a shared memory segment */
-
struct pa_shmasyncq_data {
unsigned n_elements;
size_t element_size;
return false;
}
-
/* Called from thread context */
void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec */) {
size_t lbq;
pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i);
bool pa_sink_input_process_underrun(pa_sink_input *i);
-
pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret);
#define pa_sink_input_assert_io_context(s) \
pa_xfree(data->active_port);
}
-
/* Called from main context */
static void reset_callbacks(pa_sink *s) {
pa_assert(s);
break;
}
-
if (!pa_sample_spec_valid(ss))
return -1;
int pa_sndfile_format_from_string(const char *name) {
int i, count = 0;
-
if (!name[0])
return -1;
return pa_socket_client_new_sockaddr(m, (struct sockaddr*) &sa, sizeof(sa));
}
-
pa_socket_client* pa_socket_client_new_unix(pa_mainloop_api *m, const char *filename) {
#ifdef HAVE_SYS_UN_H
struct sockaddr_un sa;
#endif /* HAVE_SYS_UN_H */
-
pa_bool_t pa_socket_address_is_local(const struct sockaddr *sa) {
pa_assert(sa);
return ret;
}
-
/* Called from the main thread */
/* Gets the list of formats supported by the source. The members and idxset must
* be freed by the caller. */
" por %%xmm4, "#s1" \n\t" /* .. | l h | */ \
" por %%xmm5, "#s2" \n\t"
-
static int channel_overread_table[8] = {8,8,8,12,8,10,12,14};
static void pa_volume_s16ne_sse2(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
x = ((x)+1) % HISTORY_MAX; \
} while(FALSE)
-
static void drop_old(pa_smoother *s, pa_usec_t x) {
/* Drop items from history which are too old, but make sure to
pa_assert(name);
pa_assert(p);
-
xs = screen_of_display(xcb, screen);
/*
* Also try and get the settings from the first screen.
return result;
}
-
START_TEST (mixer_path_test) {
DIR *dir;
struct dirent *ent;
}
}
-
#define SAMPLES 1028
#define TIMES 1000
#define TIMES2 100
#include <pulsecore/sample-util.h>
#include <pulsecore/mix.h>
-
/* PA_SAMPLE_U8 */
static const uint8_t u8_result[3][10] = {
{ 0x00, 0xff, 0x7f, 0x80, 0x9f, 0x3f, 0x01, 0xf0, 0x20, 0x21 },
pa_resampler_free(r);
}
-
pa_mempool_free(pool);
return 0;
goto quit;
}
-
if (r >= 0)
break;
printf("\n");
nl = TRUE;
-
pa_snprintf(t, sizeof(t), "%u", i->owner_module);
pa_snprintf(k, sizeof(k), "%u", i->client);
mainloop_api->quit(mainloop_api, ret);
}
-
static void context_drain_complete(pa_context *c, void *userdata) {
pa_context_disconnect(c);
}
#include <pulsecore/native-common.h>
#include <pulsecore/x11prop.h>
-
int main(int argc, char *argv[]) {
const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE;
int c, ret = 1, screen = 0;