Skip to content

Commit addd35b

Browse files
committed
implemented basic sound system
1 parent 5c8fa81 commit addd35b

37 files changed

+4340
-0
lines changed

3rdParty/SDL2_mixer/LICENSE.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
2+
3+
This software is provided 'as-is', without any express or implied
4+
warranty. In no event will the authors be held liable for any damages
5+
arising from the use of this software.
6+
7+
Permission is granted to anyone to use this software for any purpose,
8+
including commercial applications, and to alter it and redistribute it
9+
freely, subject to the following restrictions:
10+
11+
1. The origin of this software must not be misrepresented; you must not
12+
claim that you wrote the original software. If you use this software
13+
in a product, an acknowledgment in the product documentation would be
14+
appreciated but is not required.
15+
2. Altered source versions must be plainly marked as such, and must not be
16+
misrepresented as being the original software.
17+
3. This notice may not be removed or altered from any source distribution.

3rdParty/SDL2_mixer/README.txt

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
SDL_mixer 2.0
3+
4+
The latest version of this library is available from GitHub:
5+
https://github.com/libsdl-org/SDL_mixer/releases
6+
7+
Due to popular demand, here is a simple multi-channel audio mixer.
8+
It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, Ogg, VOC, and WAV format audio. It can also load MIDI, MOD, and Opus audio, depending on build options (see the note below for details.)
9+
10+
See the header file SDL_mixer.h and the examples playwave.c and playmus.c for documentation on this mixer library. This documentation is also available online at https://wiki.libsdl.org/SDL_mixer
11+
12+
The process of mixing MIDI files to wave output is very CPU intensive, so if playing regular WAVE files sound great, but playing MIDI files sound choppy, try using 8-bit audio, mono audio, or lower frequencies.
13+
14+
If you have built with FluidSynth support, you'll need to set the SDL_SOUNDFONTS environment variable to a Sound Font 2 (.sf2) file containing the musical instruments you want to use for MIDI playback.
15+
(On some Linux distributions you can install the fluid-soundfont-gm package)
16+
17+
To play MIDI files using Timidity, you'll need to get a complete set of GUS patches from:
18+
http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
19+
and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
20+
21+
This library is under the zlib license, see the file "LICENSE.txt" for details.
22+
23+
Note:
24+
Support for software MIDI, MOD, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
25+
- When building with CMake, you can enable the appropriate SDL2MIXER_* options defined in CMakeLists.txt. SDL2MIXER_VENDORED allows switching between system and vendored libraries.
26+
- When building with configure/make, you can build and install them normally and the configure script will detect and use them.
27+
- When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project.
28+
- When building with Xcode, you can edit the config at the top of the project to enable them, and you will need to include the appropriate framework in your application.
29+
- For Android, you can edit the config at the top of Android.mk to enable them.
30+
31+
The default MP3 support is provided using minimp3. SDL_mixer also supports using libmpg123: you can enable it by passing --enable-music-mp3-mpg123 to configure.

0 commit comments

Comments
 (0)