Codebase list libsdl2-mixer / 1deddb0
Imported Upstream version 2.0.0~rc1 Manuel A. Fernandez Montecelo 10 years ago
2062 changed file(s) with 863930 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 LOCAL_PATH := $(call my-dir)
1
2 include $(CLEAR_VARS)
3
4 LOCAL_MODULE := SDL2_mixer
5
6 # Enable this if you want to support loading MOD music via mikmod
7 # The library path should be a relative path to this directory.
8 SUPPORT_MOD := true
9 MOD_LIBRARY_PATH := external/libmikmod-3.1.12
10
11 # Enable this if you want to support loading MP3 music via SMPEG
12 # The library path should be a relative path to this directory.
13 SUPPORT_MP3 := true
14 MP3_LIBRARY_PATH := external/smpeg2-2.0.0
15
16 # Enable this if you want to support loading OGG Vorbis music via Tremor
17 # The library path should be a relative path to this directory.
18 SUPPORT_OGG := true
19 OGG_LIBRARY_PATH := external/libogg-1.3.1
20 VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
21
22
23 LOCAL_C_INCLUDES := $(NDK_PROJECT_PATH)/jni/SDL/include
24 LOCAL_CFLAGS := -DWAV_MUSIC
25
26 LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c)))
27
28 LOCAL_LDLIBS :=
29 LOCAL_STATIC_LIBRARIES :=
30 LOCAL_SHARED_LIBRARIES := SDL2
31
32 ifeq ($(SUPPORT_MOD),true)
33 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MOD_LIBRARY_PATH)/include
34 LOCAL_CFLAGS += -DMOD_MUSIC
35 LOCAL_SHARED_LIBRARIES += mikmod
36 endif
37
38 ifeq ($(SUPPORT_MP3),true)
39 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MP3_LIBRARY_PATH)
40 LOCAL_CFLAGS += -DMP3_MUSIC
41 LOCAL_SHARED_LIBRARIES += smpeg2
42 endif
43
44 ifeq ($(SUPPORT_OGG),true)
45 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
46 LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR
47 LOCAL_SRC_FILES += \
48 $(VORBIS_LIBRARY_PATH)/mdct.c \
49 $(VORBIS_LIBRARY_PATH)/block.c \
50 $(VORBIS_LIBRARY_PATH)/window.c \
51 $(VORBIS_LIBRARY_PATH)/synthesis.c \
52 $(VORBIS_LIBRARY_PATH)/info.c \
53 $(VORBIS_LIBRARY_PATH)/floor1.c \
54 $(VORBIS_LIBRARY_PATH)/floor0.c \
55 $(VORBIS_LIBRARY_PATH)/vorbisfile.c \
56 $(VORBIS_LIBRARY_PATH)/res012.c \
57 $(VORBIS_LIBRARY_PATH)/mapping0.c \
58 $(VORBIS_LIBRARY_PATH)/registry.c \
59 $(VORBIS_LIBRARY_PATH)/codebook.c \
60 $(VORBIS_LIBRARY_PATH)/sharedbook.c \
61 $(OGG_LIBRARY_PATH)/src/framing.c \
62 $(OGG_LIBRARY_PATH)/src/bitwise.c
63 endif
64
65 include $(BUILD_SHARED_LIBRARY)
0 2.0.0:
1 Sam Lantinga - Sat Jun 1 19:11:08 PDT 2013
2 * Updated for SDL 2.0 release
3 * SDL_LoadMUS_RW() now takes an argument telling whether or not the data source should be freed when done.
4
5 1.2.13:
6 Paul P Komkoff Jr - Sun Jul 22 16:12:28 PDT 2012
7 * Fixed malloc/free mismatch in the MikMod driver
8
9 1.2.12:
10 Sam Lantinga - Sat Jan 14 22:00:29 2012 -0500
11 * Fixed seek offset with SMPEG (was relative, should be absolute)
12 Sam Lantinga - Fri Jan 13 03:04:27 EST 2012
13 * Fixed memory crash loading Ogg Vorbis files on Windows
14 Sam Lantinga - Thu Jan 05 22:51:54 2012 -0500
15 * Added an Xcode project for iOS
16 Nikos Chantziaras - 2012-01-02 17:37:36 PST
17 * Added Mix_LoadMUSType_RW() so you can tell SDL_mixer what type the music is
18 Sam Lantinga - Sun Jan 01 16:45:58 2012 -0500
19 * Fixed looping native MIDI on Mac OS X and Windows
20 Sam Lantinga - Sun Jan 01 01:00:51 2012 -0500
21 * Added /usr/local/share/timidity to the timidity data path
22 Sam Lantinga - Sat Dec 31 21:26:46 2011 -0500
23 * Fixed timidity loading of some MIDI files
24 Sam Lantinga - Sat Dec 31 19:11:59 EST 2011
25 * Fixed dropping audio in the FLAC audio decoding
26 Sam Lantinga - Sat Dec 31 18:32:05 EST 2011
27 * Fixed memory leak in SDL_LoadMUS()
28 Sam Lantinga - Sat Dec 31 10:22:05 EST 2011
29 * Removed GPL native MIDI code for new licensing
30 Sam Lantinga - Sat Dec 31 10:22:05 EST 2011
31 * SDL_mixer is now under the zlib license
32 Manuel Montezelo - 2011-12-28 11:42:44 PST
33 * Fixed drums playing on MIDI channel 16 with timidity
34 Ryan C. Gordon - Wed Jun 15 03:41:31 2011 -0400
35 * The music-finished hook can start a track immediately
36 James Le Cuirot - Mon Mar 21 16:54:11 PDT 2011
37 * Added support for FluidSynth
38 Egor Suvorov - Tue Jan 18 11:06:47 PST 2011
39 * Added support for native MIDI on Haiku
40 Sam Lantinga - Tue Jan 11 01:29:19 2011 -0800
41 * Added Android.mk to build on the Android platform
42 Jon Atkins - Sat Nov 14 13:00:18 PST 2009
43 * Added support for libmodplug (disabled by default)
44
45 1.2.11:
46 Sam Lantinga - Sat Nov 14 12:38:01 PST 2009
47 * Fixed initialization error and crashes if MikMod library isn't available
48 Sam Lantinga - Sat Nov 14 11:22:14 PST 2009
49 * Fixed bug loading multiple music files
50
51 1.2.10:
52 Sam Lantinga - Sun Nov 8 08:34:48 PST 2009
53 * Added Mix_Init()/Mix_Quit() to prevent constantly loading and unloading DLLs
54 Mike Frysinger - 2009-11-05 09:11:43 PST
55 * Check for fork/vfork on any platform, don't just assume it on UNIX
56 Jon Atkins - Thu Nov 5 00:02:50 2009 UTC
57 * Fixed export of Mix_GetNumChunkDecoders() and Mix_GetNumMusicDecoders()
58 C.W. Betts - 2009-11-02 00:16:21 PST
59 * Use newer MIDI API on Mac OS X 10.5+
60
61 1.2.9:
62 Ryan Gordon - Sun Oct 18 11:42:31 PDT 2009
63 * Updated native MIDI support on Mac OS X for 10.6
64 Ryan Gordon - Sun Oct 11 05:29:55 2009 UTC
65 * Reset channel volumes after a fade out interrupts a fade in.
66 Ryan Gordon - Sun Oct 11 02:59:12 2009 UTC
67 * Fixed crash race condition with position audio functions
68 Ryan Gordon - Sat Oct 10 17:05:45 2009 UTC
69 * Fixed stereo panning in 8-bit mode
70 Sam Lantinga - Sat Oct 10 11:07:15 2009 UTC
71 * Added /usr/share/timidity to the default timidity.cfg locations
72 Sam Lantinga - Sat Oct 3 13:33:36 PDT 2009
73 * MOD support uses libmikmod and is dynamically loaded by default
74 * A patched version of libmikmod is included in libmikmod-3.1.12.zip
75 * The libmikmod patches fix security issues CVE-2007-6720 and CVE-2009-0179.
76 Sam Lantinga - Sat Oct 3 02:49:41 PDT 2009
77 * Added TIMIDITY_CFG environment variable to fully locate timidity.cfg
78 Sam Lantinga - Fri Oct 2 07:15:35 PDT 2009
79 * Implemented seamless looping for music playback
80 Forrest Voight - 2009-06-13 20:31:38 PDT
81 * ID3 files are now recognized as MP3 format
82 Steven Noonan - 2008-05-13 13:31:36 PDT
83 * Fixed native MIDI crash on 64-bit Windows
84 Ryan Gordon - Fri Jun 5 16:07:08 2009 UTC
85 * Added decoder enumeration API:
86 Mix_GetNumChunkDecoders(), Mix_GetChunkDecoder(),
87 Mix_GetNumMusicDecoders(), Mix_GetMusicDecoder()
88 Austen Dicken - Tue Feb 26 23:28:27 PST 2008
89 * Added support for FLAC audio both as chunks and streaming
90 Tilman Sauerbeck - Tue Feb 26 03:44:47 PST 2008
91 * Added support for streaming WAV files with Mix_LoadMUS_RW()
92 Ryan Gordon - Mon Feb 4 17:10:08 UTC 2008
93 * Fixed crash caused by not resetting position_channels
94
95 1.2.8:
96 Sam Lantinga - Wed Jul 18 09:45:54 PDT 2007
97 * Improved detection of Ogg Vorbis and Tremor libraries
98 Ryan Gordon - Sun Jul 15 12:03:54 EDT 2007
99 * Fixed memory leaks in Effects API.
100 David Rose - Sat Jul 14 22:16:09 PDT 2007
101 * Added support for MP3 playback with libmad (for GPL projects only!)
102 Sam Lantinga - Sat Jul 14 21:39:30 PDT 2007
103 * Fixed the final loop of audio samples of a certain size
104 Sam Lantinga - Sat Jul 14 21:05:09 PDT 2007
105 * Fixed opening Ogg Vorbis files using different C runtimes on Windows
106 Philippe Simons - Sat Jul 14 20:33:17 PDT 2007
107 * Added support for Ogg Vorbis playback with Tremor (an integer decoder)
108 Sam Lantinga - Sat Jul 14 07:02:09 PDT 2007
109 * Fixed memory corruption in timidity resampling code
110 Ryan Gordon - Tue Jul 3 10:44:29 2007 UTC
111 * Fixed building SDL_mixer with SDL 1.3 pre-release
112 Ryan Gordon - Tue Feb 13 08:11:54 2007 UTC
113 * Fixed compiling both timidity and native midi in the same build
114 Hans de Goede - Sun Aug 20 23:25:46 2006 UTC
115 * Added volume control to playmus
116 Jonathan Atkins - Thu Aug 10 15:06:40 2006 UTC
117 * Fixed linking with system libmikmod
118 David Ergo - Fri Jun 23 09:07:19 2006 UTC
119 * Corrected no-op conditions in SetDistance(), SetPanning() and SetPosition()
120 * Fixed copy/paste errors in channel amplitudes
121
122 1.2.7:
123 Sam Lantinga - Fri May 12 00:04:32 PDT 2006
124 * Added support for dynamically loading SMPEG library
125 Sam Lantinga - Thu May 11 22:22:43 PDT 2006
126 * Added support for dynamically loading Ogg Vorbis library
127 Sam Lantinga - Sun Apr 30 09:01:44 PDT 2006
128 * Removed automake dependency, to allow Universal binaries on Mac OS X
129 * Added gcc-fat.sh for generating Universal binaries on Mac OS X
130 Sam Lantinga - Sun Apr 30 01:48:40 PDT 2006
131 * Updated libtool support to version 1.5.22
132 Patrice Mandin - Sat Jul 16 16:43:24 UTC 2005
133 * Use SDL_RWops also for native midi mac and win32
134 Patrice Mandin - Sat Jul 9 14:40:09 UTC 2005
135 * Use SDL_RWops also for native midi gpl (todo: mac and win32)
136 Ryan C. Gordon - Sat Jul 9 01:54:03 EDT 2005
137 * Tweaked Mix_Chunk's definition to make predeclaration easier.
138 Patrice Mandin - Mon Jul 4 19:45:40 UTC 2005
139 * Search timidity.cfg also in /etc
140 * Fix memory leaks in timidity player
141 * Use also SDL_RWops to read midifiles for timidity
142 Ryan C. Gordon - Mon Jun 13 18:18:12 EDT 2005
143 * Patch from Eric Wing to fix native midi compiling on MacOS/x86.
144 Sam Lantinga - Wed Dec 22 17:14:32 PST 2004
145 * Disabled support for the system version of libmikmod by default
146 Sam Lantinga - Tue Dec 21 09:51:29 PST 2004
147 * Fixed building mikmod support on UNIX
148 * Always build SDL_RWops music support
149 * Added SDL_RWops support for reading MP3 files
150
151 1.2.6:
152 Jonathan Atkins - Wed, 15 Sep 2004 23:26:42 -0500
153 * Added support for using the system version of libmikmod
0 /*
1 SDL_mixer: An audio mixer library based on the SDL library
2 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
0 # Makefile to build and install the SDL_mixer library
1
2 top_builddir = .
3 srcdir = @srcdir@
4 objects = build
5 prefix = @prefix@
6 exec_prefix = @exec_prefix@
7 bindir = $(DESTDIR)@bindir@
8 libdir = $(DESTDIR)@libdir@
9 includedir = $(DESTDIR)@includedir@
10 datarootdir = $(DESTDIR)@datarootdir@
11 datadir = @datadir@
12 mandir = @mandir@
13 auxdir = @ac_aux_dir@
14 distpath = $(srcdir)/..
15 distdir = SDL2_mixer-@VERSION@
16 distfile = $(distdir).tar.gz
17
18 @SET_MAKE@
19 EXE = @EXE@
20 SHELL = @SHELL@
21 CC = @CC@
22 CXX = g++
23 CFLAGS = @BUILD_CFLAGS@
24 EXTRA_CFLAGS = @EXTRA_CFLAGS@
25 LDFLAGS = @BUILD_LDFLAGS@
26 EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
27 LIBTOOL = @LIBTOOL@
28 INSTALL = @INSTALL@
29 AR = @AR@
30 RANLIB = @RANLIB@
31 WINDRES = @WINDRES@
32 SDL_CFLAGS = @SDL_CFLAGS@
33 SDL_LIBS = @SDL_LIBS@
34
35 TARGET = libSDL2_mixer.la
36 OBJECTS = @OBJECTS@
37 VERSION_OBJECTS = @VERSION_OBJECTS@
38 PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
39 PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
40
41 DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL_mixer.h SDL2_mixer.spec SDL2_mixer.spec.in debian VisualC Xcode Xcode-iOS acinclude autogen.sh build-scripts configure configure.in dynamic_flac.c dynamic_flac.h dynamic_fluidsynth.c dynamic_fluidsynth.h dynamic_mod.c dynamic_mod.h dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h fluidsynth.c fluidsynth.h external gcc-fat.sh libmikmod-3.1.12.zip load_aiff.c load_aiff.h load_flac.c load_flac.h load_ogg.c load_ogg.h load_voc.c load_voc.h mixer.c music.c music_cmd.c music_cmd.h music_flac.c music_flac.h music_mad.c music_mad.h music_mod.c music_mod.h music_modplug.c music_modplug.h music_ogg.c music_ogg.h native_midi playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
42
43 LT_AGE = @LT_AGE@
44 LT_CURRENT = @LT_CURRENT@
45 LT_RELEASE = @LT_RELEASE@
46 LT_REVISION = @LT_REVISION@
47 LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
48
49 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
50
51 $(srcdir)/configure: $(srcdir)/configure.in
52 @echo "Warning, configure.in is out of date"
53 #(cd $(srcdir) && sh autogen.sh && sh configure)
54 @sleep 3
55
56 Makefile: $(srcdir)/Makefile.in
57 $(SHELL) config.status $@
58
59 $(objects):
60 $(SHELL) $(auxdir)/mkinstalldirs $@
61
62 .PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
63
64 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
65 $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
66
67 $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
68 $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
69
70 $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
71 $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
72
73 install: all install-hdrs install-lib #install-bin
74 install-hdrs:
75 $(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL2
76 for src in $(srcdir)/SDL_mixer.h; do \
77 file=`echo $$src | sed -e 's|^.*/||'`; \
78 $(INSTALL) -m 644 $$src $(includedir)/SDL2/$$file; \
79 done
80 $(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
81 $(INSTALL) -m 644 SDL2_mixer.pc $(libdir)/pkgconfig/
82 install-lib: $(objects) $(objects)/$(TARGET)
83 $(SHELL) $(auxdir)/mkinstalldirs $(libdir)
84 $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
85 install-bin:
86 $(SHELL) $(auxdir)/mkinstalldirs $(bindir)
87 $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
88 $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
89
90 uninstall: uninstall-hdrs uninstall-lib uninstall-bin
91 uninstall-hdrs:
92 for src in $(srcdir)/SDL_mixer.h; do \
93 file=`echo $$src | sed -e 's|^.*/||'`; \
94 rm -f $(includedir)/SDL2/$$file; \
95 done
96 -rmdir $(includedir)/SDL2
97 rm -f $(libdir)/pkgconfig/SDL2_mixer.pc
98 -rmdir $(libdir)/pkgconfig
99 uninstall-lib:
100 $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
101 uninstall-bin:
102 rm -f $(bindir)/playwave$(EXE)
103 rm -f $(bindir)/playmus$(EXE)
104
105 clean:
106 rm -rf $(objects)
107
108 distclean: clean
109 rm -f Makefile
110 rm -f config.status config.cache config.log libtool
111 rm -f SDL2_mixer.pc
112 rm -rf $(srcdir)/autom4te*
113 find $(srcdir) \( \
114 -name '*~' -o \
115 -name '*.bak' -o \
116 -name '*.old' -o \
117 -name '*.rej' -o \
118 -name '*.orig' -o \
119 -name '.#*' \) \
120 -exec rm -f {} \;
121
122 dist $(distfile):
123 $(SHELL) $(auxdir)/mkinstalldirs $(distdir)
124 (cd $(srcdir); tar cf - $(DIST)) | (cd $(distdir); tar xf -)
125 rm -rf `find $(distdir) -name .svn`
126 rm -f `find $(distdir) -name '.#*'`
127 tar cvf - $(distdir) | gzip --best >$(distfile)
128 rm -rf $(distdir)
129
130 rpm: $(distfile)
131 rpmbuild -ta $?
0
1 SDL_mixer 2.0
2
3 The latest version of this library is available from:
4 http://www.libsdl.org/projects/SDL_mixer/
5
6 Due to popular demand, here is a simple multi-channel audio mixer.
7 It supports 8 channels of 16 bit stereo audio, plus a single channel
8 of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3
9 libraries.
10
11 See the header file SDL_mixer.h and the examples playwave.c and playmus.c
12 for documentation on this mixer library.
13
14 The mixer can currently load Microsoft WAVE files and Creative Labs VOC
15 files as audio samples, and can load MIDI files via Timidity and the
16 following music formats via MikMod: .MOD .S3M .IT .XM. It can load
17 Ogg Vorbis streams as music if built with Ogg Vorbis or Tremor libraries,
18 and finally it can load MP3 music using the SMPEG or libmad libraries.
19
20 Tremor decoding is disabled by default; you can enable it by passing
21 --enable-music-ogg-tremor
22 to configure, or by defining OGG_MUSIC and OGG_USE_TREMOR.
23
24 libmad decoding is disabled by default; you can enable it by passing
25 --enable-music-mp3-mad
26 to configure, or by defining MP3_MAD_MUSIC
27 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
28 WARNING: The license for libmad is GPL, which means that in order to
29 use it your application must also be GPL!
30 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32 The process of mixing MIDI files to wave output is very CPU intensive,
33 so if playing regular WAVE files sound great, but playing MIDI files
34 sound choppy, try using 8-bit audio, mono audio, or lower frequencies.
35
36 To play MIDI files, you'll need to get a complete set of GUS patches
37 from:
38 http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
39 and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
40
41 This library is under the zlib license, see the file "COPYING" for details.
42
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
4
5 Name: SDL2_mixer
6 Description: mixer library for Simple DirectMedia Layer
7 Version: @VERSION@
8 Requires: sdl2 >= @SDL_VERSION@
9 Libs: -L${libdir} -lSDL2_mixer
10 Cflags: -I${includedir}/SDL2
11
0 %define name SDL2_mixer
1 %define version 2.0.0
2 %define release 1
3
4 Summary: Simple DirectMedia Layer - Sample Mixer Library
5 Name: %{name}
6 Version: %{version}
7 Release: %{release}
8 Source0: %{name}-%{version}.tar.gz
9 License: LGPL
10 Group: System Environment/Libraries
11 BuildRoot: /var/tmp/%{name}-buildroot
12 Prefix: %{_prefix}
13
14 %description
15 Due to popular demand, here is a simple multi-channel audio mixer.
16 It supports 4 channels of 16 bit stereo audio, plus a single channel
17 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
18 Tremor, SMPEG MP3, and libmad MP3 libraries.
19
20 %package devel
21 Summary: Libraries, includes and more to develop SDL applications.
22 Group: Development/Libraries
23 Requires: %{name}
24
25 %description devel
26 Due to popular demand, here is a simple multi-channel audio mixer.
27 It supports 4 channels of 16 bit stereo audio, plus a single channel
28 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
29 Tremor, SMPEG MP3, and libmad MP3 libraries.
30
31 %prep
32 %setup
33
34 %build
35 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
36 make
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 make install prefix=$RPM_BUILD_ROOT/%{prefix}
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %files
46 %defattr(-,root,root)
47 %doc README CHANGES COPYING
48 %{prefix}/lib/lib*.so.*
49
50 %files devel
51 %defattr(-,root,root)
52 %{prefix}/lib/lib*.a
53 %{prefix}/lib/lib*.la
54 %{prefix}/lib/lib*.so
55 %{prefix}/include/*/
56 %{prefix}/lib/pkgconfig/*.pc
57
58 %changelog
59 * Wed Jan 19 2000 Sam Lantinga
60 - converted to get package information from configure
61 * Sun Jan 16 2000 Hakan Tandogan <hakan@iconsult.com>
62 - initial spec file
63
0 %define name SDL2_mixer
1 %define version @VERSION@
2 %define release 1
3
4 Summary: Simple DirectMedia Layer - Sample Mixer Library
5 Name: %{name}
6 Version: %{version}
7 Release: %{release}
8 Source0: %{name}-%{version}.tar.gz
9 License: LGPL
10 Group: System Environment/Libraries
11 BuildRoot: /var/tmp/%{name}-buildroot
12 Prefix: %{_prefix}
13
14 %description
15 Due to popular demand, here is a simple multi-channel audio mixer.
16 It supports 4 channels of 16 bit stereo audio, plus a single channel
17 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
18 Tremor, SMPEG MP3, and libmad MP3 libraries.
19
20 %package devel
21 Summary: Libraries, includes and more to develop SDL applications.
22 Group: Development/Libraries
23 Requires: %{name}
24
25 %description devel
26 Due to popular demand, here is a simple multi-channel audio mixer.
27 It supports 4 channels of 16 bit stereo audio, plus a single channel
28 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
29 Tremor, SMPEG MP3, and libmad MP3 libraries.
30
31 %prep
32 %setup
33
34 %build
35 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
36 make
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 make install prefix=$RPM_BUILD_ROOT/%{prefix}
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %files
46 %defattr(-,root,root)
47 %doc README CHANGES COPYING
48 %{prefix}/lib/lib*.so.*
49
50 %files devel
51 %defattr(-,root,root)
52 %{prefix}/lib/lib*.a
53 %{prefix}/lib/lib*.la
54 %{prefix}/lib/lib*.so
55 %{prefix}/include/*/
56 %{prefix}/lib/pkgconfig/*.pc
57
58 %changelog
59 * Wed Jan 19 2000 Sam Lantinga
60 - converted to get package information from configure
61 * Sun Jan 16 2000 Hakan Tandogan <hakan@iconsult.com>
62 - initial spec file
63
0 /*
1 SDL_mixer: An audio mixer library based on the SDL library
2 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /* $Id$ */
22
23 #ifndef _SDL_MIXER_H
24 #define _SDL_MIXER_H
25
26 #include "SDL_types.h"
27 #include "SDL_rwops.h"
28 #include "SDL_audio.h"
29 #include "SDL_endian.h"
30 #include "SDL_version.h"
31 #include "begin_code.h"
32
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
39 */
40 #define SDL_MIXER_MAJOR_VERSION 2
41 #define SDL_MIXER_MINOR_VERSION 0
42 #define SDL_MIXER_PATCHLEVEL 0
43
44 /* This macro can be used to fill a version structure with the compile-time
45 * version of the SDL_mixer library.
46 */
47 #define SDL_MIXER_VERSION(X) \
48 { \
49 (X)->major = SDL_MIXER_MAJOR_VERSION; \
50 (X)->minor = SDL_MIXER_MINOR_VERSION; \
51 (X)->patch = SDL_MIXER_PATCHLEVEL; \
52 }
53
54 /* Backwards compatibility */
55 #define MIX_MAJOR_VERSION SDL_MIXER_MAJOR_VERSION
56 #define MIX_MINOR_VERSION SDL_MIXER_MINOR_VERSION
57 #define MIX_PATCHLEVEL SDL_MIXER_PATCHLEVEL
58 #define MIX_VERSION(X) SDL_MIXER_VERSION(X)
59
60 /* This function gets the version of the dynamically linked SDL_mixer library.
61 it should NOT be used to fill a version structure, instead you should
62 use the SDL_MIXER_VERSION() macro.
63 */
64 extern DECLSPEC const SDL_version * SDLCALL Mix_Linked_Version(void);
65
66 typedef enum
67 {
68 MIX_INIT_FLAC = 0x00000001,
69 MIX_INIT_MOD = 0x00000002,
70 MIX_INIT_MP3 = 0x00000004,
71 MIX_INIT_OGG = 0x00000008,
72 MIX_INIT_FLUIDSYNTH = 0x00000010
73 } MIX_InitFlags;
74
75 /* Loads dynamic libraries and prepares them for use. Flags should be
76 one or more flags from MIX_InitFlags OR'd together.
77 It returns the flags successfully initialized, or 0 on failure.
78 */
79 extern DECLSPEC int SDLCALL Mix_Init(int flags);
80
81 /* Unloads libraries loaded with Mix_Init */
82 extern DECLSPEC void SDLCALL Mix_Quit(void);
83
84
85 /* The default mixer has 8 simultaneous mixing channels */
86 #ifndef MIX_CHANNELS
87 #define MIX_CHANNELS 8
88 #endif
89
90 /* Good default values for a PC soundcard */
91 #define MIX_DEFAULT_FREQUENCY 22050
92 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
93 #define MIX_DEFAULT_FORMAT AUDIO_S16LSB
94 #else
95 #define MIX_DEFAULT_FORMAT AUDIO_S16MSB
96 #endif
97 #define MIX_DEFAULT_CHANNELS 2
98 #define MIX_MAX_VOLUME 128 /* Volume of a chunk */
99
100 /* The internal format for an audio chunk */
101 typedef struct Mix_Chunk {
102 int allocated;
103 Uint8 *abuf;
104 Uint32 alen;
105 Uint8 volume; /* Per-sample volume, 0-128 */
106 } Mix_Chunk;
107
108 /* The different fading types supported */
109 typedef enum {
110 MIX_NO_FADING,
111 MIX_FADING_OUT,
112 MIX_FADING_IN
113 } Mix_Fading;
114
115 typedef enum {
116 MUS_NONE,
117 MUS_CMD,
118 MUS_WAV,
119 MUS_MOD,
120 MUS_MID,
121 MUS_OGG,
122 MUS_MP3,
123 MUS_MP3_MAD,
124 MUS_FLAC,
125 MUS_MODPLUG
126 } Mix_MusicType;
127
128 /* The internal format for a music chunk interpreted via mikmod */
129 typedef struct _Mix_Music Mix_Music;
130
131 /* Open the mixer with a certain audio format */
132 extern DECLSPEC int SDLCALL Mix_OpenAudio(int frequency, Uint16 format, int channels, int chunksize);
133
134 /* Dynamically change the number of channels managed by the mixer.
135 If decreasing the number of channels, the upper channels are
136 stopped.
137 This function returns the new number of allocated channels.
138 */
139 extern DECLSPEC int SDLCALL Mix_AllocateChannels(int numchans);
140
141 /* Find out what the actual audio device parameters are.
142 This function returns 1 if the audio has been opened, 0 otherwise.
143 */
144 extern DECLSPEC int SDLCALL Mix_QuerySpec(int *frequency,Uint16 *format,int *channels);
145
146 /* Load a wave file or a music (.mod .s3m .it .xm) file */
147 extern DECLSPEC Mix_Chunk * SDLCALL Mix_LoadWAV_RW(SDL_RWops *src, int freesrc);
148 #define Mix_LoadWAV(file) Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1)
149 extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS(const char *file);
150
151 /* Load a music file from an SDL_RWop object (Ogg and MikMod specific currently)
152 Matt Campbell (matt@campbellhome.dhs.org) April 2000 */
153 extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_RW(SDL_RWops *src, int freesrc);
154
155 /* Load a music file from an SDL_RWop object assuming a specific format */
156 extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUSType_RW(SDL_RWops *src, Mix_MusicType type, int freesrc);
157
158 /* Load a wave file of the mixer format from a memory buffer */
159 extern DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_WAV(Uint8 *mem);
160
161 /* Load raw audio data of the mixer format from a memory buffer */
162 extern DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_RAW(Uint8 *mem, Uint32 len);
163
164 /* Free an audio chunk previously loaded */
165 extern DECLSPEC void SDLCALL Mix_FreeChunk(Mix_Chunk *chunk);
166 extern DECLSPEC void SDLCALL Mix_FreeMusic(Mix_Music *music);
167
168 /* Get a list of chunk/music decoders that this build of SDL_mixer provides.
169 This list can change between builds AND runs of the program, if external
170 libraries that add functionality become available.
171 You must successfully call Mix_OpenAudio() before calling these functions.
172 This API is only available in SDL_mixer 1.2.9 and later.
173
174 // usage...
175 int i;
176 const int total = Mix_GetNumChunkDecoders();
177 for (i = 0; i < total; i++)
178 printf("Supported chunk decoder: [%s]\n", Mix_GetChunkDecoder(i));
179
180 Appearing in this list doesn't promise your specific audio file will
181 decode...but it's handy to know if you have, say, a functioning Timidity
182 install.
183
184 These return values are static, read-only data; do not modify or free it.
185 The pointers remain valid until you call Mix_CloseAudio().
186 */
187 extern DECLSPEC int SDLCALL Mix_GetNumChunkDecoders(void);
188 extern DECLSPEC const char * SDLCALL Mix_GetChunkDecoder(int index);
189 extern DECLSPEC int SDLCALL Mix_GetNumMusicDecoders(void);
190 extern DECLSPEC const char * SDLCALL Mix_GetMusicDecoder(int index);
191
192 /* Find out the music format of a mixer music, or the currently playing
193 music, if 'music' is NULL.
194 */
195 extern DECLSPEC Mix_MusicType SDLCALL Mix_GetMusicType(const Mix_Music *music);
196
197 /* Set a function that is called after all mixing is performed.
198 This can be used to provide real-time visual display of the audio stream
199 or add a custom mixer filter for the stream data.
200 */
201 extern DECLSPEC void SDLCALL Mix_SetPostMix(void (*mix_func)(void *udata, Uint8 *stream, int len), void *arg);
202
203 /* Add your own music player or additional mixer function.
204 If 'mix_func' is NULL, the default music player is re-enabled.
205 */
206 extern DECLSPEC void SDLCALL Mix_HookMusic(void (*mix_func)(void *udata, Uint8 *stream, int len), void *arg);
207
208 /* Add your own callback when the music has finished playing.
209 This callback is only called if the music finishes naturally.
210 */
211 extern DECLSPEC void SDLCALL Mix_HookMusicFinished(void (*music_finished)(void));
212
213 /* Get a pointer to the user data for the current music hook */
214 extern DECLSPEC void * SDLCALL Mix_GetMusicHookData(void);
215
216 /*
217 * Add your own callback when a channel has finished playing. NULL
218 * to disable callback. The callback may be called from the mixer's audio
219 * callback or it could be called as a result of Mix_HaltChannel(), etc.
220 * do not call SDL_LockAudio() from this callback; you will either be
221 * inside the audio callback, or SDL_mixer will explicitly lock the audio
222 * before calling your callback.
223 */
224 extern DECLSPEC void SDLCALL Mix_ChannelFinished(void (*channel_finished)(int channel));
225
226
227 /* Special Effects API by ryan c. gordon. (icculus@icculus.org) */
228
229 #define MIX_CHANNEL_POST -2
230
231 /* This is the format of a special effect callback:
232 *
233 * myeffect(int chan, void *stream, int len, void *udata);
234 *
235 * (chan) is the channel number that your effect is affecting. (stream) is
236 * the buffer of data to work upon. (len) is the size of (stream), and
237 * (udata) is a user-defined bit of data, which you pass as the last arg of
238 * Mix_RegisterEffect(), and is passed back unmolested to your callback.
239 * Your effect changes the contents of (stream) based on whatever parameters
240 * are significant, or just leaves it be, if you prefer. You can do whatever
241 * you like to the buffer, though, and it will continue in its changed state
242 * down the mixing pipeline, through any other effect functions, then finally
243 * to be mixed with the rest of the channels and music for the final output
244 * stream.
245 *
246 * DO NOT EVER call SDL_LockAudio() from your callback function!
247 */
248 typedef void (*Mix_EffectFunc_t)(int chan, void *stream, int len, void *udata);
249
250 /*
251 * This is a callback that signifies that a channel has finished all its
252 * loops and has completed playback. This gets called if the buffer
253 * plays out normally, or if you call Mix_HaltChannel(), implicitly stop
254 * a channel via Mix_AllocateChannels(), or unregister a callback while
255 * it's still playing.
256 *
257 * DO NOT EVER call SDL_LockAudio() from your callback function!
258 */
259 typedef void (*Mix_EffectDone_t)(int chan, void *udata);
260
261
262 /* Register a special effect function. At mixing time, the channel data is
263 * copied into a buffer and passed through each registered effect function.
264 * After it passes through all the functions, it is mixed into the final
265 * output stream. The copy to buffer is performed once, then each effect
266 * function performs on the output of the previous effect. Understand that
267 * this extra copy to a buffer is not performed if there are no effects
268 * registered for a given chunk, which saves CPU cycles, and any given
269 * effect will be extra cycles, too, so it is crucial that your code run
270 * fast. Also note that the data that your function is given is in the
271 * format of the sound device, and not the format you gave to Mix_OpenAudio(),
272 * although they may in reality be the same. This is an unfortunate but
273 * necessary speed concern. Use Mix_QuerySpec() to determine if you can
274 * handle the data before you register your effect, and take appropriate
275 * actions.
276 * You may also specify a callback (Mix_EffectDone_t) that is called when
277 * the channel finishes playing. This gives you a more fine-grained control
278 * than Mix_ChannelFinished(), in case you need to free effect-specific
279 * resources, etc. If you don't need this, you can specify NULL.
280 * You may set the callbacks before or after calling Mix_PlayChannel().
281 * Things like Mix_SetPanning() are just internal special effect functions,
282 * so if you are using that, you've already incurred the overhead of a copy
283 * to a separate buffer, and that these effects will be in the queue with
284 * any functions you've registered. The list of registered effects for a
285 * channel is reset when a chunk finishes playing, so you need to explicitly
286 * set them with each call to Mix_PlayChannel*().
287 * You may also register a special effect function that is to be run after
288 * final mixing occurs. The rules for these callbacks are identical to those
289 * in Mix_RegisterEffect, but they are run after all the channels and the
290 * music have been mixed into a single stream, whereas channel-specific
291 * effects run on a given channel before any other mixing occurs. These
292 * global effect callbacks are call "posteffects". Posteffects only have
293 * their Mix_EffectDone_t function called when they are unregistered (since
294 * the main output stream is never "done" in the same sense as a channel).
295 * You must unregister them manually when you've had enough. Your callback
296 * will be told that the channel being mixed is (MIX_CHANNEL_POST) if the
297 * processing is considered a posteffect.
298 *
299 * After all these effects have finished processing, the callback registered
300 * through Mix_SetPostMix() runs, and then the stream goes to the audio
301 * device.
302 *
303 * DO NOT EVER call SDL_LockAudio() from your callback function!
304 *
305 * returns zero if error (no such channel), nonzero if added.
306 * Error messages can be retrieved from Mix_GetError().
307 */
308 extern DECLSPEC int SDLCALL Mix_RegisterEffect(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg);
309
310
311 /* You may not need to call this explicitly, unless you need to stop an
312 * effect from processing in the middle of a chunk's playback.
313 * Posteffects are never implicitly unregistered as they are for channels,
314 * but they may be explicitly unregistered through this function by
315 * specifying MIX_CHANNEL_POST for a channel.
316 * returns zero if error (no such channel or effect), nonzero if removed.
317 * Error messages can be retrieved from Mix_GetError().
318 */
319 extern DECLSPEC int SDLCALL Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f);
320
321
322 /* You may not need to call this explicitly, unless you need to stop all
323 * effects from processing in the middle of a chunk's playback. Note that
324 * this will also shut off some internal effect processing, since
325 * Mix_SetPanning() and others may use this API under the hood. This is
326 * called internally when a channel completes playback.
327 * Posteffects are never implicitly unregistered as they are for channels,
328 * but they may be explicitly unregistered through this function by
329 * specifying MIX_CHANNEL_POST for a channel.
330 * returns zero if error (no such channel), nonzero if all effects removed.
331 * Error messages can be retrieved from Mix_GetError().
332 */
333 extern DECLSPEC int SDLCALL Mix_UnregisterAllEffects(int channel);
334
335
336 #define MIX_EFFECTSMAXSPEED "MIX_EFFECTSMAXSPEED"
337
338 /*
339 * These are the internally-defined mixing effects. They use the same API that
340 * effects defined in the application use, but are provided here as a
341 * convenience. Some effects can reduce their quality or use more memory in
342 * the name of speed; to enable this, make sure the environment variable
343 * MIX_EFFECTSMAXSPEED (see above) is defined before you call
344 * Mix_OpenAudio().
345 */
346
347
348 /* Set the panning of a channel. The left and right channels are specified
349 * as integers between 0 and 255, quietest to loudest, respectively.
350 *
351 * Technically, this is just individual volume control for a sample with
352 * two (stereo) channels, so it can be used for more than just panning.
353 * If you want real panning, call it like this:
354 *
355 * Mix_SetPanning(channel, left, 255 - left);
356 *
357 * ...which isn't so hard.
358 *
359 * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
360 * the panning will be done to the final mixed stream before passing it on
361 * to the audio device.
362 *
363 * This uses the Mix_RegisterEffect() API internally, and returns without
364 * registering the effect function if the audio device is not configured
365 * for stereo output. Setting both (left) and (right) to 255 causes this
366 * effect to be unregistered, since that is the data's normal state.
367 *
368 * returns zero if error (no such channel or Mix_RegisterEffect() fails),
369 * nonzero if panning effect enabled. Note that an audio device in mono
370 * mode is a no-op, but this call will return successful in that case.
371 * Error messages can be retrieved from Mix_GetError().
372 */
373 extern DECLSPEC int SDLCALL Mix_SetPanning(int channel, Uint8 left, Uint8 right);
374
375
376 /* Set the position of a channel. (angle) is an integer from 0 to 360, that
377 * specifies the location of the sound in relation to the listener. (angle)
378 * will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260).
379 * Angle 0 is due north, and rotates clockwise as the value increases.
380 * For efficiency, the precision of this effect may be limited (angles 1
381 * through 7 might all produce the same effect, 8 through 15 are equal, etc).
382 * (distance) is an integer between 0 and 255 that specifies the space
383 * between the sound and the listener. The larger the number, the further
384 * away the sound is. Using 255 does not guarantee that the channel will be
385 * culled from the mixing process or be completely silent. For efficiency,
386 * the precision of this effect may be limited (distance 0 through 5 might
387 * all produce the same effect, 6 through 10 are equal, etc). Setting (angle)
388 * and (distance) to 0 unregisters this effect, since the data would be
389 * unchanged.
390 *
391 * If you need more precise positional audio, consider using OpenAL for
392 * spatialized effects instead of SDL_mixer. This is only meant to be a
393 * basic effect for simple "3D" games.
394 *
395 * If the audio device is configured for mono output, then you won't get
396 * any effectiveness from the angle; however, distance attenuation on the
397 * channel will still occur. While this effect will function with stereo
398 * voices, it makes more sense to use voices with only one channel of sound,
399 * so when they are mixed through this effect, the positioning will sound
400 * correct. You can convert them to mono through SDL before giving them to
401 * the mixer in the first place if you like.
402 *
403 * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
404 * the positioning will be done to the final mixed stream before passing it
405 * on to the audio device.
406 *
407 * This is a convenience wrapper over Mix_SetDistance() and Mix_SetPanning().
408 *
409 * returns zero if error (no such channel or Mix_RegisterEffect() fails),
410 * nonzero if position effect is enabled.
411 * Error messages can be retrieved from Mix_GetError().
412 */
413 extern DECLSPEC int SDLCALL Mix_SetPosition(int channel, Sint16 angle, Uint8 distance);
414
415
416 /* Set the "distance" of a channel. (distance) is an integer from 0 to 255
417 * that specifies the location of the sound in relation to the listener.
418 * Distance 0 is overlapping the listener, and 255 is as far away as possible
419 * A distance of 255 does not guarantee silence; in such a case, you might
420 * want to try changing the chunk's volume, or just cull the sample from the
421 * mixing process with Mix_HaltChannel().
422 * For efficiency, the precision of this effect may be limited (distances 1
423 * through 7 might all produce the same effect, 8 through 15 are equal, etc).
424 * (distance) is an integer between 0 and 255 that specifies the space
425 * between the sound and the listener. The larger the number, the further
426 * away the sound is.
427 * Setting (distance) to 0 unregisters this effect, since the data would be
428 * unchanged.
429 * If you need more precise positional audio, consider using OpenAL for
430 * spatialized effects instead of SDL_mixer. This is only meant to be a
431 * basic effect for simple "3D" games.
432 *
433 * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
434 * the distance attenuation will be done to the final mixed stream before
435 * passing it on to the audio device.
436 *
437 * This uses the Mix_RegisterEffect() API internally.
438 *
439 * returns zero if error (no such channel or Mix_RegisterEffect() fails),
440 * nonzero if position effect is enabled.
441 * Error messages can be retrieved from Mix_GetError().
442 */
443 extern DECLSPEC int SDLCALL Mix_SetDistance(int channel, Uint8 distance);
444
445
446 /*
447 * !!! FIXME : Haven't implemented, since the effect goes past the
448 * end of the sound buffer. Will have to think about this.
449 * --ryan.
450 */
451 #if 0
452 /* Causes an echo effect to be mixed into a sound. (echo) is the amount
453 * of echo to mix. 0 is no echo, 255 is infinite (and probably not
454 * what you want).
455 *
456 * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
457 * the reverbing will be done to the final mixed stream before passing it on
458 * to the audio device.
459 *
460 * This uses the Mix_RegisterEffect() API internally. If you specify an echo
461 * of zero, the effect is unregistered, as the data is already in that state.
462 *
463 * returns zero if error (no such channel or Mix_RegisterEffect() fails),
464 * nonzero if reversing effect is enabled.
465 * Error messages can be retrieved from Mix_GetError().
466 */
467 extern no_parse_DECLSPEC int SDLCALL Mix_SetReverb(int channel, Uint8 echo);
468 #endif
469
470 /* Causes a channel to reverse its stereo. This is handy if the user has his
471 * speakers hooked up backwards, or you would like to have a minor bit of
472 * psychedelia in your sound code. :) Calling this function with (flip)
473 * set to non-zero reverses the chunks's usual channels. If (flip) is zero,
474 * the effect is unregistered.
475 *
476 * This uses the Mix_RegisterEffect() API internally, and thus is probably
477 * more CPU intensive than having the user just plug in his speakers
478 * correctly. Mix_SetReverseStereo() returns without registering the effect
479 * function if the audio device is not configured for stereo output.
480 *
481 * If you specify MIX_CHANNEL_POST for (channel), then this the effect is used
482 * on the final mixed stream before sending it on to the audio device (a
483 * posteffect).
484 *
485 * returns zero if error (no such channel or Mix_RegisterEffect() fails),
486 * nonzero if reversing effect is enabled. Note that an audio device in mono
487 * mode is a no-op, but this call will return successful in that case.
488 * Error messages can be retrieved from Mix_GetError().
489 */
490 extern DECLSPEC int SDLCALL Mix_SetReverseStereo(int channel, int flip);
491
492 /* end of effects API. --ryan. */
493
494
495 /* Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate
496 them dynamically to the next sample if requested with a -1 value below.
497 Returns the number of reserved channels.
498 */
499 extern DECLSPEC int SDLCALL Mix_ReserveChannels(int num);
500
501 /* Channel grouping functions */
502
503 /* Attach a tag to a channel. A tag can be assigned to several mixer
504 channels, to form groups of channels.
505 If 'tag' is -1, the tag is removed (actually -1 is the tag used to
506 represent the group of all the channels).
507 Returns true if everything was OK.
508 */
509 extern DECLSPEC int SDLCALL Mix_GroupChannel(int which, int tag);
510 /* Assign several consecutive channels to a group */
511 extern DECLSPEC int SDLCALL Mix_GroupChannels(int from, int to, int tag);
512 /* Finds the first available channel in a group of channels,
513 returning -1 if none are available.
514 */
515 extern DECLSPEC int SDLCALL Mix_GroupAvailable(int tag);
516 /* Returns the number of channels in a group. This is also a subtle
517 way to get the total number of channels when 'tag' is -1
518 */
519 extern DECLSPEC int SDLCALL Mix_GroupCount(int tag);
520 /* Finds the "oldest" sample playing in a group of channels */
521 extern DECLSPEC int SDLCALL Mix_GroupOldest(int tag);
522 /* Finds the "most recent" (i.e. last) sample playing in a group of channels */
523 extern DECLSPEC int SDLCALL Mix_GroupNewer(int tag);
524
525 /* Play an audio chunk on a specific channel.
526 If the specified channel is -1, play on the first free channel.
527 If 'loops' is greater than zero, loop the sound that many times.
528 If 'loops' is -1, loop inifinitely (~65000 times).
529 Returns which channel was used to play the sound.
530 */
531 #define Mix_PlayChannel(channel,chunk,loops) Mix_PlayChannelTimed(channel,chunk,loops,-1)
532 /* The same as above, but the sound is played at most 'ticks' milliseconds */
533 extern DECLSPEC int SDLCALL Mix_PlayChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ticks);
534 extern DECLSPEC int SDLCALL Mix_PlayMusic(Mix_Music *music, int loops);
535
536 /* Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions */
537 extern DECLSPEC int SDLCALL Mix_FadeInMusic(Mix_Music *music, int loops, int ms);
538 extern DECLSPEC int SDLCALL Mix_FadeInMusicPos(Mix_Music *music, int loops, int ms, double position);
539 #define Mix_FadeInChannel(channel,chunk,loops,ms) Mix_FadeInChannelTimed(channel,chunk,loops,ms,-1)
540 extern DECLSPEC int SDLCALL Mix_FadeInChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ms, int ticks);
541
542 /* Set the volume in the range of 0-128 of a specific channel or chunk.
543 If the specified channel is -1, set volume for all channels.
544 Returns the original volume.
545 If the specified volume is -1, just return the current volume.
546 */
547 extern DECLSPEC int SDLCALL Mix_Volume(int channel, int volume);
548 extern DECLSPEC int SDLCALL Mix_VolumeChunk(Mix_Chunk *chunk, int volume);
549 extern DECLSPEC int SDLCALL Mix_VolumeMusic(int volume);
550
551 /* Halt playing of a particular channel */
552 extern DECLSPEC int SDLCALL Mix_HaltChannel(int channel);
553 extern DECLSPEC int SDLCALL Mix_HaltGroup(int tag);
554 extern DECLSPEC int SDLCALL Mix_HaltMusic(void);
555
556 /* Change the expiration delay for a particular channel.
557 The sample will stop playing after the 'ticks' milliseconds have elapsed,
558 or remove the expiration if 'ticks' is -1
559 */
560 extern DECLSPEC int SDLCALL Mix_ExpireChannel(int channel, int ticks);
561
562 /* Halt a channel, fading it out progressively till it's silent
563 The ms parameter indicates the number of milliseconds the fading
564 will take.
565 */
566 extern DECLSPEC int SDLCALL Mix_FadeOutChannel(int which, int ms);
567 extern DECLSPEC int SDLCALL Mix_FadeOutGroup(int tag, int ms);
568 extern DECLSPEC int SDLCALL Mix_FadeOutMusic(int ms);
569
570 /* Query the fading status of a channel */
571 extern DECLSPEC Mix_Fading SDLCALL Mix_FadingMusic(void);
572 extern DECLSPEC Mix_Fading SDLCALL Mix_FadingChannel(int which);
573
574 /* Pause/Resume a particular channel */
575 extern DECLSPEC void SDLCALL Mix_Pause(int channel);
576 extern DECLSPEC void SDLCALL Mix_Resume(int channel);
577 extern DECLSPEC int SDLCALL Mix_Paused(int channel);
578
579 /* Pause/Resume the music stream */
580 extern DECLSPEC void SDLCALL Mix_PauseMusic(void);
581 extern DECLSPEC void SDLCALL Mix_ResumeMusic(void);
582 extern DECLSPEC void SDLCALL Mix_RewindMusic(void);
583 extern DECLSPEC int SDLCALL Mix_PausedMusic(void);
584
585 /* Set the current position in the music stream.
586 This returns 0 if successful, or -1 if it failed or isn't implemented.
587 This function is only implemented for MOD music formats (set pattern
588 order number) and for OGG, FLAC, MP3_MAD, and MODPLUG music (set
589 position in seconds), at the moment.
590 */
591 extern DECLSPEC int SDLCALL Mix_SetMusicPosition(double position);
592
593 /* Check the status of a specific channel.
594 If the specified channel is -1, check all channels.
595 */
596 extern DECLSPEC int SDLCALL Mix_Playing(int channel);
597 extern DECLSPEC int SDLCALL Mix_PlayingMusic(void);
598
599 /* Stop music and set external music playback command */
600 extern DECLSPEC int SDLCALL Mix_SetMusicCMD(const char *command);
601
602 /* Synchro value is set by MikMod from modules while playing */
603 extern DECLSPEC int SDLCALL Mix_SetSynchroValue(int value);
604 extern DECLSPEC int SDLCALL Mix_GetSynchroValue(void);
605
606 /* Set/Get/Iterate SoundFonts paths to use by supported MIDI backends */
607 extern DECLSPEC int SDLCALL Mix_SetSoundFonts(const char *paths);
608 extern DECLSPEC const char* SDLCALL Mix_GetSoundFonts(void);
609 extern DECLSPEC int SDLCALL Mix_EachSoundFont(int (*function)(const char*, void*), void *data);
610
611 /* Get the Mix_Chunk currently associated with a mixer channel
612 Returns NULL if it's an invalid channel, or there's no chunk associated.
613 */
614 extern DECLSPEC Mix_Chunk * SDLCALL Mix_GetChunk(int channel);
615
616 /* Close the mixer, halting all playing audio */
617 extern DECLSPEC void SDLCALL Mix_CloseAudio(void);
618
619 /* We'll use SDL for reporting errors */
620 #define Mix_SetError SDL_SetError
621 #define Mix_GetError SDL_GetError
622
623 /* Ends C function definitions when using C++ */
624 #ifdef __cplusplus
625 }
626 #endif
627 #include "close_code.h"
628
629 #endif /* _SDL_MIXER_H */
0 
1 Microsoft Visual Studio Solution File, Format Version 10.00
2 # Visual Studio 2008
3 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_mixer", "SDL_mixer_VS2008.vcproj", "{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}"
4 ProjectSection(ProjectDependencies) = postProject
5 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C} = {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}
6 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F} = {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}
7 EndProjectSection
8 EndProject
9 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "native_midi", "native_midi\native_midi_VS2008.vcproj", "{EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}"
10 EndProject
11 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playmus", "playmus\playmus_VS2008.vcproj", "{72CB0DD4-051D-486C-9CB3-75FE16F7D87A}"
12 ProjectSection(ProjectDependencies) = postProject
13 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33} = {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}
14 EndProjectSection
15 EndProject
16 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playwave", "playwave\playwave_VS2008.vcproj", "{AC86CEAA-9908-476F-B15F-C7193CEF81BD}"
17 ProjectSection(ProjectDependencies) = postProject
18 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33} = {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}
19 EndProjectSection
20 EndProject
21 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timidity", "timidity\timidity_VS2008.vcproj", "{B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}"
22 EndProject
23 Global
24 GlobalSection(SolutionConfigurationPlatforms) = preSolution
25 Debug|Win32 = Debug|Win32
26 Debug|x64 = Debug|x64
27 Release|Win32 = Release|Win32
28 Release|x64 = Release|x64
29 EndGlobalSection
30 GlobalSection(ProjectConfigurationPlatforms) = postSolution
31 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.ActiveCfg = Debug|Win32
32 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.Build.0 = Debug|Win32
33 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.ActiveCfg = Debug|x64
34 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.Build.0 = Debug|x64
35 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.ActiveCfg = Release|Win32
36 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.Build.0 = Release|Win32
37 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.ActiveCfg = Release|x64
38 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.Build.0 = Release|x64
39 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.ActiveCfg = Debug|Win32
40 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.Build.0 = Debug|Win32
41 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.ActiveCfg = Debug|x64
42 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.Build.0 = Debug|x64
43 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.ActiveCfg = Release|Win32
44 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.Build.0 = Release|Win32
45 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.ActiveCfg = Release|x64
46 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.Build.0 = Release|x64
47 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.ActiveCfg = Debug|Win32
48 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.Build.0 = Debug|Win32
49 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.ActiveCfg = Debug|x64
50 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.Build.0 = Debug|x64
51 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.ActiveCfg = Release|Win32
52 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.Build.0 = Release|Win32
53 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.ActiveCfg = Release|x64
54 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.Build.0 = Release|x64
55 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.ActiveCfg = Debug|Win32
56 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.Build.0 = Debug|Win32
57 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.ActiveCfg = Debug|x64
58 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.Build.0 = Debug|x64
59 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.ActiveCfg = Release|Win32
60 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.Build.0 = Release|Win32
61 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.ActiveCfg = Release|x64
62 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.Build.0 = Release|x64
63 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.ActiveCfg = Debug|Win32
64 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.Build.0 = Debug|Win32
65 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.ActiveCfg = Debug|x64
66 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.Build.0 = Debug|x64
67 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.ActiveCfg = Release|Win32
68 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.Build.0 = Release|Win32
69 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.ActiveCfg = Release|x64
70 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.Build.0 = Release|x64
71 EndGlobalSection
72 GlobalSection(SolutionProperties) = preSolution
73 HideSolutionNode = FALSE
74 EndGlobalSection
75 EndGlobal
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9.00"
4 Name="SDL2_mixer"
5 ProjectGUID="{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}"
6 RootNamespace="SDL_mixer"
7 TargetFrameworkVersion="131072"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 <Platform
14 Name="x64"
15 />
16 </Platforms>
17 <ToolFiles>
18 </ToolFiles>
19 <Configurations>
20 <Configuration
21 Name="Debug|Win32"
22 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
23 IntermediateDirectory="$(ConfigurationName)"
24 ConfigurationType="2"
25 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
26 UseOfMFC="0"
27 ATLMinimizesCRunTimeLibraryUsage="false"
28 >
29 <Tool
30 Name="VCPreBuildEventTool"
31 />
32 <Tool
33 Name="VCCustomBuildTool"
34 />
35 <Tool
36 Name="VCXMLDataGeneratorTool"
37 />
38 <Tool
39 Name="VCWebServiceProxyGeneratorTool"
40 />
41 <Tool
42 Name="VCMIDLTool"
43 PreprocessorDefinitions="_DEBUG"
44 MkTypLibCompatible="true"
45 SuppressStartupBanner="true"
46 TargetEnvironment="1"
47 TypeLibraryName=".\Debug/SDL2_mixer.tlb"
48 HeaderFileName=""
49 />
50 <Tool
51 Name="VCCLCompilerTool"
52 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
53 Optimization="0"
54 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
55 PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
56 MinimalRebuild="true"
57 RuntimeLibrary="2"
58 PrecompiledHeaderFile=".\Debug/SDL2_mixer.pch"
59 WarningLevel="3"
60 SuppressStartupBanner="true"
61 DebugInformationFormat="4"
62 />
63 <Tool
64 Name="VCManagedResourceCompilerTool"
65 />
66 <Tool
67 Name="VCResourceCompilerTool"
68 PreprocessorDefinitions="_DEBUG"
69 Culture="1033"
70 />
71 <Tool
72 Name="VCPreLinkEventTool"
73 />
74 <Tool
75 Name="VCLinkerTool"
76 AdditionalDependencies="winmm.lib SDL2.lib"
77 LinkIncremental="2"
78 GenerateDebugInformation="true"
79 ProgramDatabaseFile=".\Debug/SDL2_mixer.pdb"
80 SubSystem="2"
81 TargetMachine="1"
82 />
83 <Tool
84 Name="VCALinkTool"
85 />
86 <Tool
87 Name="VCManifestTool"
88 />
89 <Tool
90 Name="VCXDCMakeTool"
91 />
92 <Tool
93 Name="VCBscMakeTool"
94 SuppressStartupBanner="true"
95 OutputFile=".\Debug/SDL2_mixer.bsc"
96 />
97 <Tool
98 Name="VCFxCopTool"
99 />
100 <Tool
101 Name="VCAppVerifierTool"
102 />
103 <Tool
104 Name="VCPostBuildEventTool"
105 />
106 </Configuration>
107 <Configuration
108 Name="Debug|x64"
109 OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
110 IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
111 ConfigurationType="2"
112 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
113 UseOfMFC="0"
114 ATLMinimizesCRunTimeLibraryUsage="false"
115 >
116 <Tool
117 Name="VCPreBuildEventTool"
118 />
119 <Tool
120 Name="VCCustomBuildTool"
121 />
122 <Tool
123 Name="VCXMLDataGeneratorTool"
124 />
125 <Tool
126 Name="VCWebServiceProxyGeneratorTool"
127 />
128 <Tool
129 Name="VCMIDLTool"
130 PreprocessorDefinitions="_DEBUG"
131 MkTypLibCompatible="true"
132 SuppressStartupBanner="true"
133 TargetEnvironment="3"
134 TypeLibraryName=".\Debug/SDL2_mixer.tlb"
135 HeaderFileName=""
136 />
137 <Tool
138 Name="VCCLCompilerTool"
139 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
140 Optimization="0"
141 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
142 PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
143 MinimalRebuild="true"
144 RuntimeLibrary="2"
145 PrecompiledHeaderFile=".\Debug/SDL2_mixer.pch"
146 WarningLevel="3"
147 SuppressStartupBanner="true"
148 DebugInformationFormat="3"
149 />
150 <Tool
151 Name="VCManagedResourceCompilerTool"
152 />
153 <Tool
154 Name="VCResourceCompilerTool"
155 PreprocessorDefinitions="_DEBUG"
156 Culture="1033"
157 />
158 <Tool
159 Name="VCPreLinkEventTool"
160 />
161 <Tool
162 Name="VCLinkerTool"
163 AdditionalDependencies="winmm.lib SDL2.lib"
164 LinkIncremental="2"
165 GenerateDebugInformation="true"
166 ProgramDatabaseFile=".\Debug/SDL2_mixer.pdb"
167 SubSystem="2"
168 TargetMachine="17"
169 />
170 <Tool
171 Name="VCALinkTool"
172 />
173 <Tool
174 Name="VCManifestTool"
175 />
176 <Tool
177 Name="VCXDCMakeTool"
178 />
179 <Tool
180 Name="VCBscMakeTool"
181 SuppressStartupBanner="true"
182 OutputFile=".\Debug/SDL2_mixer.bsc"
183 />
184 <Tool
185 Name="VCFxCopTool"
186 />
187 <Tool
188 Name="VCAppVerifierTool"
189 />
190 <Tool
191 Name="VCPostBuildEventTool"
192 />
193 </Configuration>
194 <Configuration
195 Name="Release|Win32"
196 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
197 IntermediateDirectory="$(ConfigurationName)"
198 ConfigurationType="2"
199 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
200 UseOfMFC="0"
201 ATLMinimizesCRunTimeLibraryUsage="false"
202 >
203 <Tool
204 Name="VCPreBuildEventTool"
205 />
206 <Tool
207 Name="VCCustomBuildTool"
208 />
209 <Tool
210 Name="VCXMLDataGeneratorTool"
211 />
212 <Tool
213 Name="VCWebServiceProxyGeneratorTool"
214 />
215 <Tool
216 Name="VCMIDLTool"
217 PreprocessorDefinitions="NDEBUG"
218 MkTypLibCompatible="true"
219 SuppressStartupBanner="true"
220 TargetEnvironment="1"
221 TypeLibraryName=".\Release/SDL2_mixer.tlb"
222 HeaderFileName=""
223 />
224 <Tool
225 Name="VCCLCompilerTool"
226 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
227 Optimization="2"
228 InlineFunctionExpansion="1"
229 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
230 PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
231 StringPooling="true"
232 RuntimeLibrary="2"
233 EnableFunctionLevelLinking="true"
234 PrecompiledHeaderFile=".\Release/SDL2_mixer.pch"
235 WarningLevel="3"
236 />
237 <Tool
238 Name="VCManagedResourceCompilerTool"
239 />
240 <Tool
241 Name="VCResourceCompilerTool"
242 PreprocessorDefinitions="NDEBUG"
243 Culture="1033"
244 />
245 <Tool
246 Name="VCPreLinkEventTool"
247 />
248 <Tool
249 Name="VCLinkerTool"
250 AdditionalDependencies="winmm.lib SDL2.lib"
251 LinkIncremental="1"
252 ProgramDatabaseFile=".\Release/SDL2_mixer.pdb"
253 SubSystem="2"
254 TargetMachine="1"
255 />
256 <Tool
257 Name="VCALinkTool"
258 />
259 <Tool
260 Name="VCManifestTool"
261 />
262 <Tool
263 Name="VCXDCMakeTool"
264 />
265 <Tool
266 Name="VCBscMakeTool"
267 SuppressStartupBanner="true"
268 OutputFile=".\Release/SDL2_mixer.bsc"
269 />
270 <Tool
271 Name="VCFxCopTool"
272 />
273 <Tool
274 Name="VCAppVerifierTool"
275 />
276 <Tool
277 Name="VCPostBuildEventTool"
278 />
279 </Configuration>
280 <Configuration
281 Name="Release|x64"
282 OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
283 IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
284 ConfigurationType="2"
285 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
286 UseOfMFC="0"
287 ATLMinimizesCRunTimeLibraryUsage="false"
288 >
289 <Tool
290 Name="VCPreBuildEventTool"
291 />
292 <Tool
293 Name="VCCustomBuildTool"
294 />
295 <Tool
296 Name="VCXMLDataGeneratorTool"
297 />
298 <Tool
299 Name="VCWebServiceProxyGeneratorTool"
300 />
301 <Tool
302 Name="VCMIDLTool"
303 PreprocessorDefinitions="NDEBUG"
304 MkTypLibCompatible="true"
305 SuppressStartupBanner="true"
306 TargetEnvironment="3"
307 TypeLibraryName=".\Release/SDL2_mixer.tlb"
308 HeaderFileName=""
309 />
310 <Tool
311 Name="VCCLCompilerTool"
312 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
313 Optimization="2"
314 InlineFunctionExpansion="1"
315 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
316 PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
317 StringPooling="true"
318 RuntimeLibrary="2"
319 EnableFunctionLevelLinking="true"
320 PrecompiledHeaderFile=".\Release/SDL2_mixer.pch"
321 WarningLevel="3"
322 />
323 <Tool
324 Name="VCManagedResourceCompilerTool"
325 />
326 <Tool
327 Name="VCResourceCompilerTool"
328 PreprocessorDefinitions="NDEBUG"
329 Culture="1033"
330 />
331 <Tool
332 Name="VCPreLinkEventTool"
333 />
334 <Tool
335 Name="VCLinkerTool"
336 AdditionalDependencies="winmm.lib SDL2.lib"
337 LinkIncremental="1"
338 ProgramDatabaseFile=".\Release/SDL2_mixer.pdb"
339 SubSystem="2"
340 TargetMachine="17"
341 />
342 <Tool
343 Name="VCALinkTool"
344 />
345 <Tool
346 Name="VCManifestTool"
347 />
348 <Tool
349 Name="VCXDCMakeTool"
350 />
351 <Tool
352 Name="VCBscMakeTool"
353 SuppressStartupBanner="true"
354 OutputFile=".\Release/SDL2_mixer.bsc"
355 />
356 <Tool
357 Name="VCFxCopTool"
358 />
359 <Tool
360 Name="VCAppVerifierTool"
361 />
362 <Tool
363 Name="VCPostBuildEventTool"
364 />
365 </Configuration>
366 </Configurations>
367 <References>
368 </References>
369 <Files>
370 <File
371 RelativePath="..\dynamic_flac.c"
372 >
373 </File>
374 <File
375 RelativePath="..\dynamic_flac.h"
376 >
377 </File>
378 <File
379 RelativePath="..\dynamic_fluidsynth.c"
380 >
381 </File>
382 <File
383 RelativePath="..\dynamic_fluidsynth.h"
384 >
385 </File>
386 <File
387 RelativePath="..\dynamic_mod.c"
388 >
389 </File>
390 <File
391 RelativePath="..\dynamic_mod.h"
392 >
393 </File>
394 <File
395 RelativePath="..\dynamic_mp3.c"
396 >
397 <FileConfiguration
398 Name="Debug|Win32"
399 >
400 <Tool
401 Name="VCCLCompilerTool"
402 AdditionalIncludeDirectories=""
403 PreprocessorDefinitions=""
404 />
405 </FileConfiguration>
406 <FileConfiguration
407 Name="Debug|x64"
408 >
409 <Tool
410 Name="VCCLCompilerTool"
411 AdditionalIncludeDirectories=""
412 PreprocessorDefinitions=""
413 />
414 </FileConfiguration>
415 <FileConfiguration
416 Name="Release|Win32"
417 >
418 <Tool
419 Name="VCCLCompilerTool"
420 AdditionalIncludeDirectories=""
421 PreprocessorDefinitions=""
422 />
423 </FileConfiguration>
424 <FileConfiguration
425 Name="Release|x64"
426 >
427 <Tool
428 Name="VCCLCompilerTool"
429 AdditionalIncludeDirectories=""
430 PreprocessorDefinitions=""
431 />
432 </FileConfiguration>
433 </File>
434 <File
435 RelativePath="..\dynamic_mp3.h"
436 >
437 </File>
438 <File
439 RelativePath="..\dynamic_ogg.c"
440 >
441 <FileConfiguration
442 Name="Debug|Win32"
443 >
444 <Tool
445 Name="VCCLCompilerTool"
446 AdditionalIncludeDirectories=""
447 PreprocessorDefinitions=""
448 />
449 </FileConfiguration>
450 <FileConfiguration
451 Name="Debug|x64"
452 >
453 <Tool
454 Name="VCCLCompilerTool"
455 AdditionalIncludeDirectories=""
456 PreprocessorDefinitions=""
457 />
458 </FileConfiguration>
459 <FileConfiguration
460 Name="Release|Win32"
461 >
462 <Tool
463 Name="VCCLCompilerTool"
464 AdditionalIncludeDirectories=""
465 PreprocessorDefinitions=""
466 />
467 </FileConfiguration>
468 <FileConfiguration
469 Name="Release|x64"
470 >
471 <Tool
472 Name="VCCLCompilerTool"
473 AdditionalIncludeDirectories=""
474 PreprocessorDefinitions=""
475 />
476 </FileConfiguration>
477 </File>
478 <File
479 RelativePath="..\dynamic_ogg.h"
480 >
481 </File>
482 <File
483 RelativePath="..\effect_position.c"
484 >
485 <FileConfiguration
486 Name="Debug|Win32"
487 >
488 <Tool
489 Name="VCCLCompilerTool"
490 AdditionalIncludeDirectories=""
491 PreprocessorDefinitions=""
492 />
493 </FileConfiguration>
494 <FileConfiguration
495 Name="Debug|x64"
496 >
497 <Tool
498 Name="VCCLCompilerTool"
499 AdditionalIncludeDirectories=""
500 PreprocessorDefinitions=""
501 />
502 </FileConfiguration>
503 <FileConfiguration
504 Name="Release|Win32"
505 >
506 <Tool
507 Name="VCCLCompilerTool"
508 AdditionalIncludeDirectories=""
509 PreprocessorDefinitions=""
510 />
511 </FileConfiguration>
512 <FileConfiguration
513 Name="Release|x64"
514 >
515 <Tool
516 Name="VCCLCompilerTool"
517 AdditionalIncludeDirectories=""
518 PreprocessorDefinitions=""
519 />
520 </FileConfiguration>
521 </File>
522 <File
523 RelativePath="..\effect_stereoreverse.c"
524 >
525 <FileConfiguration
526 Name="Debug|Win32"
527 >
528 <Tool
529 Name="VCCLCompilerTool"
530 AdditionalIncludeDirectories=""
531 PreprocessorDefinitions=""
532 />
533 </FileConfiguration>
534 <FileConfiguration
535 Name="Debug|x64"
536 >
537 <Tool
538 Name="VCCLCompilerTool"
539 AdditionalIncludeDirectories=""
540 PreprocessorDefinitions=""
541 />
542 </FileConfiguration>
543 <FileConfiguration
544 Name="Release|Win32"
545 >
546 <Tool
547 Name="VCCLCompilerTool"
548 AdditionalIncludeDirectories=""
549 PreprocessorDefinitions=""
550 />
551 </FileConfiguration>
552 <FileConfiguration
553 Name="Release|x64"
554 >
555 <Tool
556 Name="VCCLCompilerTool"
557 AdditionalIncludeDirectories=""
558 PreprocessorDefinitions=""
559 />
560 </FileConfiguration>
561 </File>
562 <File
563 RelativePath="..\effects_internal.c"
564 >
565 <FileConfiguration
566 Name="Debug|Win32"
567 >
568 <Tool
569 Name="VCCLCompilerTool"
570 AdditionalIncludeDirectories=""
571 PreprocessorDefinitions=""
572 />
573 </FileConfiguration>
574 <FileConfiguration
575 Name="Debug|x64"
576 >
577 <Tool
578 Name="VCCLCompilerTool"
579 AdditionalIncludeDirectories=""
580 PreprocessorDefinitions=""
581 />
582 </FileConfiguration>
583 <FileConfiguration
584 Name="Release|Win32"
585 >
586 <Tool
587 Name="VCCLCompilerTool"
588 AdditionalIncludeDirectories=""
589 PreprocessorDefinitions=""
590 />
591 </FileConfiguration>
592 <FileConfiguration
593 Name="Release|x64"
594 >
595 <Tool
596 Name="VCCLCompilerTool"
597 AdditionalIncludeDirectories=""
598 PreprocessorDefinitions=""
599 />
600 </FileConfiguration>
601 </File>
602 <File
603 RelativePath="..\effects_internal.h"
604 >
605 </File>
606 <File
607 RelativePath="..\fluidsynth.c"
608 >
609 </File>
610 <File
611 RelativePath="..\fluidsynth.h"
612 >
613 </File>
614 <File
615 RelativePath="..\load_aiff.c"
616 >
617 <FileConfiguration
618 Name="Debug|Win32"
619 >
620 <Tool
621 Name="VCCLCompilerTool"
622 AdditionalIncludeDirectories=""
623 PreprocessorDefinitions=""
624 />
625 </FileConfiguration>
626 <FileConfiguration
627 Name="Debug|x64"
628 >
629 <Tool
630 Name="VCCLCompilerTool"
631 AdditionalIncludeDirectories=""
632 PreprocessorDefinitions=""
633 />
634 </FileConfiguration>
635 <FileConfiguration
636 Name="Release|Win32"
637 >
638 <Tool
639 Name="VCCLCompilerTool"
640 AdditionalIncludeDirectories=""
641 PreprocessorDefinitions=""
642 />
643 </FileConfiguration>
644 <FileConfiguration
645 Name="Release|x64"
646 >
647 <Tool
648 Name="VCCLCompilerTool"
649 AdditionalIncludeDirectories=""
650 PreprocessorDefinitions=""
651 />
652 </FileConfiguration>
653 </File>
654 <File
655 RelativePath="..\load_aiff.h"
656 >
657 </File>
658 <File
659 RelativePath="..\load_flac.c"
660 >
661 </File>
662 <File
663 RelativePath="..\load_flac.h"
664 >
665 </File>
666 <File
667 RelativePath="..\load_ogg.c"
668 >
669 <FileConfiguration
670 Name="Debug|Win32"
671 >
672 <Tool
673 Name="VCCLCompilerTool"
674 AdditionalIncludeDirectories=""
675 PreprocessorDefinitions=""
676 />
677 </FileConfiguration>
678 <FileConfiguration
679 Name="Debug|x64"
680 >
681 <Tool
682 Name="VCCLCompilerTool"
683 AdditionalIncludeDirectories=""
684 PreprocessorDefinitions=""
685 />
686 </FileConfiguration>
687 <FileConfiguration
688 Name="Release|Win32"
689 >
690 <Tool
691 Name="VCCLCompilerTool"
692 AdditionalIncludeDirectories=""
693 PreprocessorDefinitions=""
694 />
695 </FileConfiguration>
696 <FileConfiguration
697 Name="Release|x64"
698 >
699 <Tool
700 Name="VCCLCompilerTool"
701 AdditionalIncludeDirectories=""
702 PreprocessorDefinitions=""
703 />
704 </FileConfiguration>
705 </File>
706 <File
707 RelativePath="..\load_ogg.h"
708 >
709 </File>
710 <File
711 RelativePath="..\load_voc.c"
712 >
713 <FileConfiguration
714 Name="Debug|Win32"
715 >
716 <Tool
717 Name="VCCLCompilerTool"
718 AdditionalIncludeDirectories=""
719 PreprocessorDefinitions=""
720 />
721 </FileConfiguration>
722 <FileConfiguration
723 Name="Debug|x64"
724 >
725 <Tool
726 Name="VCCLCompilerTool"
727 AdditionalIncludeDirectories=""
728 PreprocessorDefinitions=""
729 />
730 </FileConfiguration>
731 <FileConfiguration
732 Name="Release|Win32"
733 >
734 <Tool
735 Name="VCCLCompilerTool"
736 AdditionalIncludeDirectories=""
737 PreprocessorDefinitions=""
738 />
739 </FileConfiguration>
740 <FileConfiguration
741 Name="Release|x64"
742 >
743 <Tool
744 Name="VCCLCompilerTool"
745 AdditionalIncludeDirectories=""
746 PreprocessorDefinitions=""
747 />
748 </FileConfiguration>
749 </File>
750 <File
751 RelativePath="..\load_voc.h"
752 >
753 </File>
754 <File
755 RelativePath="..\mixer.c"
756 >
757 <FileConfiguration
758 Name="Debug|Win32"
759 >
760 <Tool
761 Name="VCCLCompilerTool"
762 AdditionalIncludeDirectories=""
763 PreprocessorDefinitions=""
764 />
765 </FileConfiguration>
766 <FileConfiguration
767 Name="Debug|x64"
768 >
769 <Tool
770 Name="VCCLCompilerTool"
771 AdditionalIncludeDirectories=""
772 PreprocessorDefinitions=""
773 />
774 </FileConfiguration>
775 <FileConfiguration
776 Name="Release|Win32"
777 >
778 <Tool
779 Name="VCCLCompilerTool"
780 AdditionalIncludeDirectories=""
781 PreprocessorDefinitions=""
782 />
783 </FileConfiguration>
784 <FileConfiguration
785 Name="Release|x64"
786 >
787 <Tool
788 Name="VCCLCompilerTool"
789 AdditionalIncludeDirectories=""
790 PreprocessorDefinitions=""
791 />
792 </FileConfiguration>
793 </File>
794 <File
795 RelativePath="..\music.c"
796 >
797 <FileConfiguration
798 Name="Debug|Win32"
799 >
800 <Tool
801 Name="VCCLCompilerTool"
802 AdditionalIncludeDirectories=""
803 PreprocessorDefinitions=""
804 />
805 </FileConfiguration>
806 <FileConfiguration
807 Name="Debug|x64"
808 >
809 <Tool
810 Name="VCCLCompilerTool"
811 AdditionalIncludeDirectories=""
812 PreprocessorDefinitions=""
813 />
814 </FileConfiguration>
815 <FileConfiguration
816 Name="Release|Win32"
817 >
818 <Tool
819 Name="VCCLCompilerTool"
820 AdditionalIncludeDirectories=""
821 PreprocessorDefinitions=""
822 />
823 </FileConfiguration>
824 <FileConfiguration
825 Name="Release|x64"
826 >
827 <Tool
828 Name="VCCLCompilerTool"
829 AdditionalIncludeDirectories=""
830 PreprocessorDefinitions=""
831 />
832 </FileConfiguration>
833 </File>
834 <File
835 RelativePath="..\music_cmd.c"
836 >
837 <FileConfiguration
838 Name="Debug|Win32"
839 >
840 <Tool
841 Name="VCCLCompilerTool"
842 AdditionalIncludeDirectories=""
843 PreprocessorDefinitions=""
844 />
845 </FileConfiguration>
846 <FileConfiguration
847 Name="Debug|x64"
848 >
849 <Tool
850 Name="VCCLCompilerTool"
851 AdditionalIncludeDirectories=""
852 PreprocessorDefinitions=""
853 />
854 </FileConfiguration>
855 <FileConfiguration
856 Name="Release|Win32"
857 >
858 <Tool
859 Name="VCCLCompilerTool"
860 AdditionalIncludeDirectories=""
861 PreprocessorDefinitions=""
862 />
863 </FileConfiguration>
864 <FileConfiguration
865 Name="Release|x64"
866 >
867 <Tool
868 Name="VCCLCompilerTool"
869 AdditionalIncludeDirectories=""
870 PreprocessorDefinitions=""
871 />
872 </FileConfiguration>
873 </File>
874 <File
875 RelativePath="..\music_cmd.h"
876 >
877 </File>
878 <File
879 RelativePath="..\music_flac.c"
880 >
881 </File>
882 <File
883 RelativePath="..\music_flac.h"
884 >
885 </File>
886 <File
887 RelativePath="..\music_mad.c"
888 >
889 </File>
890 <File
891 RelativePath="..\music_mad.h"
892 >
893 </File>
894 <File
895 RelativePath="..\music_mod.c"
896 >
897 </File>
898 <File
899 RelativePath="..\music_mod.h"
900 >
901 </File>
902 <File
903 RelativePath="..\music_ogg.c"
904 >
905 <FileConfiguration
906 Name="Debug|Win32"
907 >
908 <Tool
909 Name="VCCLCompilerTool"
910 AdditionalIncludeDirectories=""
911 PreprocessorDefinitions=""
912 />
913 </FileConfiguration>
914 <FileConfiguration
915 Name="Debug|x64"
916 >
917 <Tool
918 Name="VCCLCompilerTool"
919 AdditionalIncludeDirectories=""
920 PreprocessorDefinitions=""
921 />
922 </FileConfiguration>
923 <FileConfiguration
924 Name="Release|Win32"
925 >
926 <Tool
927 Name="VCCLCompilerTool"
928 AdditionalIncludeDirectories=""
929 PreprocessorDefinitions=""
930 />
931 </FileConfiguration>
932 <FileConfiguration
933 Name="Release|x64"
934 >
935 <Tool
936 Name="VCCLCompilerTool"
937 AdditionalIncludeDirectories=""
938 PreprocessorDefinitions=""
939 />
940 </FileConfiguration>
941 </File>
942 <File
943 RelativePath="..\music_ogg.h"
944 >
945 </File>
946 <File
947 RelativePath="..\SDL_mixer.h"
948 >
949 </File>
950 <File
951 RelativePath="Version.rc"
952 >
953 <FileConfiguration
954 Name="Debug|Win32"
955 >
956 <Tool
957 Name="VCResourceCompilerTool"
958 PreprocessorDefinitions=""
959 />
960 </FileConfiguration>
961 <FileConfiguration
962 Name="Debug|x64"
963 >
964 <Tool
965 Name="VCResourceCompilerTool"
966 PreprocessorDefinitions=""
967 />
968 </FileConfiguration>
969 <FileConfiguration
970 Name="Release|Win32"
971 >
972 <Tool
973 Name="VCResourceCompilerTool"
974 PreprocessorDefinitions=""
975 />
976 </FileConfiguration>
977 <FileConfiguration
978 Name="Release|x64"
979 >
980 <Tool
981 Name="VCResourceCompilerTool"
982 PreprocessorDefinitions=""
983 />
984 </FileConfiguration>
985 </File>
986 <File
987 RelativePath="..\wavestream.c"
988 >
989 <FileConfiguration
990 Name="Debug|Win32"
991 >
992 <Tool
993 Name="VCCLCompilerTool"
994 AdditionalIncludeDirectories=""
995 PreprocessorDefinitions=""
996 />
997 </FileConfiguration>
998 <FileConfiguration
999 Name="Debug|x64"
1000 >
1001 <Tool
1002 Name="VCCLCompilerTool"
1003 AdditionalIncludeDirectories=""
1004 PreprocessorDefinitions=""
1005 />
1006 </FileConfiguration>
1007 <FileConfiguration
1008 Name="Release|Win32"
1009 >
1010 <Tool
1011 Name="VCCLCompilerTool"
1012 AdditionalIncludeDirectories=""
1013 PreprocessorDefinitions=""
1014 />
1015 </FileConfiguration>
1016 <FileConfiguration
1017 Name="Release|x64"
1018 >
1019 <Tool
1020 Name="VCCLCompilerTool"
1021 AdditionalIncludeDirectories=""
1022 PreprocessorDefinitions=""
1023 />
1024 </FileConfiguration>
1025 </File>
1026 <File
1027 RelativePath="..\wavestream.h"
1028 >
1029 </File>
1030 </Files>
1031 <Globals>
1032 </Globals>
1033 </VisualStudioProject>
0 //Microsoft Developer Studio generated resource script.
1 //
2 #include "resource.h"
3
4 #define APSTUDIO_READONLY_SYMBOLS
5 /////////////////////////////////////////////////////////////////////////////
6 //
7 // Generated from the TEXTINCLUDE 2 resource.
8 //
9 #include "winresrc.h"
10
11 /////////////////////////////////////////////////////////////////////////////
12 #undef APSTUDIO_READONLY_SYMBOLS
13
14 /////////////////////////////////////////////////////////////////////////////
15 // English (U.S.) resources
16
17 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
18 #ifdef _WIN32
19 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 #pragma code_page(1252)
21 #endif //_WIN32
22
23 #ifndef _MAC
24 /////////////////////////////////////////////////////////////////////////////
25 //
26 // Version
27 //
28
29 VS_VERSION_INFO VERSIONINFO
30 FILEVERSION 2,0,0,0
31 PRODUCTVERSION 2,0,0,0
32 FILEFLAGSMASK 0x3fL
33 #ifdef _DEBUG
34 FILEFLAGS 0x1L
35 #else
36 FILEFLAGS 0x0L
37 #endif
38 FILEOS 0x40004L
39 FILETYPE 0x2L
40 FILESUBTYPE 0x0L
41 BEGIN
42 BLOCK "StringFileInfo"
43 BEGIN
44 BLOCK "040904b0"
45 BEGIN
46 VALUE "CompanyName", "\0"
47 VALUE "FileDescription", "SDL_mixer\0"
48 VALUE "FileVersion", "2, 0, 0, 0\0"
49 VALUE "InternalName", "SDL_mixer\0"
50 VALUE "LegalCopyright", "Copyright © 2013 Sam Lantinga\0"
51 VALUE "OriginalFilename", "SDL_mixer.dll\0"
52 VALUE "ProductName", "Simple DirectMedia Layer\0"
53 VALUE "ProductVersion", "2, 0, 0, 0\0"
54 END
55 END
56 BLOCK "VarFileInfo"
57 BEGIN
58 VALUE "Translation", 0x409, 1200
59 END
60 END
61
62 #endif // !_MAC
63
64
65 #ifdef APSTUDIO_INVOKED
66 /////////////////////////////////////////////////////////////////////////////
67 //
68 // TEXTINCLUDE
69 //
70
71 1 TEXTINCLUDE DISCARDABLE
72 BEGIN
73 "resource.h\0"
74 END
75
76 2 TEXTINCLUDE DISCARDABLE
77 BEGIN
78 "#include ""afxres.h""\r\n"
79 "\0"
80 END
81
82 3 TEXTINCLUDE DISCARDABLE
83 BEGIN
84 "\r\n"
85 "\0"
86 END
87
88 #endif // APSTUDIO_INVOKED
89
90 #endif // English (U.S.) resources
91 /////////////////////////////////////////////////////////////////////////////
92
93
94
95 #ifndef APSTUDIO_INVOKED
96 /////////////////////////////////////////////////////////////////////////////
97 //
98 // Generated from the TEXTINCLUDE 3 resource.
99 //
100
101
102 /////////////////////////////////////////////////////////////////////////////
103 #endif // not APSTUDIO_INVOKED
104
0 find . -depth -type d -name 'Debug' -exec rm -rv {} \;
1 find . -depth -type d -name 'Release' -exec rm -rv {} \;
2 find . -depth -type d -name 'x64' -empty -exec rmdir {} \;
3 find . -type f -name '*.user' -exec rm -v {} \;
4 find . -type f -name '*.ncb' -exec rm -v {} \;
5 find . -type f -name '*.suo' -exec rm -v {} \;
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__ALL_H
32 #define FLAC__ALL_H
33
34 #include "export.h"
35
36 #include "assert.h"
37 #include "callback.h"
38 #include "format.h"
39 #include "metadata.h"
40 #include "ordinals.h"
41 #include "stream_decoder.h"
42 #include "stream_encoder.h"
43
44 /** \mainpage
45 *
46 * \section intro Introduction
47 *
48 * This is the documentation for the FLAC C and C++ APIs. It is
49 * highly interconnected; this introduction should give you a top
50 * level idea of the structure and how to find the information you
51 * need. As a prerequisite you should have at least a basic
52 * knowledge of the FLAC format, documented
53 * <A HREF="../format.html">here</A>.
54 *
55 * \section c_api FLAC C API
56 *
57 * The FLAC C API is the interface to libFLAC, a set of structures
58 * describing the components of FLAC streams, and functions for
59 * encoding and decoding streams, as well as manipulating FLAC
60 * metadata in files. The public include files will be installed
61 * in your include area (for example /usr/include/FLAC/...).
62 *
63 * By writing a little code and linking against libFLAC, it is
64 * relatively easy to add FLAC support to another program. The
65 * library is licensed under <A HREF="../license.html">Xiph's BSD license</A>.
66 * Complete source code of libFLAC as well as the command-line
67 * encoder and plugins is available and is a useful source of
68 * examples.
69 *
70 * Aside from encoders and decoders, libFLAC provides a powerful
71 * metadata interface for manipulating metadata in FLAC files. It
72 * allows the user to add, delete, and modify FLAC metadata blocks
73 * and it can automatically take advantage of PADDING blocks to avoid
74 * rewriting the entire FLAC file when changing the size of the
75 * metadata.
76 *
77 * libFLAC usually only requires the standard C library and C math
78 * library. In particular, threading is not used so there is no
79 * dependency on a thread library. However, libFLAC does not use
80 * global variables and should be thread-safe.
81 *
82 * libFLAC also supports encoding to and decoding from Ogg FLAC.
83 * However the metadata editing interfaces currently have limited
84 * read-only support for Ogg FLAC files.
85 *
86 * \section cpp_api FLAC C++ API
87 *
88 * The FLAC C++ API is a set of classes that encapsulate the
89 * structures and functions in libFLAC. They provide slightly more
90 * functionality with respect to metadata but are otherwise
91 * equivalent. For the most part, they share the same usage as
92 * their counterparts in libFLAC, and the FLAC C API documentation
93 * can be used as a supplement. The public include files
94 * for the C++ API will be installed in your include area (for
95 * example /usr/include/FLAC++/...).
96 *
97 * libFLAC++ is also licensed under
98 * <A HREF="../license.html">Xiph's BSD license</A>.
99 *
100 * \section getting_started Getting Started
101 *
102 * A good starting point for learning the API is to browse through
103 * the <A HREF="modules.html">modules</A>. Modules are logical
104 * groupings of related functions or classes, which correspond roughly
105 * to header files or sections of header files. Each module includes a
106 * detailed description of the general usage of its functions or
107 * classes.
108 *
109 * From there you can go on to look at the documentation of
110 * individual functions. You can see different views of the individual
111 * functions through the links in top bar across this page.
112 *
113 * If you prefer a more hands-on approach, you can jump right to some
114 * <A HREF="../documentation_example_code.html">example code</A>.
115 *
116 * \section porting_guide Porting Guide
117 *
118 * Starting with FLAC 1.1.3 a \link porting Porting Guide \endlink
119 * has been introduced which gives detailed instructions on how to
120 * port your code to newer versions of FLAC.
121 *
122 * \section embedded_developers Embedded Developers
123 *
124 * libFLAC has grown larger over time as more functionality has been
125 * included, but much of it may be unnecessary for a particular embedded
126 * implementation. Unused parts may be pruned by some simple editing of
127 * src/libFLAC/Makefile.am. In general, the decoders, encoders, and
128 * metadata interface are all independent from each other.
129 *
130 * It is easiest to just describe the dependencies:
131 *
132 * - All modules depend on the \link flac_format Format \endlink module.
133 * - The decoders and encoders depend on the bitbuffer.
134 * - The decoder is independent of the encoder. The encoder uses the
135 * decoder because of the verify feature, but this can be removed if
136 * not needed.
137 * - Parts of the metadata interface require the stream decoder (but not
138 * the encoder).
139 * - Ogg support is selectable through the compile time macro
140 * \c FLAC__HAS_OGG.
141 *
142 * For example, if your application only requires the stream decoder, no
143 * encoder, and no metadata interface, you can remove the stream encoder
144 * and the metadata interface, which will greatly reduce the size of the
145 * library.
146 *
147 * Also, there are several places in the libFLAC code with comments marked
148 * with "OPT:" where a #define can be changed to enable code that might be
149 * faster on a specific platform. Experimenting with these can yield faster
150 * binaries.
151 */
152
153 /** \defgroup porting Porting Guide for New Versions
154 *
155 * This module describes differences in the library interfaces from
156 * version to version. It assists in the porting of code that uses
157 * the libraries to newer versions of FLAC.
158 *
159 * One simple facility for making porting easier that has been added
160 * in FLAC 1.1.3 is a set of \c #defines in \c export.h of each
161 * library's includes (e.g. \c include/FLAC/export.h). The
162 * \c #defines mirror the libraries'
163 * <A HREF="http://www.gnu.org/software/libtool/manual.html#Libtool-versioning">libtool version numbers</A>,
164 * e.g. in libFLAC there are \c FLAC_API_VERSION_CURRENT,
165 * \c FLAC_API_VERSION_REVISION, and \c FLAC_API_VERSION_AGE.
166 * These can be used to support multiple versions of an API during the
167 * transition phase, e.g.
168 *
169 * \code
170 * #if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
171 * legacy code
172 * #else
173 * new code
174 * #endif
175 * \endcode
176 *
177 * The the source will work for multiple versions and the legacy code can
178 * easily be removed when the transition is complete.
179 *
180 * Another available symbol is FLAC_API_SUPPORTS_OGG_FLAC (defined in
181 * include/FLAC/export.h), which can be used to determine whether or not
182 * the library has been compiled with support for Ogg FLAC. This is
183 * simpler than trying to call an Ogg init function and catching the
184 * error.
185 */
186
187 /** \defgroup porting_1_1_2_to_1_1_3 Porting from FLAC 1.1.2 to 1.1.3
188 * \ingroup porting
189 *
190 * \brief
191 * This module describes porting from FLAC 1.1.2 to FLAC 1.1.3.
192 *
193 * The main change between the APIs in 1.1.2 and 1.1.3 is that they have
194 * been simplified. First, libOggFLAC has been merged into libFLAC and
195 * libOggFLAC++ has been merged into libFLAC++. Second, both the three
196 * decoding layers and three encoding layers have been merged into a
197 * single stream decoder and stream encoder. That is, the functionality
198 * of FLAC__SeekableStreamDecoder and FLAC__FileDecoder has been merged
199 * into FLAC__StreamDecoder, and FLAC__SeekableStreamEncoder and
200 * FLAC__FileEncoder into FLAC__StreamEncoder. Only the
201 * FLAC__StreamDecoder and FLAC__StreamEncoder remain. What this means
202 * is there is now a single API that can be used to encode or decode
203 * streams to/from native FLAC or Ogg FLAC and the single API can work
204 * on both seekable and non-seekable streams.
205 *
206 * Instead of creating an encoder or decoder of a certain layer, now the
207 * client will always create a FLAC__StreamEncoder or
208 * FLAC__StreamDecoder. The old layers are now differentiated by the
209 * initialization function. For example, for the decoder,
210 * FLAC__stream_decoder_init() has been replaced by
211 * FLAC__stream_decoder_init_stream(). This init function takes
212 * callbacks for the I/O, and the seeking callbacks are optional. This
213 * allows the client to use the same object for seekable and
214 * non-seekable streams. For decoding a FLAC file directly, the client
215 * can use FLAC__stream_decoder_init_file() and pass just a filename
216 * and fewer callbacks; most of the other callbacks are supplied
217 * internally. For situations where fopen()ing by filename is not
218 * possible (e.g. Unicode filenames on Windows) the client can instead
219 * open the file itself and supply the FILE* to
220 * FLAC__stream_decoder_init_FILE(). The init functions now returns a
221 * FLAC__StreamDecoderInitStatus instead of FLAC__StreamDecoderState.
222 * Since the callbacks and client data are now passed to the init
223 * function, the FLAC__stream_decoder_set_*_callback() functions and
224 * FLAC__stream_decoder_set_client_data() are no longer needed. The
225 * rest of the calls to the decoder are the same as before.
226 *
227 * There are counterpart init functions for Ogg FLAC, e.g.
228 * FLAC__stream_decoder_init_ogg_stream(). All the rest of the calls
229 * and callbacks are the same as for native FLAC.
230 *
231 * As an example, in FLAC 1.1.2 a seekable stream decoder would have
232 * been set up like so:
233 *
234 * \code
235 * FLAC__SeekableStreamDecoder *decoder = FLAC__seekable_stream_decoder_new();
236 * if(decoder == NULL) do_something;
237 * FLAC__seekable_stream_decoder_set_md5_checking(decoder, true);
238 * [... other settings ...]
239 * FLAC__seekable_stream_decoder_set_read_callback(decoder, my_read_callback);
240 * FLAC__seekable_stream_decoder_set_seek_callback(decoder, my_seek_callback);
241 * FLAC__seekable_stream_decoder_set_tell_callback(decoder, my_tell_callback);
242 * FLAC__seekable_stream_decoder_set_length_callback(decoder, my_length_callback);
243 * FLAC__seekable_stream_decoder_set_eof_callback(decoder, my_eof_callback);
244 * FLAC__seekable_stream_decoder_set_write_callback(decoder, my_write_callback);
245 * FLAC__seekable_stream_decoder_set_metadata_callback(decoder, my_metadata_callback);
246 * FLAC__seekable_stream_decoder_set_error_callback(decoder, my_error_callback);
247 * FLAC__seekable_stream_decoder_set_client_data(decoder, my_client_data);
248 * if(FLAC__seekable_stream_decoder_init(decoder) != FLAC__SEEKABLE_STREAM_DECODER_OK) do_something;
249 * \endcode
250 *
251 * In FLAC 1.1.3 it is like this:
252 *
253 * \code
254 * FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
255 * if(decoder == NULL) do_something;
256 * FLAC__stream_decoder_set_md5_checking(decoder, true);
257 * [... other settings ...]
258 * if(FLAC__stream_decoder_init_stream(
259 * decoder,
260 * my_read_callback,
261 * my_seek_callback, // or NULL
262 * my_tell_callback, // or NULL
263 * my_length_callback, // or NULL
264 * my_eof_callback, // or NULL
265 * my_write_callback,
266 * my_metadata_callback, // or NULL
267 * my_error_callback,
268 * my_client_data
269 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
270 * \endcode
271 *
272 * or you could do;
273 *
274 * \code
275 * [...]
276 * FILE *file = fopen("somefile.flac","rb");
277 * if(file == NULL) do_somthing;
278 * if(FLAC__stream_decoder_init_FILE(
279 * decoder,
280 * file,
281 * my_write_callback,
282 * my_metadata_callback, // or NULL
283 * my_error_callback,
284 * my_client_data
285 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
286 * \endcode
287 *
288 * or just:
289 *
290 * \code
291 * [...]
292 * if(FLAC__stream_decoder_init_file(
293 * decoder,
294 * "somefile.flac",
295 * my_write_callback,
296 * my_metadata_callback, // or NULL
297 * my_error_callback,
298 * my_client_data
299 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
300 * \endcode
301 *
302 * Another small change to the decoder is in how it handles unparseable
303 * streams. Before, when the decoder found an unparseable stream
304 * (reserved for when the decoder encounters a stream from a future
305 * encoder that it can't parse), it changed the state to
306 * \c FLAC__STREAM_DECODER_UNPARSEABLE_STREAM. Now the decoder instead
307 * drops sync and calls the error callback with a new error code
308 * \c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM. This is
309 * more robust. If your error callback does not discriminate on the the
310 * error state, your code does not need to be changed.
311 *
312 * The encoder now has a new setting:
313 * FLAC__stream_encoder_set_apodization(). This is for setting the
314 * method used to window the data before LPC analysis. You only need to
315 * add a call to this function if the default is not suitable. There
316 * are also two new convenience functions that may be useful:
317 * FLAC__metadata_object_cuesheet_calculate_cddb_id() and
318 * FLAC__metadata_get_cuesheet().
319 *
320 * The \a bytes parameter to FLAC__StreamDecoderReadCallback,
321 * FLAC__StreamEncoderReadCallback, and FLAC__StreamEncoderWriteCallback
322 * is now \c size_t instead of \c unsigned.
323 */
324
325 /** \defgroup porting_1_1_3_to_1_1_4 Porting from FLAC 1.1.3 to 1.1.4
326 * \ingroup porting
327 *
328 * \brief
329 * This module describes porting from FLAC 1.1.3 to FLAC 1.1.4.
330 *
331 * There were no changes to any of the interfaces from 1.1.3 to 1.1.4.
332 * There was a slight change in the implementation of
333 * FLAC__stream_encoder_set_metadata(); the function now makes a copy
334 * of the \a metadata array of pointers so the client no longer needs
335 * to maintain it after the call. The objects themselves that are
336 * pointed to by the array are still not copied though and must be
337 * maintained until the call to FLAC__stream_encoder_finish().
338 */
339
340 /** \defgroup porting_1_1_4_to_1_2_0 Porting from FLAC 1.1.4 to 1.2.0
341 * \ingroup porting
342 *
343 * \brief
344 * This module describes porting from FLAC 1.1.4 to FLAC 1.2.0.
345 *
346 * There were only very minor changes to the interfaces from 1.1.4 to 1.2.0.
347 * In libFLAC, \c FLAC__format_sample_rate_is_subset() was added.
348 * In libFLAC++, \c FLAC::Decoder::Stream::get_decode_position() was added.
349 *
350 * Finally, value of the constant \c FLAC__FRAME_HEADER_RESERVED_LEN
351 * has changed to reflect the conversion of one of the reserved bits
352 * into active use. It used to be \c 2 and now is \c 1. However the
353 * FLAC frame header length has not changed, so to skip the proper
354 * number of bits, use \c FLAC__FRAME_HEADER_RESERVED_LEN +
355 * \c FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN
356 */
357
358 /** \defgroup flac FLAC C API
359 *
360 * The FLAC C API is the interface to libFLAC, a set of structures
361 * describing the components of FLAC streams, and functions for
362 * encoding and decoding streams, as well as manipulating FLAC
363 * metadata in files.
364 *
365 * You should start with the format components as all other modules
366 * are dependent on it.
367 */
368
369 #endif
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__ASSERT_H
32 #define FLAC__ASSERT_H
33
34 /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */
35 #ifdef DEBUG
36 #include <assert.h>
37 #define FLAC__ASSERT(x) assert(x)
38 #define FLAC__ASSERT_DECLARATION(x) x
39 #else
40 #define FLAC__ASSERT(x)
41 #define FLAC__ASSERT_DECLARATION(x)
42 #endif
43
44 #endif
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__CALLBACK_H
32 #define FLAC__CALLBACK_H
33
34 #include "ordinals.h"
35 #include <stdlib.h> /* for size_t */
36
37 /** \file include/FLAC/callback.h
38 *
39 * \brief
40 * This module defines the structures for describing I/O callbacks
41 * to the other FLAC interfaces.
42 *
43 * See the detailed documentation for callbacks in the
44 * \link flac_callbacks callbacks \endlink module.
45 */
46
47 /** \defgroup flac_callbacks FLAC/callback.h: I/O callback structures
48 * \ingroup flac
49 *
50 * \brief
51 * This module defines the structures for describing I/O callbacks
52 * to the other FLAC interfaces.
53 *
54 * The purpose of the I/O callback functions is to create a common way
55 * for the metadata interfaces to handle I/O.
56 *
57 * Originally the metadata interfaces required filenames as the way of
58 * specifying FLAC files to operate on. This is problematic in some
59 * environments so there is an additional option to specify a set of
60 * callbacks for doing I/O on the FLAC file, instead of the filename.
61 *
62 * In addition to the callbacks, a FLAC__IOHandle type is defined as an
63 * opaque structure for a data source.
64 *
65 * The callback function prototypes are similar (but not identical) to the
66 * stdio functions fread, fwrite, fseek, ftell, feof, and fclose. If you use
67 * stdio streams to implement the callbacks, you can pass fread, fwrite, and
68 * fclose anywhere a FLAC__IOCallback_Read, FLAC__IOCallback_Write, or
69 * FLAC__IOCallback_Close is required, and a FILE* anywhere a FLAC__IOHandle
70 * is required. \warning You generally CANNOT directly use fseek or ftell
71 * for FLAC__IOCallback_Seek or FLAC__IOCallback_Tell since on most systems
72 * these use 32-bit offsets and FLAC requires 64-bit offsets to deal with
73 * large files. You will have to find an equivalent function (e.g. ftello),
74 * or write a wrapper. The same is true for feof() since this is usually
75 * implemented as a macro, not as a function whose address can be taken.
76 *
77 * \{
78 */
79
80 #ifdef __cplusplus
81 extern "C" {
82 #endif
83
84 /** This is the opaque handle type used by the callbacks. Typically
85 * this is a \c FILE* or address of a file descriptor.
86 */
87 typedef void* FLAC__IOHandle;
88
89 /** Signature for the read callback.
90 * The signature and semantics match POSIX fread() implementations
91 * and can generally be used interchangeably.
92 *
93 * \param ptr The address of the read buffer.
94 * \param size The size of the records to be read.
95 * \param nmemb The number of records to be read.
96 * \param handle The handle to the data source.
97 * \retval size_t
98 * The number of records read.
99 */
100 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
101
102 /** Signature for the write callback.
103 * The signature and semantics match POSIX fwrite() implementations
104 * and can generally be used interchangeably.
105 *
106 * \param ptr The address of the write buffer.
107 * \param size The size of the records to be written.
108 * \param nmemb The number of records to be written.
109 * \param handle The handle to the data source.
110 * \retval size_t
111 * The number of records written.
112 */
113 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
114
115 /** Signature for the seek callback.
116 * The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT
117 * EXCEPTION: the offset is a 64-bit type whereas fseek() is generally 'long'
118 * and 32-bits wide.
119 *
120 * \param handle The handle to the data source.
121 * \param offset The new position, relative to \a whence
122 * \param whence \c SEEK_SET, \c SEEK_CUR, or \c SEEK_END
123 * \retval int
124 * \c 0 on success, \c -1 on error.
125 */
126 typedef int (*FLAC__IOCallback_Seek) (FLAC__IOHandle handle, FLAC__int64 offset, int whence);
127
128 /** Signature for the tell callback.
129 * The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT
130 * EXCEPTION: the offset is a 64-bit type whereas ftell() is generally 'long'
131 * and 32-bits wide.
132 *
133 * \param handle The handle to the data source.
134 * \retval FLAC__int64
135 * The current position on success, \c -1 on error.
136 */
137 typedef FLAC__int64 (*FLAC__IOCallback_Tell) (FLAC__IOHandle handle);
138
139 /** Signature for the EOF callback.
140 * The signature and semantics mostly match POSIX feof() but WATCHOUT:
141 * on many systems, feof() is a macro, so in this case a wrapper function
142 * must be provided instead.
143 *
144 * \param handle The handle to the data source.
145 * \retval int
146 * \c 0 if not at end of file, nonzero if at end of file.
147 */
148 typedef int (*FLAC__IOCallback_Eof) (FLAC__IOHandle handle);
149
150 /** Signature for the close callback.
151 * The signature and semantics match POSIX fclose() implementations
152 * and can generally be used interchangeably.
153 *
154 * \param handle The handle to the data source.
155 * \retval int
156 * \c 0 on success, \c EOF on error.
157 */
158 typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle);
159
160 /** A structure for holding a set of callbacks.
161 * Each FLAC interface that requires a FLAC__IOCallbacks structure will
162 * describe which of the callbacks are required. The ones that are not
163 * required may be set to NULL.
164 *
165 * If the seek requirement for an interface is optional, you can signify that
166 * a data sorce is not seekable by setting the \a seek field to \c NULL.
167 */
168 typedef struct {
169 FLAC__IOCallback_Read read;
170 FLAC__IOCallback_Write write;
171 FLAC__IOCallback_Seek seek;
172 FLAC__IOCallback_Tell tell;
173 FLAC__IOCallback_Eof eof;
174 FLAC__IOCallback_Close close;
175 } FLAC__IOCallbacks;
176
177 /* \} */
178
179 #ifdef __cplusplus
180 }
181 #endif
182
183 #endif
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__EXPORT_H
32 #define FLAC__EXPORT_H
33
34 /** \file include/FLAC/export.h
35 *
36 * \brief
37 * This module contains #defines and symbols for exporting function
38 * calls, and providing version information and compiled-in features.
39 *
40 * See the \link flac_export export \endlink module.
41 */
42
43 /** \defgroup flac_export FLAC/export.h: export symbols
44 * \ingroup flac
45 *
46 * \brief
47 * This module contains #defines and symbols for exporting function
48 * calls, and providing version information and compiled-in features.