summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomislav Tustonić <ttustonic@outlook.com>2018-10-12 00:40:38 +0200
committerThibault Saunier <tsaunier@igalia.com>2018-10-12 09:20:04 -0300
commitc58cfe4b6e27f02869f964558373e4644e181429 (patch)
treec8695abd58f260e46d457dbeabad9f574f85aa2a
parent3acb989f4082d92bf4214e4222f61094543a2768 (diff)
A bug in PlaybackTutorial7.cs
A custom sink is set after starting playback and the equalizer has no effect. https://bugzilla.gnome.org/show_bug.cgi?id=796690
-rw-r--r--samples/PlaybackTutorial7.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/samples/PlaybackTutorial7.cs b/samples/PlaybackTutorial7.cs
index c717602..f268fc2 100644
--- a/samples/PlaybackTutorial7.cs
+++ b/samples/PlaybackTutorial7.cs
@@ -36,26 +36,25 @@ namespace GstreamerSharp
ghostPad.SetActive (true);
bin.AddPad (ghostPad);
- // Start playing
+ // Configure the equalizer
+ equalizer["band1"] = (double)-24.0;
+ equalizer["band2"] = (double)-24.0;
+
+ // Set playbin's audio sink to be our sink bin
+ pipeline["audio-sink"] = bin;
+
+ // Start playing
var ret = pipeline.SetState (State.Playing);
if (ret == StateChangeReturn.Failure) {
Console.WriteLine ("Unable to set the pipeline to the playing state.");
return;
}
-
- // Configure the equalizer
- equalizer ["band1"] = (double)-24.0;
- equalizer ["band2"] = (double)-24.0;
-
- // Set playbin's audio sink to be our sink bin
- pipeline ["audio-sink"] = bin;
-
- // Wait until error or EOS
+ // Wait until error or EOS
var bus = pipeline.Bus;
var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Error | MessageType.Eos);
- // Free resources
+ // Free resources
pipeline.SetState (State.Null);
}
}