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
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
Bill Currie
2ae33a753a
Support non-interleaved mmap sound.
...
Unfortuanately, I can't test this properly as I don't have any such
hardware, but as the code is mosly an edited copy of the interleaved code,
any errors should be easy to fix.
2011-09-07 17:00:57 +09:00
Bill Currie
a8ea3aaad9
Allow dma sound targets to specify an xfer function.
2011-09-07 17:00:18 +09:00
Bill Currie
9ffa1f410a
Detect the silent death of the jack client thread.
...
When jackd gets an unhandled xrun, it stops all processing but neglects to
tell the client about it. Thus, add a bit of a watchdog function to
s_update() and assume the client thread is dead if there's no sign of life
after one second. No more hanging on exit.
2011-09-07 15:16:27 +09:00
Bill Currie
f75b0a611b
Some compile fixes for OpenBSD
2011-08-25 22:35:20 +09:00
Bill Currie
c1a60551ae
Clean up default rate setting and add explicit support for 48kHz.
2011-08-11 17:22:14 +09:00
Bill Currie
5feb0454ca
Add and use SYS_SND for both sound and cd debug prints.
2011-08-11 17:20:33 +09:00