Commit Graph

523 Commits

Author SHA1 Message Date
Bill Currie dfa7af03c6 [util] Plug a thread-safety hole in plists 2021-02-09 09:57:07 +09:00
Bill Currie 0bfb60775e [util] Ensure hunk allocs are cache alligned
This doesn't seem to make much difference in the vulkan renderer, but it
certainly doesn't hurt.
2021-02-03 13:19:19 +09:00
Bill Currie 7970525ef4 [util] Make va thread-safe
It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
2021-01-31 16:05:48 +09:00
Bill Currie 86b5b30b45 Merge branch 'master' into vulkan 2020-06-25 14:03:52 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie 4cef9792f4 [util] Make hash-tables semi-thread-safe
They take a pointer to a free-list used for hashlinks so the hashlink
pools can be per-thread. However, hash tables that are not updated are
always thread-safe, so this affects only updates. progs_t has been set
up such that it is easy for multiple progs within one thread can share
hashlinks.
2020-03-25 15:43:16 +09:00
Bill Currie d0c8d75e92 Clean up unnecessary includes of signal.h 2020-03-23 16:18:08 +09:00
Bill Currie a9c6974fc7 [audio] Quieten jack about xruns
They messages are annoying at the moment, but I will want them when I
get around to chasing down the root cause, so hidden behind a developer
mask.
2020-03-23 15:19:05 +09:00
Bill Currie 4e4d1b99b4 Clean up all the system shutdown calls
I added Sys_RegisterShutdown years ago and never really did anything
with it: now any system that needs to be shutdown can ensure it gets
shutdown on program exit, and in the correct order (ie, reverse to init
order).
2019-07-12 23:15:26 +09:00
Bill Currie 34bcf7faab Do a pure/const/noreturn/format attribute pass.
I always wanted these, but as gcc now provides warnings for functions that
could do with such attributes, finding all the functions is much easier.
2018-10-09 12:42:21 +09:00
Bill Currie 2329fb1885 Fix some warnings and bitrot. 2016-10-25 00:10:30 +09:00
Bill Currie 3efb0c538f Separate file search from loading.
QFS_LoadFile (and its wrappers) now  take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Bill Currie 25a060f369 Remove the foundname param from _QFS_FOpenFile.
It's now obsolete with qfs_foundfile.
2014-01-28 16:22:05 +09:00
Bill Currie f5501fbf24 Fix a pile of automake deprecation warnings.
s/INCLUDES/AM_CPPFLAGS/g

I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie e27d7cbd2d Handle alloca "correctly".
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie f1aefc969d Fix some 64-bit mingw compile issues.
Just one more issue to fix (alloca), but with a hack, QF compiles (no clue
yet if it works: wine doesn't seem to be an option at this stage)
2013-01-22 21:02:49 +09:00
Bill Currie f3682069e2 Ensure the float pointer to SND_Convert is aligned.
This should fix johnny's SIGBUS.
2013-01-19 16:09:32 +09:00
Bill Currie 6eb6b6c0ba Change pointer_t to unsigned and clean up the mess.
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie 7b38b0b339 Make S_Init safe to use with a null viewentity.
Current work in qwaq doesn't need 3d spacialization, so it wants to pass
null for the viewentity pointer.
2012-12-17 15:07:49 +09:00
Bill Currie ec42bde527 Make hash tables more const correct.
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie 0bd613b73d Disable vorbisfile's static callbacks.
Since we use callbacks anyway, they're not needed, and this fixes the
warnings/errors when using ps3toolchain.
2012-08-19 08:05:50 +09:00
Bill Currie 6200d35109 Don't include SDL_byteorder.h
We don't need it and it's not always available.
2012-08-18 21:35:24 +09:00
Bill Currie 7d84800250 Remove an unnecessary if.
It needed during initial development of the patch, but with the refactoring
of s_init, it became redundant.
2012-05-28 07:58:11 +09:00
Bill Currie 01fb4f265d Attempt to reconnect to jack on loss of connection. 2012-05-28 07:46:22 +09:00
Bill Currie 23a38738fc Massive whitespace cleanup.
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie ce6ab908a5 Don't include the specific plugin headers in plugin.h.
This lets files that use plugins not depend on plugins they don't use.
2012-02-13 22:02:07 +09:00
Bill Currie 699ab70482 Fix audio again.
Bah, even though audio no longer needs models, it was still linking with
it :P
2012-02-13 16:44:30 +09:00
Bill Currie 3cb4cb59b5 Link QFgamecode directly into QFruamoko.
First step in the library "merge down".

QFgamecode is now a convenience library. The only things that mention it
directly now are ruamoko and qfcc.
2012-02-13 15:05:31 +09:00
Bill Currie 9a91aff93c Move the ambient level check out of the sound renderer.
Instead, the client gets the current leaf and passes ambient_sound_level
from the leaf to S_Update.
2012-02-13 13:44:29 +09:00
Bill Currie 02d24189ef Use QF_NEED for plugins.
At the moment, the selection of the default sound driver etc is broken.
2012-02-12 11:37:25 +09:00
Bill Currie 0a277376ed Fix static builds. 2012-02-07 20:17:32 +09:00
Bill Currie 8ecf74753c Refer to local libs without a path.
I'm sure I've been here before... Anyway, using $(top_builddir)/... to
refer to a local lib confuses make and breaks parallel builds.
2012-02-07 18:45:55 +09:00
Bill Currie 9fbff2f4d5 Do an audit of the Makefile.am files.
o All instances of LIBADD/LDADD have a corresponding DEPENDENCIES
    specificatiion.
  o libraries now use a lib_ldflags macro to keep things consistent
  o duplication of source/lib names has been minimized (particularly in
    the libraries; more work needs to be done for the executables)
  o automake spec blocks have been organized (again, more work needs to be
    done for the executables)
2012-02-07 16:04:19 +09:00
Bill Currie b5019c8e33 Nuke the engine dicrectory from gamecode.
Not the contents, of course :) Anyway, finally, that totally useless
directory is gone.
2012-02-06 23:44:52 +09:00
Bill Currie 201532ea7e Fix missing library references when linking. 2012-02-05 14:25:22 +09:00
Bill Currie f8dfee6de7 Merge branch 'master' into glsl 2012-01-29 22:36:35 +09:00
Bill Currie d18aa2fe3e Do not try to unregister ports with a lost jackd.
libjack seems to get stuck when unregistering ports with a broken
connection.
2012-01-27 19:58:03 +09:00
Sander van Dijk 25ffe6bc3e cd_sdl.c: fix typo. 2012-01-21 09:27:30 +09:00
Sander van Dijk d8432e78bb Fix a wrongly negated condition in snd_win.c:SNDDMA_UnblockSound(). 2012-01-18 21:39:17 +09:00
Bill Currie 05bf637466 SDL sound patches from SVD.
Thanks to "Sander van Dijk" <a.h.vandijk@gmail.com>, we now have much
better SDL sound support.

Here's the promised cleaned up version of the "double buffer" approach
patch for "snd_sdl.c". I've taken some more time to re-read and test
it this time, and it seems to behave well. All memory that is used by
both the main thread and the SDL audio thread is prefixed with "shm_",
and locking is used to ensure that only one thread accesses it at the
same time.
2012-01-17 19:14:42 +09:00
Bill Currie a988c192ab Fix OSS sound. YAY!!!
Much thanks to Spirit from quaddicted for his patient help in testing, and
Spike for his heckling ;)
2012-01-06 21:21:45 +09:00
Bill Currie 206199652a Fix a stray CFLAGS.
Should be AM_CFLAGS.
2011-12-10 20:45:33 +09:00
Bill Currie d3cf5c4b75 Beg for mmap access.
If the default sound device does not support mmap access, retry with
plughw. However, assume the user knows best and do not retry if snd_device
has been set to anything, including "default".

QF alsa support now works out of the box with pulseaudio.
2011-12-08 11:32:33 +09:00
Bill Currie 45288a1a7f Fix the ghastly sound quality.
Due to quake's original sound engine using a push model, the actual place
to which the sound data should be written is not necessarily where the
"hardware" dma cursor is, but rather where the last write finished off.
Thus, the correct output location is indicated by snd_paintedtime rather
than snd_shm->framepos.
2011-12-08 11:02:19 +09:00
Bill Currie d9ab3a1f54 Move the config file/command line parsing into qargs.c
I don't like the COM prefix, but it will do for now.
2011-09-11 14:57:05 +09:00
Bill Currie a71acc9ae5 Move the essential init code into Sys_Init(). 2011-09-11 14:56:47 +09:00
Bill Currie da7ddc35c0 Fix the segaults when trying to use snd_disk.
It's output is still bogus (and it writes to the current directory!), but
at least the plugin can be used without any nasty issues.
2011-09-10 12:07:18 +09:00
Bill Currie a426dacc8a Add a missing \n 2011-09-09 17:43:48 +09:00
Bill Currie 881d4babce Fix some undefined symbols in snd_alsa.c.
Serves me right for testing with only my debug build :P
2011-09-08 18:10:09 +09:00