Commit graph

44 commits

Author SHA1 Message Date
Bill Currie
22e8698827 resampling now works
However, no fallback for when libsamplerate is missing.
2010-08-11 23:47:03 +00:00
Bill Currie
7502cd9ec5 making slow progress on sound quality
streamed oggs playback cleaning when not resampling, but flacs are still crap
2010-08-11 23:45:09 +00:00
Bill Currie
65a748fc3c floating point mixer now working
the resampler is being badly abused for streams, and it's not yet properly
autoconfiscated, but things are working. Better yet, at the correct pitch and
speed.
2010-08-11 23:44:34 +00:00
Bill Currie
d0906f1453 conditionally build the sound format support files
Rather than using an ifdef around the entire code, get autoconf to do the work
for us. For one thing, this allows doxygen to produce decent docs. It also
makes for less compalation when building without support for various formats.
2010-08-11 23:42:42 +00:00
Bill Currie
c0a8c6c695 properly prefix all functions, static or not
makes doxygen produce better docs
2010-08-11 23:41:04 +00:00
Bill Currie
46a067b2f6 Do proper error handling when loading sound files.
This fixes the segfault grg got when trying to play a 5.1 channel file.
2010-08-08 03:02:55 +00:00
Bill Currie
0af43cf016 make the resampling state a little more self-contained. this should make 2009-01-08 07:48:08 +00:00
Bill Currie
7af2378e03 turn on graph generation in the doxygen output. very slow, but the diagrams are worth it. Also make the data member of sfx_t a union rather than void so doxygen can see the relationships (and gets rid of a bunch of casts that I never liked anyway). 2007-05-07 05:20:24 +00:00
Bill Currie
f2e524491d reduce a lot of duplicated code. should have done it this way in the first place. anyway, now I can get on with fixing the cut-off bug (I hope). 2007-03-26 11:44:52 +00:00
Bill Currie
44aaec4f22 make the cache/stream setup code common. 2007-03-18 01:44:46 +00:00
Bill Currie
d4719db021 a bunch of docs for snd_render.h and a some cleanup of namepace and old cruft 2007-03-10 04:21:32 +00:00
Bill Currie
3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
501180aaac gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time) 2005-06-08 06:35:48 +00:00
Bill Currie
4a73d5dc45 this seems to fix the "end of file" issues on streams 2003-04-26 04:30:07 +00:00
Bill Currie
7d06343b2f make the opened sfx name usable 2003-04-21 18:09:53 +00:00
Bill Currie
eac5b83ea5 remove some debug info 2003-04-21 01:44:55 +00:00
Bill Currie
194c9aa097 fix the file handle leak 2003-04-21 01:39:07 +00:00
Bill Currie
714bd341fc 'copy' streams on openning. fixes the shared stream issues, though other
problems might arrise (eg, running out of file handles or memory)
2003-04-20 07:19:51 +00:00
Bill Currie
52f41f8095 make streams work in chunks of 256 samples (won't work so well for non power
of 2 resample rates :/)
2003-04-20 03:42:19 +00:00
Bill Currie
49571b257d crystal clear playback on resampled streams :) (still borked when shared,
though :/)
2003-04-17 17:43:21 +00:00
Bill Currie
da44c783fb get the new sound system mostly working. just getting a bogus read count
in the stream reader at the moment, otherwise it's working wonderfully :)
2003-04-15 02:34:17 +00:00
Bill Currie
dfff6bcdb7 duplicate the vorbis file info when creating a stream 2003-04-14 16:28:20 +00:00
Bill Currie
9fda72c119 streamed sounds /almost/ work. sound like crap but no crashes 2003-04-14 15:47:08 +00:00
Bill Currie
aab4dcf931 getting there with streams. just need to get the painters working, I think.
(streaming currently disabled for anything < 30s :)
2003-04-14 06:11:53 +00:00
Bill Currie
38ef81ca78 set the buffer length as early as possible for cached sounds 2003-04-14 01:40:40 +00:00
Bill Currie
1b2d7b79a6 streams getting closer, not working yet, though 2003-04-13 06:46:24 +00:00
Bill Currie
b7ff08fba4 effectively disable streamed oggs for now 2003-04-11 23:50:45 +00:00
Bill Currie
e3f8c833ad getting closer. wav's successfully load, but playback is always looped (?).
oggs hang
2003-04-11 21:14:38 +00:00
Bill Currie
948c97a6a4 cached wav files almost work (seems cached ogg are borked now :/) 2003-04-11 18:59:14 +00:00
Bill Currie
725f1d0595 don't compile any vorbis code if it's unavailable 2003-04-11 14:38:31 +00:00
Bill Currie
12724f5fa7 cached oggs work 2003-04-11 02:58:24 +00:00
Bill Currie
ccb56eea39 half way though the sfx loader re-write. nothing works :) 2003-04-11 01:17:48 +00:00
Bill Currie
963fa8ef98 fix non-vorbis compile 2003-02-02 04:54:40 +00:00
Bill Currie
05fb5f9fb2 partial cleanup. more to come later :) 2003-01-31 20:51:04 +00:00
Bill Currie
761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie
eeb4e4f9a9 how that got past my compile tests is beyond me 2002-11-06 14:56:39 +00:00
Bill Currie
ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie
5b9d4fb241 close the file if vorbis doesn't like it 2002-09-26 19:37:01 +00:00
Bill Currie
be8df8bdaa fix a nasty bug with looped vorbis sound effects. samples with loop lengths
smaller than their unlooped sections were causing qf to hang.
2002-08-27 19:44:13 +00:00
Bill Currie
ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +00:00
Bill Currie
5fd916a0da looped oggs now work so long as they have a CUEPOINT= comment 2002-07-29 22:25:32 +00:00
Bill Currie
930ba48862 other than sounds that are ment to loop not looping (due to losing that info
when converting to ogg (I've got some ideas on that)), ogg/vorbis support is
working. Doesn't seem to be too much of a load-time hit.
2002-06-15 05:43:56 +00:00
Bill Currie
9f1e6f9c82 make the vorbis support mostly work. qf segs in Cache_TryAlloc when loading
a map, but I think that's related to some of our other sound resample bugs.
2002-06-14 22:55:57 +00:00
Bill Currie
f2f6041e05 at long last, vorbis support :) load time only, though, so not yet suitable
for huge samples.
Also, change the file search order so that .gz is checked before the
requested file.
2002-06-14 20:36:28 +00:00