summaryrefslogtreecommitdiffstats
path: root/src/pulsesink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsesink.c')
-rw-r--r--src/pulsesink.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/pulsesink.c b/src/pulsesink.c
index 295811e..d7039a7 100644
--- a/src/pulsesink.c
+++ b/src/pulsesink.c
@@ -83,16 +83,24 @@ static void gst_pulsesink_base_init(gpointer g_class) {
"rate = (int) [ 1, MAX ], "
"channels = (int) [ 1, 16 ];"
- "audio/x-raw-int, "
- "signed = (boolean) FALSE, "
- "width = (int) 8, "
- "depth = (int) 8, "
+ "audio/x-raw-float, "
+ "endianness = (int) { " ENDIANNESS " }, "
+ "width = (int) 32, "
"rate = (int) [ 1, MAX ], "
"channels = (int) [ 1, 16 ];"
- "audio/x-raw-float, "
+ "audio/x-raw-int, "
"endianness = (int) { " ENDIANNESS " }, "
+ "signed = (boolean) TRUE, "
"width = (int) 32, "
+ "depth = (int) 32, "
+ "rate = (int) [ 1, MAX ], "
+ "channels = (int) [ 1, 16 ];"
+
+ "audio/x-raw-int, "
+ "signed = (boolean) FALSE, "
+ "width = (int) 8, "
+ "depth = (int) 8, "
"rate = (int) [ 1, MAX ], "
"channels = (int) [ 1, 16 ];"
@@ -355,11 +363,9 @@ static gboolean gst_pulsesink_close(GstAudioSink *asink) {
return TRUE;
}
-
static gboolean gst_pulsesink_prepare(GstAudioSink *asink, GstRingBufferSpec *spec) {
pa_buffer_attr buf_attr;
pa_channel_map channel_map;
-
GstPulseSink *pulsesink = GST_PULSESINK(asink);
if (!gst_pulse_fill_sample_spec(spec, &pulsesink->sample_spec)) {
@@ -374,7 +380,11 @@ static gboolean gst_pulsesink_prepare(GstAudioSink *asink, GstRingBufferSpec *sp
goto unlock_and_fail;
}
- if (!(pulsesink->stream = pa_stream_new(pulsesink->context, pulsesink->stream_name ? pulsesink->stream_name : "Playback Stream", &pulsesink->sample_spec, gst_pulse_gst_to_channel_map(&channel_map,spec)))) {
+ if (!(pulsesink->stream = pa_stream_new(
+ pulsesink->context,
+ pulsesink->stream_name ? pulsesink->stream_name : "Playback Stream",
+ &pulsesink->sample_spec,
+ gst_pulse_gst_to_channel_map(&channel_map, spec)))) {
GST_ELEMENT_ERROR(pulsesink, RESOURCE, FAILED, ("Failed to create stream: %s", pa_strerror(pa_context_errno(pulsesink->context))), (NULL));
goto unlock_and_fail;
}