Skip to content

Commit

Permalink
Florian Schulze - Sun Aug 19 14:55:37 PDT 2001
Browse files Browse the repository at this point in the history
 * Added native MIDI music support on Windows
  • Loading branch information
slouken committed Aug 19, 2001
1 parent f04d92a commit 72cb36e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile.am
Expand Up @@ -3,7 +3,7 @@
lib_LTLIBRARIES = libSDL_mixer.la

SUBDIRS = @MUSIC_SUBDIRS@
DIST_SUBIDRS = mikmod timidity
DIST_SUBIDRS = mikmod timidity native_midi

libSDL_mixerincludedir = $(includedir)/SDL
libSDL_mixerinclude_HEADERS = \
Expand Down Expand Up @@ -31,6 +31,11 @@ TIMIDITY_LIB = timidity/libtimidity.la
else
TIMIDITY_LIB =
endif
if USE_NATIVE_MIDI
NATIVE_MIDI_LIB = native_midi/libnativemidi.la
else
NATIVE_MIDI_LIB =
endif

EXTRA_DIST = \
CHANGES \
Expand All @@ -45,7 +50,7 @@ EXTRA_DIST = \
libSDL_mixer_la_LDFLAGS = \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB)
libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB) $(NATIVE_MIDI_LIB)

bin_PROGRAMS = playwave playmus

Expand Down
18 changes: 18 additions & 0 deletions configure.in
Expand Up @@ -114,6 +114,22 @@ AC_ARG_ENABLE(music-midi,
if test x$enable_music_midi = xyes; then
CFLAGS="$CFLAGS -DMID_MUSIC -I\$(top_srcdir)/timidity"
MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity"
AC_ARG_ENABLE(music-native-midi,
[ --enable-music-native-midi enable native MIDI music output [default=yes]],
, enable_music_native_midi=yes)
if test x$enable_music_native_midi = xyes; then
use_music_native_midi=no
case "$target" in
*-*-cygwin* | *-*-mingw32*)
use_music_native_midi=yes
LIBS="$LIBS -lwinmm"
;;
esac
if test x$use_music_native_midi = xyes; then
CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi"
MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi"
fi
fi
fi
AC_ARG_ENABLE(music-ogg,
[ --enable-music-ogg enable Ogg Vorbis music [default=yes]],
Expand Down Expand Up @@ -149,11 +165,13 @@ dnl Add Makefile conditionals
AC_SUBST(MUSIC_SUBDIRS)
AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes)
AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_midi = xyes)
AM_CONDITIONAL(USE_NATIVE_MIDI, test x$use_music_native_midi = xyes)

# Finally create all the generated files
AC_OUTPUT([
Makefile
mikmod/Makefile
timidity/Makefile
native_midi/Makefile
SDL_mixer.spec
])
2 changes: 2 additions & 0 deletions native_midi/native_midi_win32.c
Expand Up @@ -20,6 +20,7 @@
florian.proff.schulze@gmx.net
*/

#ifdef _WIN32
/* everything below is currently one very big bad hack ;) Proff */

#include <stdio.h>
Expand Down Expand Up @@ -459,3 +460,4 @@ char *native_midi_error()
return "";
}

#endif /* Windows native MIDI support */

0 comments on commit 72cb36e

Please sign in to comment.