Lines Matching defs:sink
37 #include <pulsecore/sink.h>
47 PA_MODULE_DESCRIPTION("Create a network sink which connects via a stream to a remote PulseAudio server");
52 "sink=<name of the remote sink> "
53 "sink_name=<name for the local sink> "
54 "sink_properties=<properties for the local sink> "
92 pa_sink *sink;
130 "sink",
147 /* When the sink becomes suspended (which is the only case where we
150 * played at the time when the sink starts running again. */
223 if (u->sink && PA_UNLIKELY(u->sink->thread_info.rewind_requested))
224 pa_sink_process_rewind(u->sink, 0);
228 PA_SINK_IS_LINKED(u->sink->thread_info.state)) {
236 pa_sink_render_full(u->sink, writable, &memchunk);
298 if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
306 sink_update_requested_latency_cb(u->sink);
322 pa_sink_set_max_request_within_thread(u->sink, bufferattr->tlength);
376 /* if we still don't have a sink, then sink creation failed, and we should
378 if (!u->sink) {
379 pa_log_error("Could not create a sink.");
387 &u->sink->sample_spec,
388 &u->sink->channel_map,
399 requested_latency = pa_sink_get_requested_latency_within_thread(u->sink);
401 requested_latency = u->sink->thread_info.max_latency;
404 bufferattr.tlength = pa_usec_to_bytes(requested_latency, &u->sink->sample_spec);
435 /* now that we're connected, ask the control thread to create a sink for
437 * receive TUNNEL_MESSAGE_SINK_CREATED in response when the sink is
441 pa_assert(!u->sink);
443 pa_log_debug("Asking ctl thread to create sink.");
508 if (!PA_SINK_IS_LINKED(u->sink->thread_info.state)) {
572 /* Creates a sink in the main thread.
576 * sink until the connection is established, because we don't have a sink if
584 /* Create sink */
595 if (!(u->sink = pa_sink_new(u->module->core, &sink_data, PA_SINK_LATENCY | PA_SINK_DYNAMIC_LATENCY | PA_SINK_NETWORK))) {
596 pa_log("Failed to create sink.");
600 u->sink->userdata = u;
601 u->sink->parent.process_msg = sink_process_msg_cb;
602 u->sink->set_state_in_io_thread = sink_set_state_in_io_thread_cb;
603 u->sink->update_requested_latency = sink_update_requested_latency_cb;
604 pa_sink_set_latency_range(u->sink, 0, MAX_LATENCY_USEC);
607 pa_sink_set_asyncmsgq(u->sink, u->thread_mq->inq);
608 pa_sink_set_rtpoll(u->sink, u->rtpoll);
610 pa_sink_put(u->sink);
615 /* tell any interested io threads that the sink they asked for has now been
619 pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), TUNNEL_MESSAGE_SINK_CREATED, u, 0, NULL);
687 u->remote_sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
700 * when module-tunnel-sink-new is used together with module-loopback or
701 * module-combine-sink. Both modules base their asyncmsq on the rtpoll provided
702 * by the sink. module-loopback and combine-sink only work because they call
705 * with module-tunnel-sink-new. */
708 default_sink_name = pa_sprintf_malloc("tunnel-sink-new.%s", remote_server);
727 if (!(u->thread = pa_thread_new("tunnel-sink", thread_func, u))) {
770 if (u->sink)
771 pa_sink_unlink(u->sink);
795 if (u->sink)
796 pa_sink_unref(u->sink);