#include <pulsecore/msgobject.h>
#include <pulsecore/rtpoll.h>
#include <pulsecore/card.h>
+#include <pulsecore/device-port.h>
#include <pulsecore/queue.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/source-output.h>
pa_hashmap *ports;
pa_device_port *active_port;
+ pa_atomic_t mixer_dirty;
+
+ /* The latency offset is inherited from the currently active port */
+ pa_usec_t latency_offset;
unsigned priority;
* thread context. */
pa_source_cb_t update_requested_latency; /* may be NULL */
- /* Called whenever the port shall be changed. Called from main
- * thread. */
+ /* Called whenever the port shall be changed. Called from IO
+ * thread if deferred volumes are enabled, and main thread otherwise. */
int (*set_port)(pa_source *s, pa_device_port *port); /*ditto */
/* Called to get the list of formats supported by the source, sorted
pa_usec_t fixed_latency; /* for sources with PA_SOURCE_DYNAMIC_LATENCY this is 0 */
+ /* This latency offset is a direct copy from s->latency_offset */
+ pa_usec_t latency_offset;
+
/* Delayed volume change events are queued here. The events
* are stored in expiration order. The one expiring next is in
* the head of the list. */
PA_SOURCE_MESSAGE_SET_MAX_REWIND,
PA_SOURCE_MESSAGE_SET_PORT,
PA_SOURCE_MESSAGE_UPDATE_VOLUME_AND_MUTE,
+ PA_SOURCE_MESSAGE_SET_LATENCY_OFFSET,
PA_SOURCE_MESSAGE_MAX
} pa_source_message_t;
/*** May be called by everyone, from main context */
+void pa_source_set_latency_offset(pa_source *s, pa_usec_t offset);
+
/* The returned value is supposed to be in the time domain of the sound card! */
pa_usec_t pa_source_get_latency(pa_source *s);
pa_usec_t pa_source_get_requested_latency(pa_source *s);
pa_bool_t pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p);
int pa_source_set_port(pa_source *s, const char *name, pa_bool_t save);
+void pa_source_set_mixer_dirty(pa_source *s, pa_bool_t is_dirty);
+
pa_bool_t pa_source_update_rate(pa_source *s, uint32_t rate, pa_bool_t passthrough);
unsigned pa_source_linked_by(pa_source *s); /* Number of connected streams */