mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Revert "Fix mono playback. This was broken with commit eaad4c32eeeb83302632aba887d51d2eccb55eed."
Spotify doesn't work with this fix anymore, gstreamer throws `gst_segment_to_stream_time: assertion 'segment->format == format' failed`. Using `audio/*` for caps doesn't work either, the channes property is ignored. An `if (url_.scheme == "spotify")` would work, but maybe there is a more elegant solution. This reverts commit 8799222d64ec7836f43212105cafc06e77bb1fb3.
This commit is contained in:
parent
8799222d64
commit
4c9f7e6a5e
@ -360,24 +360,12 @@ bool GstEnginePipeline::Init() {
|
||||
g_object_set(G_OBJECT(queue_), "use-buffering", true, nullptr);
|
||||
}
|
||||
|
||||
gst_element_link(queue_, audioconvert_);
|
||||
|
||||
// Link audioconvert_ and conver_sink with special caps. This is needed for mono playback.
|
||||
GstCaps* caps32 = gst_caps_new_simple("audio/x-raw",
|
||||
"format", G_TYPE_STRING, "F32LE",
|
||||
nullptr);
|
||||
if (mono_playback_) {
|
||||
gst_caps_set_simple(caps32, "channels", G_TYPE_INT, 1, nullptr);
|
||||
}
|
||||
|
||||
gst_element_link_filtered(audioconvert_, convert_sink, caps32);
|
||||
gst_caps_unref(caps32);
|
||||
gst_element_link_many(queue_, audioconvert_, convert_sink, nullptr);
|
||||
|
||||
// Link the elements with special caps
|
||||
// The scope path through the tee gets 16-bit ints.
|
||||
GstCaps* caps16 = gst_caps_new_simple("audio/x-raw",
|
||||
"format", G_TYPE_STRING, "S16LE",
|
||||
nullptr);
|
||||
GstCaps* caps16 = gst_caps_new_simple("audio/x-raw", "format", G_TYPE_STRING,
|
||||
"S16LE", NULL);
|
||||
gst_element_link_filtered(probe_converter, probe_sink, caps16);
|
||||
gst_caps_unref(caps16);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user