Commit Graph

27 Commits (master)

Author SHA1 Message Date
Tushar Maheshwari 3a4f49ad90 Revisit #includes
Consolidate the include statements scattered across the code in accordance
with the comment in C4Include.h. The advantages are listed in the same
comment.
Furthermore, it follows llvm-include-order which is the logical
extrapolation of the project's style guideline wherever possible
(C4Include.h being the most-frequent exception).
2017-05-15 13:24:59 +02:00
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 0c1abe69f9 Get rid of FMOD
Not only is FMOD neither free (libre) nor free (gratis), the version we
support(ed) is also impossible to legally obtain anymore. So there's no
reason we should keep code around that (pretends to) support a library
nobody can use or test.
2015-10-12 17:34:26 +02:00
Armin Burgmeier d28913a1cb Optimize loading of ogg files
Try to load the whole data in one go instead of re-allocating a vector every
8K bytes. This otherwise results in a lot of reallocations for O(MB)
(uncompressed) sound data.

This speeds up engine initialization by about a second for me.
2015-10-09 18:43:10 -04:00
Sven Eberhardt 283277ac82 Do not pre-load file contents from unpacked music folders ($1378).
Removes several seconds from startup time and ~150MB memory usage. Note that tags are still loaded so all file headers do have to be accessed.
2015-09-06 00:02:17 -04:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Sven Eberhardt e1a09298d4 Fix a few harmless warnings. 2015-01-25 16:16:06 +01:00
Martin Plicht cf474e99aa mac: Rearrange sound toolkit includes and FindAudio.cmake so that sound+music works for OSX 2014-09-21 22:16:54 +02:00
Nicolas Hake 642ce2eb9c Merge all of the audio provider switches into one
There's no point in splitting the audio library selection into multiple
CPP macros, since there can always only be one anyway. Merge all of them
into a single macro AUDIO_TK (for "toolkit") and have CMake select one
for the user, instead of making him choose (and potentially failing).
2014-08-01 23:37:42 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Sven Eberhardt 00349f045a SoundSystem: Implement non-apple wav loading when using OpenAL 2012-10-07 13:18:28 +02:00
Sven Eberhardt 15aa9b961e FIx build using OpenAL in MSVC 2012-10-05 18:02:52 +02:00
Günther Brammer 90f4f7f77b Work around crash bug in SDL_mixer 1.2.12
See http://bugzilla.libsdl.org/show_bug.cgi?id=1418 for details
2012-02-12 21:28:17 +01:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Günther Brammer cde66b249f C4Include.h: Do not include C4Gui.h
The two dialogs in headers included in C4Game.h are only used by classes in
those headers, and do not need to be defined in the headers.
2011-01-24 01:15:58 +01:00
Günther Brammer 7771a58f38 Do not include SDL_mixer.h from headers
In case the header is included but not used by a program compiled without
sound support.
2011-01-24 01:17:06 +01:00
Martin Plicht b4157c5ec9 C4SoundLoaders: Remove duplicate header includes 2010-12-13 21:54:44 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Maikel de Vries 1d83895487 C4Soundloaders.cpp: Fixed broken build 2010-12-07 18:56:55 +01:00
Martin Plicht 8ddeb8ebdb Some fixes to C4SoundLoaders 2010-10-02 01:06:51 +02:00
Nicolas Hake 75a723ec8b fmod: Fixed incorrect sample length calculation (#437)
The crash was caused by an incorrect integer division in the sound
loader that was supposed to be a double division. Sounds shorter than
a second were reported to have zero length because of this, leading
to a division by zero in the playback code.
2010-10-02 18:48:43 +02:00
Nicolas Hake 780873c25f fmod: fix memleak in error path of soundloader
When the FMOD sound loader is unable to get the frequency of a loaded
sample, the sample was not freed, leading to a memory leak.
2010-09-28 23:50:31 +02:00
Nicolas Hake d89857de86 Fix FMOD sound loader 2010-09-28 04:54:35 +02:00
Martin Plicht 243e20bdf6 Add OpenAL implementation of C4SoundSystem
With an Ogg Vorbis loader using libvorbis and a .wav loader using a macosx
API.

Günther: Add autotools support
2010-09-26 02:36:35 +02:00