Commit graph

47 commits

Author SHA1 Message Date
Bill Currie
54fc922f6c better error checking while reading streamed data 2010-08-13 01:48:20 +00:00
Bill Currie
ce5658416d add support for up to 8 channels in sound effect files
The sounds are down-mixed to 2 channels (qf does not (yet) support more than
2 channel output), but this allows pretty much anything to be used for a
source of music. Only 5.1 (6 channel), stereo and mono have been tested, but
the others should work (any issues would be mis-interpretation/implementation
of the channel layout).
2010-08-12 02:28:27 +00:00
Bill Currie
b1620616b9 reset the "resampler" when seeking 2010-08-11 23:47:31 +00:00
Bill Currie
22e8698827 resampling now works
However, no fallback for when libsamplerate is missing.
2010-08-11 23:47:03 +00:00
Bill Currie
1c985bc925 bah, forgot these 2010-08-11 23:46:28 +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
de35661d5d hopefully correct comment 2010-08-11 23:43:54 +00:00
Bill Currie
2bb2d14b89 make "sample counts" frame based rather than mono sample based
that was always horribly confusing
2010-08-11 23:43:35 +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
d93670df3b cleanup some cruft 2007-06-09 07:48:44 +00:00
Bill Currie
dd1adc0431 remove S_TouchSound: it doesn't seem to be necessary 2007-05-07 12:20:38 +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
323052bd2b survive across gamedir changes 2007-04-07 07:44:07 +00:00
Bill Currie
6ca2a6da05 fix a missed param in the docs 2007-04-04 12:11:41 +00:00
Bill Currie
8d5b5fdf04 cleanup of channel stopping and fix cd_file's pause/resume 2007-03-27 06:15:57 +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
bbdca8428a channel leak plugged 2007-03-18 11:20:47 +00:00
Bill Currie
5a0e2460a3 whee, lockless channel management. still have a problem with unbalanced retain/release, though. 2007-03-18 10:32:01 +00:00
Bill Currie
44aaec4f22 make the cache/stream setup code common. 2007-03-18 01:44:46 +00:00
Bill Currie
916a698ac5 it makes noise, but dies due to caching bugs 2007-03-17 07:05:24 +00:00
Bill Currie
cde6e60848 most of the hacking needed to break out the common code from snd_dma.c 2007-03-17 03:10:45 +00:00
Bill Currie
15088746d4 realized this really is mostly general 2007-03-10 06:01:28 +00:00
Bill Currie
b8d3579c8c interface docs done. yay 2007-03-10 05:54:27 +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
6f017f18ac add some documentation to QF/sound.h and move renderer private stuff into snd_render.h 2007-03-10 01:06:00 +00:00
Bill Currie
dff68bfed0 beginnings of flac support. compiles but untested. if this doesn't crash,
I'll be surprised :)
2005-06-15 10:02:50 +00:00
Bill Currie
d5a33c9545 extend the sound api slightly to ease things like cd_file and make cd_file
work as intended :)
2004-01-21 02:52:12 +00:00
Bill Currie
ccfa9081b0 fix shm properly :) 2004-01-08 03:46:11 +00:00
Bill Currie
deb8137db7 more sound static cleanup 2004-01-08 01:48:02 +00:00
Chris Ison
392902f5af added SND_NoResampleStereo so that streams that don't need resampling aren't forced to, also added midi support via libWildMidi, MIDI FILES RULE 2003-09-10 05:20:51 +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
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
eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Bill Currie
5505aba316 minor cleanups 2003-04-15 04:03:02 +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
1b2d7b79a6 streams getting closer, not working yet, though 2003-04-13 06:46:24 +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
8012a408b8 90% there for cache wav support. will likely segfault :) 2003-04-11 04:39:51 +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
dd297bc12a start work on support for stereo samples 2003-04-08 22:23:16 +00:00
Bill Currie
79322d64ce header stuff 2003-02-02 03:43:49 +00:00
Bill Currie
05fb5f9fb2 partial cleanup. more to come later :) 2003-01-31 20:51:04 +00:00