From 7e104f7167ac73748f1ffce8a650a2e6b07ab41d Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 9 Dec 2014 21:28:02 +0100 Subject: [PATCH] Fix delay test --- .../Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs | 4 ++-- Vocaluxe/Screens/CScreenOptionsRecord.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs index ca0d602d..c66ba54b 100644 --- a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs +++ b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudioStream.cs @@ -175,7 +175,7 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp // Passing CLOCK_TIME_NONE here causes the pipeline to block for a long time so with // prescan enabled the pipeline will wait 500ms for stream to initialize and then continue // if it takes more than 500ms, duration queries will be performed asynchronously - Message msg = _Element.Bus.TimedPopFiltered(prescan ? ulong.MaxValue : 0L, MessageType.AsyncDone | MessageType.Error); + Message msg = _Element.Bus.TimedPopFiltered(prescan ? ulong.MaxValue : 0L, MessageType.AsyncDone | MessageType.Error | MessageType.DurationChanged); if (!_OnMessage(msg)) { _Dispose(true); @@ -237,7 +237,7 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp private bool _OnMessage(Message msg) { - if (msg.Handle == IntPtr.Zero) + if (msg == null || msg.Handle == IntPtr.Zero) return true; switch (msg.Type) { diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index bcf3e902..df51de82 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -65,7 +65,7 @@ namespace Vocaluxe.Screens public override EMusicType CurrentMusicType { - get { return EMusicType.None; } + get { return EMusicType.Game; } } public override void Init()