Commit Graph

7 Commits

Author SHA1 Message Date
Ozkan Sezer 3d3d46887a tiny tidy-ups to snd_flac
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1404 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-30 08:51:34 +00:00
Ozkan Sezer 182ec759b8 snd_flac.c: removed unnecessary metadata.h include. fixed build and
run against legacy flac <= 1.1.2 with LP64 systems.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1381 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-09 22:41:55 +00:00
Ozkan Sezer 6ddd983eb8 snd_flac.c, snd_mpg123.c: fix incorrect usage of decoder function
return value in RewindStream procedures.
bgmusic.c (BGM_UpdateStream): print msg if stream rewinding fails.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1169 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-02-19 08:37:13 +00:00
Ozkan Sezer ffa3bf4413 Merge several FS_* and snd_codec* layer updates from uhexen2 tree:
tidy-ups in FS* stdio replacement functions. add new FS_filelength.
snd codec layer updates: changed codec_open() to operate only on a
stream pointer and moved all file open/close stuff to snd_codec.c.
codec_open now only returns true or false upon success or failure
instead of a stream pointer. added new snd_codec.c toplevel helper
S_CodecForwardStream(), which allows one codec to hand over its
stream from its codec_open() to another codec. Support for tracker
(mod) music, including support for Unreal umx containers. (might
be useful if we ever make a Nehahra version of the engine some day.
edit the makefiles to enable when compiling.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@867 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-09-25 11:01:12 +00:00
Ozkan Sezer 4a69497ed6 snd_flac.c (flac_write_func): don't byteswap the 16 bit values.
they seem to be in native-endian format. thanks to Levent Yavas
for testing on a big endian platform (ppc/OSX 10.4).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@864 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-07-25 11:03:25 +00:00
Ozkan Sezer dd9f105e42 * snd_codec: store the samplebits value in the snd_info_t struct,
and add a new blocksize field to it which the flac decoder can
use. updated decoder sources for the snd_info_t changes, where
I made minor tidy-ups too, tightening several format checks and
fixing a few gotchas in snd_wave.c and snd_mem.c.
* snd_flac.c: adjusted for snd_info_t changes. no longed storing
metadata->data.stream_info in our private data, but just storing
a pointer to the stream->info structure. No longer checking the
metadata total_samples field (the FLAC__StreamMetadata_StreamInfo
doesn't seem to have any alignment or pack attributes and I don't
safe with its offset across different compilers), but added check
to make sure that we hit and parsed a STREAMINFO metadata instead,
and our new state seems just fine for validating the file.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@859 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-07-22 11:41:14 +00:00
Ozkan Sezer 7f41bfa64a added flac music support.
it is not enabled by default, edit the Makefile for USE_CODEC_FLAC,
or add USE_CODEC_FLAC=1 to your make command line arguments. Xcode
project file still needs updating for this.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@857 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-07-21 14:02:06 +00:00