summaryrefslogtreecommitdiffstats
path: root/ext/pulse/pulseutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pulse/pulseutil.h')
-rw-r--r--ext/pulse/pulseutil.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/pulse/pulseutil.h b/ext/pulse/pulseutil.h
index 8700a979..4cafba51 100644
--- a/ext/pulse/pulseutil.h
+++ b/ext/pulse/pulseutil.h
@@ -37,4 +37,24 @@ pa_channel_map *gst_pulse_gst_to_channel_map (pa_channel_map * map,
GstRingBufferSpec *gst_pulse_channel_map_to_gst (const pa_channel_map * map,
GstRingBufferSpec * spec);
+void gst_pulse_cvolume_from_linear(pa_cvolume *v, unsigned channels, gdouble volume);
+
+#if !HAVE_PULSE_0_9_11
+static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
+ return
+ x == PA_CONTEXT_CONNECTING ||
+ x == PA_CONTEXT_AUTHORIZING ||
+ x == PA_CONTEXT_SETTING_NAME ||
+ x == PA_CONTEXT_READY;
+}
+
+/** Return non-zero if the passed state is one of the connected states */
+static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
+ return
+ x == PA_STREAM_CREATING ||
+ x == PA_STREAM_READY;
+}
+
+#endif
+
#endif