File tree Expand file tree Collapse file tree 8 files changed +586
-1
lines changed Expand file tree Collapse file tree 8 files changed +586
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ VERSION_OBJECTS = @VERSION_OBJECTS@
38
38
PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
39
39
PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
40
40
41
- DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL2_mixer.spec.in SDL_mixer.h VisualC VisualC-WinRT Xcode Xcode-iOS acinclude aclocal.m4 autogen.sh build-scripts configure configure.in debian effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h external gcc-fat.sh load_aiff.c load_aiff.h load_voc.c load_voc.h mixer.c mixer.h music.c music.h music_cmd.c music_cmd.h music_flac.c music_flac.h music_fluidsynth.c music_fluidsynth.h music_mad.c music_mad.h music_mikmod.c music_mikmod.h music_modplug.c music_modplug.h music_mpg123.c music_mpg123.h music_nativemidi.c music_nativemidi.h music_ogg.c music_ogg.h music_opus.c music_opus.h music_timidity.c music_timidity.h music_wav.c music_wav.h native_midi playmus.c playwave.c timidity version.rc
41
+ DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL2_mixer.spec.in SDL_mixer.h VisualC VisualC-WinRT Xcode Xcode-iOS acinclude aclocal.m4 autogen.sh build-scripts configure configure.in debian effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h external gcc-fat.sh load_aiff.c load_aiff.h load_voc.c load_voc.h mixer.c mixer.h music.c music.h music_html5.c music_html5.h music_cmd.c music_cmd.h music_flac.c music_flac.h music_fluidsynth.c music_fluidsynth.h music_mad.c music_mad.h music_mikmod.c music_mikmod.h music_modplug.c music_modplug.h music_mpg123.c music_mpg123.h music_nativemidi.c music_nativemidi.h music_ogg.c music_ogg.h music_opus.c music_opus.h music_timidity.c music_timidity.h music_wav.c music_wav.h native_midi playmus.c playwave.c timidity version.rc
42
42
43
43
LT_AGE = @LT_AGE@
44
44
LT_CURRENT = @LT_CURRENT@
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ typedef enum {
127
127
/* These are types of music files (not libraries used to load them) */
128
128
typedef enum {
129
129
MUS_NONE ,
130
+ MUS_HTML5 ,
130
131
MUS_CMD ,
131
132
MUS_WAV ,
132
133
MUS_MOD ,
Original file line number Diff line number Diff line change @@ -894,6 +894,7 @@ enable_dependency_tracking
894
894
with_sdl_prefix
895
895
with_sdl_exec_prefix
896
896
enable_sdltest
897
+ enable_music_html5
897
898
enable_music_cmd
898
899
enable_music_wave
899
900
enable_music_mod
@@ -11687,6 +11688,17 @@ done
11687
11688
11688
11689
CheckVisibilityHidden
11689
11690
11691
+ # Check whether --enable-music-html5 was given.
11692
+ if test " ${enable_music_html5+set} " = set ; then :
11693
+ enableval=$enable_music_html5 ;
11694
+ else
11695
+ enable_music_html5=no
11696
+ fi
11697
+
11698
+ if test x$enable_music_html5 = xyes; then
11699
+ EXTRA_CFLAGS=" $EXTRA_CFLAGS -DMUSIC_HTML5"
11700
+ fi
11701
+
11690
11702
# Check whether --enable-music-cmd was given.
11691
11703
if test " ${enable_music_cmd+set} " = set ; then :
11692
11704
enableval=$enable_music_cmd ;
Original file line number Diff line number Diff line change @@ -206,6 +206,13 @@ dnl Check command-line options
206
206
207
207
CheckVisibilityHidden
208
208
209
+ AC_ARG_ENABLE([music-html5],
210
+ AC_HELP_STRING([--enable-music-html5], [enable streaming music on HTML5 <audio> [[default=no]]]),
211
+ [], [enable_music_html5=no])
212
+ if test x$enable_music_html5 = xyes; then
213
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DMUSIC_HTML5"
214
+ fi
215
+
209
216
AC_ARG_ENABLE([music-cmd],
210
217
AC_HELP_STRING([--enable-music-cmd], [support an external music player [[default=yes]]]),
211
218
[], [enable_music_cmd=detect])
Original file line number Diff line number Diff line change 28
28
#include "mixer.h"
29
29
#include "music.h"
30
30
31
+ #include "music_html5.h"
31
32
#include "music_cmd.h"
32
33
#include "music_wav.h"
33
34
#include "music_mikmod.h"
@@ -80,6 +81,9 @@ static char* soundfont_paths = NULL;
80
81
/* Interfaces for the various music interfaces, ordered by priority */
81
82
static Mix_MusicInterface * s_music_interfaces [] =
82
83
{
84
+ #ifdef MUSIC_HTML5
85
+ & Mix_MusicInterface_HTML5 ,
86
+ #endif
83
87
#ifdef MUSIC_CMD
84
88
& Mix_MusicInterface_CMD ,
85
89
#endif
@@ -380,6 +384,7 @@ void open_music(const SDL_AudioSpec *spec)
380
384
#endif
381
385
382
386
/* Load the music interfaces that don't have explicit initialization */
387
+ load_music_type (MUS_HTML5 );
383
388
load_music_type (MUS_CMD );
384
389
load_music_type (MUS_WAV );
385
390
Original file line number Diff line number Diff line change 27
27
28
28
typedef enum
29
29
{
30
+ MIX_MUSIC_HTML5 ,
30
31
MIX_MUSIC_CMD ,
31
32
MIX_MUSIC_WAVE ,
32
33
MIX_MUSIC_MODPLUG ,
@@ -106,6 +107,7 @@ typedef struct
106
107
extern int get_num_music_interfaces (void );
107
108
extern Mix_MusicInterface * get_music_interface (int index );
108
109
extern Mix_MusicType detect_music_type_from_magic (const Uint8 * magic );
110
+ extern Mix_MusicType detect_music_type (SDL_RWops * src );
109
111
extern SDL_bool load_music_type (Mix_MusicType type );
110
112
extern SDL_bool open_music_type (Mix_MusicType type );
111
113
extern SDL_bool has_music (Mix_MusicType type );
You can’t perform that action at this time.
0 commit comments