From db41034ad9a858c322f3ff961bf501cf4477fe9d Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Thu, 13 Sep 2018 13:27:42 -0400
Subject: [PATCH] Block song position changes on GME because unstable

---
 src/sdl/mixer_sound.c | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c
index 41248245fb..448c2faa69 100644
--- a/src/sdl/mixer_sound.c
+++ b/src/sdl/mixer_sound.c
@@ -774,23 +774,25 @@ boolean I_SetSongPosition(UINT32 position)
 #ifdef HAVE_LIBGME
 	if (gme)
 	{
+		// this is unstable, so fail silently
+		return true;
 		// this isn't required technically, but GME thread-locks for a second
 		// if you seek too high from the counter
-		length = I_GetSongLength();
-		if (length)
-			position = get_adjusted_position(position);
-
-		SDL_LockAudio();
-		gme_err_t gme_e = gme_seek(gme, position);
-		SDL_UnlockAudio();
-
-		if (gme_e != NULL)
-		{
-			CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
-			return false;
-		}
-		else
-			return true;
+		// length = I_GetSongLength();
+		// if (length)
+		// 	position = get_adjusted_position(position);
+
+		// SDL_LockAudio();
+		// gme_err_t gme_e = gme_seek(gme, position);
+		// SDL_UnlockAudio();
+
+		// if (gme_e != NULL)
+		// {
+		// 	CONS_Alert(CONS_ERROR, "GME error: %s\n", gme_e);
+		// 	return false;
+		// }
+		// else
+		// 	return true;
 	}
 	else
 #endif
-- 
GitLab