Commit Graph

59 Commits (c9ee2c3eaba27a0b9f7ee115a3f6174e5aff4aab)

Author SHA1 Message Date
Lukas Werling c9ee2c3eab Fix "no matching sound" error spam
Previously, the error message was only silenced for openclonk-server,
but appeared for openclonk if compiled without sounds.

Possible side effect: no local sounds will play if the global Sound.ocg
cannot be loaded. I don't think this is something we should support.
2019-02-20 09:36:35 +01:00
Lukas Werling ee35d256aa Add basic character classes to WildcardMatch() 2019-02-03 19:14:53 +01:00
Julius Michaelis d94dcc8267 Fix iLevel parameter of SoundAt (#1681) 2017-12-05 16:57:14 +01:00
Julius Michaelis a630d2b94b Silence "Warning: could not find sound matching '...'" in openclonk-server 2017-08-26 10:56:14 +02:00
Tushar Maheshwari a661eab867 Automatic fixes using clang-tidy for header files
A follow-up on a previous PR GH-41. The discussion in the forum can be
viewed at http://forum.openclonk.org/topic_show.pl?pid=33086.
Run clang-tidy (without auto, pass-by-value and using checks) to fix the
header files not modified in the previous PR.

Summary of the changes:

 - C++11 member initialization.
 - nullptr instead of 0 for pointers.
 - override for functions declared virtual in base class.
 - default trivial special member functions
2017-05-15 13:46:46 +02:00
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
Tushar Maheshwari e58a7884e4 Automatic fixes using clang-tidy
See http://forum.openclonk.org/topic_show.pl?tid=3376 for discussion.

Close GH-41
2017-05-03 20:30:45 +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
Lukas Werling e33066a4f2 Rename SafeRandom() to UnsyncedRandom() 2016-04-25 17:32:23 +02: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
David Dormagen 35fe8f8683 sound system: warn about missing sounds (in debug mode only) 2015-12-10 19:35:55 +01:00
Sven Eberhardt ad2de2e012 Do not interpret all .ocg files in definitions and scenarios as sound subgroups. 2015-12-07 00:11:29 -05:00
Sven Eberhardt 96082569bd Allow sounds in subfolders and create namespaces for them (#1185) 2015-12-06 23:44:41 -05:00
Sven Eberhardt 6ab6a1ac3c Add script interface for some EFX sound modifiers. 2015-08-27 21:44:23 -04:00
Sven Eberhardt 134fc2799b Do not remove looping sounds on inaudibility in OpenAL.
This caused some sounds to not play at all when the object was inaudible at the position the sound was initially launched, but then moved into view (e.g. elevator cases or the planes in The Raid).
2015-08-09 21:28:29 -04:00
Sven Eberhardt d92df758a8 Added pitch parameter to Sound() script function and allow pitch and sound level to be modified for sounds that have already been started.
Sound() called when the instance is already running used to fail. Now, it always succeeds (also for script sync safety) but updates the sound level and pitch parameters. SoundAt has not been modified since it allows creation of multiple concurrent sound instance of the same effect without object context.
2015-08-09 18:40:42 -04:00
Sven Eberhardt 8ca07b7bc4 Fix left/right audio pan in OpenAL build. 2015-08-09 17:36:54 -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
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Günther Brammer a92c22a7b3 Merge various build system fixes and cleanups 2015-01-25 18:50:29 +01:00
Sven Eberhardt e1a09298d4 Fix a few harmless warnings. 2015-01-25 16:16:06 +01:00
Günther Brammer 86842da9bd Remove implementation details from C4SoundSystem.h
This eliminates the need to include Audio toolkit headers from there.
2015-01-03 22:01:08 +01: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
Tobias Zwick fe2a400c02 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:27:01 +07:00
Tobias Zwick ceca8b8fc7 add SoundAt function in C4Script (part of #238), document
also, extend the documentation for Sound with previously undocumented parameters; threw out undocumented and also unused "multiple" parameter.
2013-11-29 18:20:36 +07:00
Tobias Zwick ecf538cd1f refactor: consistently use time_t t... variables for times in sound system, stats, application and player controls 2013-11-29 14:16:14 +07:00
Sven Eberhardt 451f11bd37 Fix looping sounds under OpenAL 2013-04-09 22:31:02 +02:00
Sven Eberhardt 3a7eb5bcd6 oops. remove superfluous debug log. 2013-02-27 00:27:14 +01:00
Sven Eberhardt f5647d05fe Fix sound volume when using OpenAL 2013-02-27 00:20:49 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Sven Eberhardt dada37d70e Sound system: Fix leaking channels when using OpenAL. (This caused sounds to stop after playing for a while) 2012-10-07 17:03:46 +02:00
Sven Eberhardt 6e953acc88 Sound system: Fix endless recursion when a sound couldn't be started due to lack of free channels 2012-10-07 16:34:08 +02:00
Sven Eberhardt 15aa9b961e FIx build using OpenAL in MSVC 2012-10-05 18:02:52 +02:00
Julius Michaelis 926e251931 Fix SoundSystem, attempt #4 2011-10-15 14:43:18 +02:00
Julius Michaelis 74af3071e3 C4SoundSystem: Load all sounds statically
Enable true wildcards in sound names
Fix #680 / 115b63d14d54
2011-10-13 17:05:40 +02:00
Günther Brammer 4aa119af21 Make C4SoundSystem.cpp utf-8 again 2011-10-13 02:09:50 +02:00
Julius Michaelis 0f12b3485e Find sounds with all extensions instead of only wav, so Sound() does no longer require .ogg extensions
Do not replace * with ? in sound name wildcards anymore, adjust scripts
2011-10-12 23:09:22 +02:00
Nicolas Hake 8d8b087808 Return NULL instead of ((T*)false) from more functions 2011-09-28 19:42:56 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02: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 6c2a89eaf8 Replace timeGetTime with a platformneutral GetTime wrapper 2011-03-13 17:25:35 +01:00
Günther Brammer 8ff6ae847c C4Group::LoadEntry takes pointer instead of non-const reference 2011-03-05 02:44:26 +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
Armin Burgmeier 9f74506e9b Support loading game data from system path 2011-01-06 21:18:13 +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
Martin Plicht 44928f1a8d Platform-specific code in C4Console.cpp gets factored out into C4Console(Win32/GTK).cpp 2010-12-11 19:50:38 +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