Skip to content

Commit

Permalink
WinCE (PocketPC) patches from Tyler.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 2, 2002
1 parent 6eee94a commit 9841f7b
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 42 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,14 @@
* CHANGELOG.
*/

07012002 - Fixed configure.in to work around bug in older autoconfs. Started
merging Tyler's WinCE (PocketPC) port. Added checks for assert.h
and signal.h to configure.in/config.h.in, and #if HAVE_*_H checks
where appropriate in the code. Moved #include <assert.h> (along
with the HAVE_ASSERT_H check) to SDL_sound_internal.h, and removed
unnecessary #includes from the individual source files. Added
"md_reverb = 1;" to MIKMOD_init(). Modplug got some WinCE-specific
setting tweaks.
06292002 - More altcvt fixes from Frank Ranostaj...mostly working now.
06252002 - More altcvt fixes from Frank Ranostaj.
06132002 - Patch from Torbj�rn to fix stereo AIFF files.
Expand Down
1 change: 1 addition & 0 deletions CREDITS
Expand Up @@ -32,6 +32,7 @@ MacOS X support:
Max Horn

win32 support,
PocketPC support,
other fixes:
Tyler Montbriand

Expand Down
1 change: 0 additions & 1 deletion SDL_sound.c
Expand Up @@ -35,7 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>

#include "SDL.h"
Expand Down
19 changes: 19 additions & 0 deletions SDL_sound_internal.h
Expand Up @@ -45,6 +45,25 @@
#define SNDDBG(x)
#endif

#if HAVE_ASSERT_H
# include <assert.h>
#endif

#ifdef _WIN32_WCE
extern char *strrchr(const char *s, int c);
# ifdef NDEBUG
# define assert(x)
# else
# define assert(x) if(!x) { fprintf(stderr,"Assertion failed in %s, line %s.\n",__FILE__,__LINE__); fclose(stderr); fclose(stdout); exit(1); }
# endif
#endif


#if (!defined assert) /* if all else fails. */
# define assert(x)
#endif


typedef struct __SOUND_DECODERFUNCTIONS__
{
/* This is a block of info about your decoder. See SDL_sound.h. */
Expand Down
19 changes: 13 additions & 6 deletions configure.in
Expand Up @@ -54,7 +54,7 @@ dnl ---------------------------------------------------------------------
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL


dnl ---------------------------------------------------------------------
Expand Down Expand Up @@ -86,7 +86,7 @@ dnl Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
Expand Down Expand Up @@ -150,25 +150,31 @@ if test x$enable_midi = xyes; then
AC_DEFINE(SOUND_SUPPORTS_MIDI)
fi

dnl Hooray for shitty autoconf bugs!
x="C__stream_decoder_new"
flcsym="FLA$x"
dnl Check for libFLAC
AC_ARG_ENABLE(flac,
[ --enable-flac enable FLAC decoding via libFLAC [default=yes]],
, enable_flac=yes)
if test x$enable_flac = xyes; then
AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, have_flac_lib=yes)
AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes)
if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
LIBS="$LIBS -lFLAC"
AC_DEFINE(SOUND_SUPPORTS_FLAC)
fi
fi

dnl Hooray for shitty autoconf bugs!
x="C__seekable_stream_decoder_new"
flcsym="FLA$x"
dnl Check if libFLAC is recent enough for a seekable decoder
AC_ARG_ENABLE(seekable-flac,
[ --enable-seekable-flac enable the seekable decoder [default=yes]],
, enable_seekable_flac=yes)
if test x$enable_seekable_flac = xyes; then
AC_CHECK_LIB(FLAC, FLAC__seekable_stream_decoder_new, have_seekable_flac_lib=yes)
AC_CHECK_LIB(FLAC, $flcsym, have_seekable_flac_lib=yes)
if test x$have_flac_hdr = xyes -a x$have_seekable_flac_lib = xyes; then
AC_DEFINE(SOUND_SUPPORTS_SEEKABLE_FLAC)
fi
Expand Down Expand Up @@ -270,7 +276,7 @@ dnl fi

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
AC_CHECK_HEADERS([stdlib.h string.h signal.h assert.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Expand All @@ -281,8 +287,9 @@ AC_TYPE_SIZE_T
# This is only in the bleeding edge autoconf distro...
#AC_FUNC_MALLOC


AC_FUNC_MEMCMP
AC_CHECK_FUNCS([memset strrchr])
AC_CHECK_FUNCS([memset strrchr setbuf])

dnl Add Makefile conditionals
AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes)
Expand Down
1 change: 0 additions & 1 deletion decoders/aiff.c
Expand Up @@ -50,7 +50,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/au.c
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/flac.c
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/midi.c
Expand Up @@ -37,7 +37,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/mpglib.c
Expand Up @@ -46,7 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "mpglib/mpg123_sdlsound.h"
#include "mpglib/mpglib_sdlsound.h"

Expand Down
5 changes: 2 additions & 3 deletions decoders/mpglib/mpg123_sdlsound.h
@@ -1,8 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <signal.h>

#if !defined(WIN32) && !defined(macintosh)
#if !defined(WIN32) && !defined(macintosh) && !defined(_WIN32_WCE)
#include <unistd.h>
#endif

Expand All @@ -13,7 +12,7 @@
# define WIN32
#endif

#if defined(WIN32) || defined(macintosh)
#if defined(WIN32) || defined(macintosh) || defined(_WIN32_WCE)

# define M_PI 3.14159265358979323846
# define M_SQRT2 1.41421356237309504880
Expand Down
6 changes: 5 additions & 1 deletion decoders/mpglib/mpglib_common.c
@@ -1,6 +1,10 @@

#if HAVE_CONFIG_H
# include <config.h>
#endif

#include <ctype.h>
#include <stdlib.h>
#include <signal.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/ogg.c
Expand Up @@ -42,7 +42,6 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/quicktime.c
Expand Up @@ -60,7 +60,6 @@ typedef long int32_t;
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/raw.c
Expand Up @@ -47,7 +47,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/shn.c
Expand Up @@ -50,7 +50,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/skeleton.c
Expand Up @@ -46,7 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/smpeg.c
Expand Up @@ -44,7 +44,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/voc.c
Expand Up @@ -46,7 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down
1 change: 0 additions & 1 deletion decoders/wav.c
Expand Up @@ -37,7 +37,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "SDL_sound.h"

Expand Down

0 comments on commit 9841f7b

Please sign in to comment.