From 0f5b7e6630c3e350977eb435ee6ce9171a1f8107 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Tue, 18 Sep 2018 14:08:31 -0400
Subject: [PATCH] MusicPlus core: Win32 DD compile fixes

---
 src/win32/win_snd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/win32/win_snd.c b/src/win32/win_snd.c
index 85cae2ed1..543de3231 100644
--- a/src/win32/win_snd.c
+++ b/src/win32/win_snd.c
@@ -812,10 +812,10 @@ void I_SetMusicVolume(UINT8 volume)
 
 UINT32 I_GetSongLength()
 {
-	if (midimode)
+	if (I_SongType() == MU_MID)
 		return 0;
 	UINT32 length;
-	e = FMOD_Sound_GetLength(music_stream, length, FMOD_TIMEUNIT_MS);
+	FMR_MUSIC(FMOD_Sound_GetLength(music_stream, &length, FMOD_TIMEUNIT_MS));
 	return length;
 }
 
@@ -832,7 +832,7 @@ UINT32 I_GetSongLoopPoint(void)
 
 boolean I_SetSongPosition(UINT32 position)
 {
-	if(midimode)
+	if(I_SongType() == MU_MID)
 		// Dummy out; this works for some MIDI, but not others.
 		// SDL does not support this for any MIDI.
 		return false;
@@ -852,7 +852,7 @@ boolean I_SetSongPosition(UINT32 position)
 
 UINT32 I_GetSongPosition(void)
 {
-	if(midimode)
+	if(I_SongType() == MU_MID)
 		// Dummy out because unsupported, even though FMOD does this correctly.
 		return 0;
 	FMOD_RESULT e;
@@ -922,7 +922,7 @@ void I_StopFadingSong(void)
 {
 }
 
-boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
+boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
 {
 	(void)target_volume;
 	(void)source_volume;
@@ -930,7 +930,7 @@ boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms
 	return false;
 }
 
-boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
+boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
 {
 	(void)target_volume;
 	(void)ms;