Florian Schulze - Sun Aug 19 14:55:37 PDT 2001
authorSam Lantinga
Sun, 19 Aug 2001 22:17:46 +0000
changeset 9906246f9170dc
parent 98 f00eb57224a5
child 100 110d1c8470fa
Florian Schulze - Sun Aug 19 14:55:37 PDT 2001
* Added native MIDI music support on Windows
Makefile.am
configure.in
native_midi/native_midi_win32.c
     1.1 --- a/Makefile.am	Sun Aug 19 21:52:48 2001 +0000
     1.2 +++ b/Makefile.am	Sun Aug 19 22:17:46 2001 +0000
     1.3 @@ -3,7 +3,7 @@
     1.4  lib_LTLIBRARIES = libSDL_mixer.la
     1.5  
     1.6  SUBDIRS = @MUSIC_SUBDIRS@
     1.7 -DIST_SUBIDRS = mikmod timidity
     1.8 +DIST_SUBIDRS = mikmod timidity native_midi
     1.9  
    1.10  libSDL_mixerincludedir = $(includedir)/SDL
    1.11  libSDL_mixerinclude_HEADERS =	\
    1.12 @@ -31,6 +31,11 @@
    1.13  else
    1.14  TIMIDITY_LIB =
    1.15  endif
    1.16 +if USE_NATIVE_MIDI
    1.17 +NATIVE_MIDI_LIB = native_midi/libnativemidi.la
    1.18 +else
    1.19 +NATIVE_MIDI_LIB =
    1.20 +endif
    1.21  
    1.22  EXTRA_DIST =			\
    1.23  	CHANGES			\
    1.24 @@ -45,7 +50,7 @@
    1.25  libSDL_mixer_la_LDFLAGS = 		\
    1.26  	-release $(LT_RELEASE)	\
    1.27  	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    1.28 -libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB)
    1.29 +libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB) $(NATIVE_MIDI_LIB)
    1.30  
    1.31  bin_PROGRAMS = playwave playmus
    1.32  
     2.1 --- a/configure.in	Sun Aug 19 21:52:48 2001 +0000
     2.2 +++ b/configure.in	Sun Aug 19 22:17:46 2001 +0000
     2.3 @@ -114,6 +114,22 @@
     2.4  if test x$enable_music_midi = xyes; then
     2.5      CFLAGS="$CFLAGS -DMID_MUSIC -I\$(top_srcdir)/timidity"
     2.6      MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
     2.7 +    AC_ARG_ENABLE(music-native-midi,
     2.8 +[  --enable-music-native-midi  enable native MIDI music output [default=yes]],
     2.9 +                  , enable_music_native_midi=yes)
    2.10 +    if test x$enable_music_native_midi = xyes; then
    2.11 +        use_music_native_midi=no
    2.12 +        case "$target" in
    2.13 +            *-*-cygwin* | *-*-mingw32*)
    2.14 +                use_music_native_midi=yes
    2.15 +                LIBS="$LIBS -lwinmm"
    2.16 +                ;;
    2.17 +        esac
    2.18 +        if test x$use_music_native_midi = xyes; then
    2.19 +            CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi"
    2.20 +            MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi"
    2.21 +        fi
    2.22 +    fi
    2.23  fi
    2.24  AC_ARG_ENABLE(music-ogg,
    2.25  [  --enable-music-ogg      enable Ogg Vorbis music [default=yes]],
    2.26 @@ -149,11 +165,13 @@
    2.27  AC_SUBST(MUSIC_SUBDIRS)
    2.28  AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes)
    2.29  AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_midi = xyes)
    2.30 +AM_CONDITIONAL(USE_NATIVE_MIDI, test x$use_music_native_midi = xyes)
    2.31  
    2.32  # Finally create all the generated files
    2.33  AC_OUTPUT([
    2.34  Makefile
    2.35  mikmod/Makefile
    2.36  timidity/Makefile
    2.37 +native_midi/Makefile
    2.38  SDL_mixer.spec
    2.39  ])
     3.1 --- a/native_midi/native_midi_win32.c	Sun Aug 19 21:52:48 2001 +0000
     3.2 +++ b/native_midi/native_midi_win32.c	Sun Aug 19 22:17:46 2001 +0000
     3.3 @@ -20,6 +20,7 @@
     3.4      florian.proff.schulze@gmx.net
     3.5  */
     3.6  
     3.7 +#ifdef _WIN32
     3.8  /* everything below is currently one very big bad hack ;) Proff */
     3.9  
    3.10  #include <stdio.h>
    3.11 @@ -459,3 +460,4 @@
    3.12    return "";
    3.13  }
    3.14  
    3.15 +#endif /* Windows native MIDI support */