1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-30 19:15:08 +01:00

Nicer 'if' block for setting monoplayback

This commit is contained in:
Arnaud Bienner 2012-05-21 02:07:00 +02:00
parent 4caa3fc17e
commit 7f56833125

View File

@ -333,8 +333,10 @@ bool GstEnginePipeline::Init() {
NULL);
GstCaps* caps32 = gst_caps_new_simple ("audio/x-raw-float",
"width", G_TYPE_INT, 32,
!mono_playback_ ? NULL : "channels", G_TYPE_INT, 1,
NULL);
if (mono_playback_) {
gst_caps_set_simple(caps32, "channels", G_TYPE_INT, 1, NULL);
}
// Link the elements with special caps
gst_element_link_filtered(probe_converter, probe_sink, caps16);