Commit Graph

210 Commits

Author SHA1 Message Date
hendricks266 a557eedf7e Remove NULL checks before calling free(): they are unnecessary as per the C standard. Other cleanup includes factoring code into DO_FREE_AND_NULL() macros.
git-svn-id: https://svn.eduke32.com/eduke32@5352 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:31 +00:00
hendricks266 c82d98fc77 Update the precompiled Windows libraries: libogg 1.3.2, libvorbis 1.3.5
git-svn-id: https://svn.eduke32.com/eduke32@5342 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-08 02:58:10 +00:00
helixhorned 73ca265137 Fix various, but not all warnings.
Except:
 - missing braces around initializer [-Wmissing-braces]: due to union-in-struct
   vec3f_t
 - comparison between signed and unsigned integer expressions [-Wsign-compare]:
   in polymer.c

git-svn-id: https://svn.eduke32.com/eduke32@5309 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 17:23:17 +00:00
terminx 26933ecdc2 More audiolib cleanup, remove 8-bit output support.
git-svn-id: https://svn.eduke32.com/eduke32@5272 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:09 +00:00
terminx 08b101eaed Rework audiolib, interim commit before removing 8-bit output support. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5270 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:33:56 +00:00
terminx b5c5611270 Fix crash when playing back an .ogg with comment metadata that doesn't contain "=".
git-svn-id: https://svn.eduke32.com/eduke32@5260 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-04 00:03:55 +00:00
hendricks266 e9655f8469 Add SW to our build system and make relevant changes to avoid fatal build errors.
git-svn-id: https://svn.eduke32.com/eduke32@5197 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 21:56:03 +00:00
hendricks266 c47ebac6c1 AudioLib: When handling a LOOP_END tag in FLAC or Ogg, truncate any blocks that read past it so that the specified value is respected precisely, instead of rounding up to the nearest block size.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5163 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-24 00:09:42 +00:00
hendricks266 940bef522d AudioLib: malloc + memset to zero --> calloc
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5162 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-24 00:09:19 +00:00
helixhorned 25402be9f2 Fix freeze on pitch 0 sound playback introduced in r4616.
Reported in
http://forums.duke4.net/topic/3857-the-crash-thread/page__view__findpost__p__220954

Now, PitchTable[] in initialized with the same values as pre-r4608.

git-svn-id: https://svn.eduke32.com/eduke32@5131 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-11 13:53:06 +00:00
terminx 27e8fcbe57 A whole bunch of mostly insignificant changes that didn't deserve separate commits. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4997 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:48 +00:00
hendricks266 ef4a19bb50 Fix a bug where FLAC sound effects would loop when they were not supposed to.
git-svn-id: https://svn.eduke32.com/eduke32@4947 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-25 12:17:25 +00:00
hendricks266 b8783d0448 Fix warning in previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4929 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-17 05:40:42 +00:00
hendricks266 011fd40dda CON: Add new commands "getmusicposition" and "setmusicposition" that operate on the playback position of the current music track.
// Example: Switch between tracks like radio stations.
 getmusicposition temp
 starttrackvar next_music_track
 setmusicposition temp

Only implemented for Ogg Vorbis, FLAC, and XA. Consult the devs before using these commands.

git-svn-id: https://svn.eduke32.com/eduke32@4928 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-17 00:28:49 +00:00
hendricks266 9268b9f0b6 Make a bunch of things extern "C". This should fix C++ builds on OS X and with Lunatic. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4766 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-26 04:39:23 +00:00
terminx 99e21ffa94 Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4747 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:32:56 +00:00
hendricks266 6ff363a049 OS X: Add a preliminary Xcode project. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4646 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-18 04:50:47 +00:00
terminx 5d1475b26c Remove some #if 0'd functions from audiolib
git-svn-id: https://svn.eduke32.com/eduke32@4621 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:12:57 +00:00
terminx f8b340de02 Next time I'll test with sound enabled when attempting to fix a warning in audiolib ;)
git-svn-id: https://svn.eduke32.com/eduke32@4616 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:09:03 +00:00
terminx bd26dd5612 Fix a compile warning
git-svn-id: https://svn.eduke32.com/eduke32@4608 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:07:14 +00:00
hendricks266 4e5788a32d Delete empty folders and update ignore properties.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4554 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-23 07:58:03 +00:00
hendricks266 e79a2fe828 MSVC build system consolidation.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4553 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-23 07:21:29 +00:00
hendricks266 b332189ae5 Ball-busting Makefile restructure.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4543 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 07:25:54 +00:00
hendricks266 c1c01f0e0b Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4541 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-20 08:55:56 +00:00
terminx d287b50cd7 Android updates from Emile. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4440 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-15 19:02:48 +00:00
hendricks266 70caa24f24 MSVC: Set up support for SDL2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4326 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 07:39:09 +00:00
hendricks266 8f9ffcf23f MSVC: Add support for x64 building and all synthesis libs (libpng/zlib, libvpx, libFLAC).
External ogg/vorbis are no longer required.

git-svn-id: https://svn.eduke32.com/eduke32@4320 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:59:42 +00:00
hendricks266 fd3712ab22 Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:58:38 +00:00
helixhorned 2b583e9c9e gloadtex() cleanup, make some vars in kplib.c static, add source/valgrind_errors.log.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4295 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 15:56:13 +00:00
helixhorned f7035da876 Some functionality-conserving cleanup of jaudiolib code.
git-svn-id: https://svn.eduke32.com/eduke32@4288 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-01 16:19:57 +00:00
hendricks266 b2a3aec334 audiolib: Introduce support for PlayStation CD-XA audio, a simple ADPCM format.
It's functional, but due to the odd 37.8 KHz nature of the format, I will need to add a resampler to the audiolib to prevent the aliasing artifacts that occur at present. I also hear clicks/pops every so often, but I do not know if a resampler would fix these as well or if they are a separate problem.

Note that you cannot directly use the four XA files on the Total Meltdown disc because they each contain eight songs. They would need to be split using a utility I wrote that is outside the scope of this SVN.

git-svn-id: https://svn.eduke32.com/eduke32@4268 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:30:00 +00:00
helixhorned 0ab2814f2e jaudiolib: don't attempt audio format auto-detection for less than 12 bytes.
git-svn-id: https://svn.eduke32.com/eduke32@4263 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-24 21:38:59 +00:00
helixhorned 9688dccfff multivoc.c: use a local variable instead of a file-scope one used locally.
git-svn-id: https://svn.eduke32.com/eduke32@4183 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-28 21:18:09 +00:00
hendricks266 db69800fd0 Split the handling of audio based on RENDERTYPE into a new variable named MIXERTYPE, allowing Windows builds to use SDL for input and rendering (RENDERTYPE=SDL) while using DirectSound and Windows' MIDI interface (MIXERTYPE=WIN [current default]) so that EMIDI works.
git-svn-id: https://svn.eduke32.com/eduke32@4084 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:03 +00:00
hendricks266 612284cfea Improve SDL2 support as much as I can, for now. The game compiles, links, and starts, but all three renderers either don't display correctly or crash.
To build with SDL2: make RENDERTYPE=SDL SDL_TARGET=2

git-svn-id: https://svn.eduke32.com/eduke32@4074 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-06 07:49:53 +00:00
helixhorned a6a4e30bbc Fix playing ambient sounds at max volume for split sec on entering their range.
This is done by always calling FX_PlayAuto3D() to play such sounds. It now
additionally takes a third argument 'loophow', permissible values being
FX_ONESHOT and FX_LOOP.

git-svn-id: https://svn.eduke32.com/eduke32@3631 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:58:17 +00:00
hendricks266 719efefbf0 Wii: Take advantage of libogc features: PNG screenshots (libpng/zlib), Ogg Vorbis audio (libtremor), and high-resolution profiling timers.
FLAC and VPX remain out in the cold.

git-svn-id: https://svn.eduke32.com/eduke32@3497 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:50:42 +00:00
hendricks266 624841257c Wii: Fix most warnings. Three remain: two are labeled with FIXMEs; the third consists of signed/unsigned comparisons involving LSWAPIB() in kplib.c.
git-svn-id: https://svn.eduke32.com/eduke32@3496 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:50:08 +00:00
hendricks266 75e5cebfff Wii: Fix build.
git-svn-id: https://svn.eduke32.com/eduke32@3494 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:48:18 +00:00
hendricks266 05a550c08d Address some macro madness in jaudiolib. (Should fix PowerPC builds.)
git-svn-id: https://svn.eduke32.com/eduke32@3370 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:29:03 +00:00
hendricks266 bf566e10a8 Rectify.
git-svn-id: https://svn.eduke32.com/eduke32@3340 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 11:27:07 +00:00
hendricks266 be03f29484 Clean up and factor jaudiolib.
git-svn-id: https://svn.eduke32.com/eduke32@3338 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:59:21 +00:00
hendricks266 11e0897def Fix the gap between loops of ambient MUSICANDSFX sounds like BAR_MUSIC.
git-svn-id: https://svn.eduke32.com/eduke32@3336 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:58:09 +00:00
hendricks266 3933471e4b All kneel, king FLAC is here.
FLAC source from git commit 0920bc1ffb07f038b317e7e8056509fe0e4b680e, patched by me.

Windows libFLAC.a built using i686-MinGW-w64 and x86_64-MinGW-w64.

HUGE thanks to rhoenie for building the Mac fat library (ppc, i686, x86_86).

git-svn-id: https://svn.eduke32.com/eduke32@3335 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:57:24 +00:00
hendricks266 95dd57154e Clean up some file and directory structure.
* Renamed source/jaudiolib/third-party/mingw32 to source/jaudiolib/third-party/Windows.
* Moved source/jaudiolib/third-party/Windows/include to source/jaudiolib/third-party/common/include to use both on Windows and Apple.
* Deleted Apple/lib/include/{ogg,vorbis}/, see previous point.
* Deleted Apple/lib/libvorbisenc.a, 6MB saved.
* Moved Apple/lib/lib{ogg,vorbis,vorbisfile}.a to source/jaudiolib/third-party/Apple/lib, where they belong.
* Moved source files in Apple/ to source/, where they belong. (SDLMain.[mh] stay.)
* Deleted source/jaudiolib/third-party/{ogg,vorbis}.framework, not used any more.
* Renamed "StartupWinController*" to "startosx*".

git-svn-id: https://svn.eduke32.com/eduke32@3334 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:54:35 +00:00
terminx 8e61bff6f1 Bump DirectSound version to 8. This shouldn't really affect anything as the API is the same for all of the bits we make use of, but certain sets of DirectX headers/libs seem to be lacking v7 support.
git-svn-id: https://svn.eduke32.com/eduke32@3333 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:23:28 +00:00
terminx feaf4a7988 Remove FX_ASSVersion and related code since it wasn't used anywhere
git-svn-id: https://svn.eduke32.com/eduke32@3332 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:23:14 +00:00
terminx 61a8eaf666 Throw a compiler warning when building with only the null sound driver
git-svn-id: https://svn.eduke32.com/eduke32@3331 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:22:55 +00:00
terminx 0ae2d9ad60 Fix DirectSound in MSVC builds and remove the dependency on the DirectX SDK
git-svn-id: https://svn.eduke32.com/eduke32@3330 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:22:39 +00:00
terminx ba8d1a5c1e Change a few paths in various MSVC Makefiles to better suit my current dev environment. This doesn't really affect anyone else since these paths need to be customized to fit whatever machine by anyone building with MSVC anyway.
git-svn-id: https://svn.eduke32.com/eduke32@3282 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 17:13:17 +00:00