mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
add win32 codec libs for watcom.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1445 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
48e09d2d1e
commit
7cea9548ce
13 changed files with 360 additions and 0 deletions
25
Windows/codecs/include/tremor/config_types.h
Normal file
25
Windows/codecs/include/tremor/config_types.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
|
* *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
#ifndef _OS_CVTYPES_H
|
||||||
|
#define _OS_CVTYPES_H
|
||||||
|
|
||||||
|
typedef long long ogg_int64_t;
|
||||||
|
typedef int ogg_int32_t;
|
||||||
|
typedef unsigned int ogg_uint32_t;
|
||||||
|
typedef short ogg_int16_t;
|
||||||
|
|
||||||
|
#endif
|
204
Windows/codecs/include/tremor/ivorbiscodec.h
Normal file
204
Windows/codecs/include/tremor/ivorbiscodec.h
Normal file
|
@ -0,0 +1,204 @@
|
||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
|
* *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: libvorbis codec headers
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
#ifndef _vorbis_codec_h_
|
||||||
|
#define _vorbis_codec_h_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#include <ogg/ogg.h>
|
||||||
|
|
||||||
|
typedef struct vorbis_info{
|
||||||
|
int version;
|
||||||
|
int channels;
|
||||||
|
long rate;
|
||||||
|
|
||||||
|
/* The below bitrate declarations are *hints*.
|
||||||
|
Combinations of the three values carry the following implications:
|
||||||
|
|
||||||
|
all three set to the same value:
|
||||||
|
implies a fixed rate bitstream
|
||||||
|
only nominal set:
|
||||||
|
implies a VBR stream that averages the nominal bitrate. No hard
|
||||||
|
upper/lower limit
|
||||||
|
upper and or lower set:
|
||||||
|
implies a VBR bitstream that obeys the bitrate limits. nominal
|
||||||
|
may also be set to give a nominal rate.
|
||||||
|
none set:
|
||||||
|
the coder does not care to speculate.
|
||||||
|
*/
|
||||||
|
|
||||||
|
long bitrate_upper;
|
||||||
|
long bitrate_nominal;
|
||||||
|
long bitrate_lower;
|
||||||
|
long bitrate_window;
|
||||||
|
|
||||||
|
void *codec_setup;
|
||||||
|
} vorbis_info;
|
||||||
|
|
||||||
|
/* vorbis_dsp_state buffers the current vorbis audio
|
||||||
|
analysis/synthesis state. The DSP state belongs to a specific
|
||||||
|
logical bitstream ****************************************************/
|
||||||
|
typedef struct vorbis_dsp_state{
|
||||||
|
int analysisp;
|
||||||
|
vorbis_info *vi;
|
||||||
|
|
||||||
|
ogg_int32_t **pcm;
|
||||||
|
ogg_int32_t **pcmret;
|
||||||
|
int pcm_storage;
|
||||||
|
int pcm_current;
|
||||||
|
int pcm_returned;
|
||||||
|
|
||||||
|
int preextrapolate;
|
||||||
|
int eofflag;
|
||||||
|
|
||||||
|
long lW;
|
||||||
|
long W;
|
||||||
|
long nW;
|
||||||
|
long centerW;
|
||||||
|
|
||||||
|
ogg_int64_t granulepos;
|
||||||
|
ogg_int64_t sequence;
|
||||||
|
|
||||||
|
void *backend_state;
|
||||||
|
} vorbis_dsp_state;
|
||||||
|
|
||||||
|
typedef struct vorbis_block{
|
||||||
|
/* necessary stream state for linking to the framing abstraction */
|
||||||
|
ogg_int32_t **pcm; /* this is a pointer into local storage */
|
||||||
|
oggpack_buffer opb;
|
||||||
|
|
||||||
|
long lW;
|
||||||
|
long W;
|
||||||
|
long nW;
|
||||||
|
int pcmend;
|
||||||
|
int mode;
|
||||||
|
|
||||||
|
int eofflag;
|
||||||
|
ogg_int64_t granulepos;
|
||||||
|
ogg_int64_t sequence;
|
||||||
|
vorbis_dsp_state *vd; /* For read-only access of configuration */
|
||||||
|
|
||||||
|
/* local storage to avoid remallocing; it's up to the mapping to
|
||||||
|
structure it */
|
||||||
|
void *localstore;
|
||||||
|
long localtop;
|
||||||
|
long localalloc;
|
||||||
|
long totaluse;
|
||||||
|
struct alloc_chain *reap;
|
||||||
|
|
||||||
|
} vorbis_block;
|
||||||
|
|
||||||
|
/* vorbis_block is a single block of data to be processed as part of
|
||||||
|
the analysis/synthesis stream; it belongs to a specific logical
|
||||||
|
bitstream, but is independant from other vorbis_blocks belonging to
|
||||||
|
that logical bitstream. *************************************************/
|
||||||
|
|
||||||
|
struct alloc_chain{
|
||||||
|
void *ptr;
|
||||||
|
struct alloc_chain *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* vorbis_info contains all the setup information specific to the
|
||||||
|
specific compression/decompression mode in progress (eg,
|
||||||
|
psychoacoustic settings, channel setup, options, codebook
|
||||||
|
etc). vorbis_info and substructures are in backends.h.
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
/* the comments are not part of vorbis_info so that vorbis_info can be
|
||||||
|
static storage */
|
||||||
|
typedef struct vorbis_comment{
|
||||||
|
/* unlimited user comment fields. libvorbis writes 'libvorbis'
|
||||||
|
whatever vendor is set to in encode */
|
||||||
|
char **user_comments;
|
||||||
|
int *comment_lengths;
|
||||||
|
int comments;
|
||||||
|
char *vendor;
|
||||||
|
|
||||||
|
} vorbis_comment;
|
||||||
|
|
||||||
|
|
||||||
|
/* libvorbis encodes in two abstraction layers; first we perform DSP
|
||||||
|
and produce a packet (see docs/analysis.txt). The packet is then
|
||||||
|
coded into a framed OggSquish bitstream by the second layer (see
|
||||||
|
docs/framing.txt). Decode is the reverse process; we sync/frame
|
||||||
|
the bitstream and extract individual packets, then decode the
|
||||||
|
packet back into PCM audio.
|
||||||
|
|
||||||
|
The extra framing/packetizing is used in streaming formats, such as
|
||||||
|
files. Over the net (such as with UDP), the framing and
|
||||||
|
packetization aren't necessary as they're provided by the transport
|
||||||
|
and the streaming layer is not used */
|
||||||
|
|
||||||
|
/* Vorbis PRIMITIVES: general ***************************************/
|
||||||
|
|
||||||
|
extern void vorbis_info_init(vorbis_info *vi);
|
||||||
|
extern void vorbis_info_clear(vorbis_info *vi);
|
||||||
|
extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
|
||||||
|
extern void vorbis_comment_init(vorbis_comment *vc);
|
||||||
|
extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
|
||||||
|
extern void vorbis_comment_add_tag(vorbis_comment *vc,
|
||||||
|
char *tag, char *contents);
|
||||||
|
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
|
||||||
|
extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag);
|
||||||
|
extern void vorbis_comment_clear(vorbis_comment *vc);
|
||||||
|
|
||||||
|
extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
|
||||||
|
extern int vorbis_block_clear(vorbis_block *vb);
|
||||||
|
extern void vorbis_dsp_clear(vorbis_dsp_state *v);
|
||||||
|
|
||||||
|
/* Vorbis PRIMITIVES: synthesis layer *******************************/
|
||||||
|
extern int vorbis_synthesis_idheader(ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
|
||||||
|
ogg_packet *op);
|
||||||
|
|
||||||
|
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
|
||||||
|
extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
|
||||||
|
extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
|
||||||
|
extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
|
||||||
|
extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm);
|
||||||
|
extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
|
||||||
|
extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
|
||||||
|
|
||||||
|
/* Vorbis ERRORS and return codes ***********************************/
|
||||||
|
|
||||||
|
#define OV_FALSE -1
|
||||||
|
#define OV_EOF -2
|
||||||
|
#define OV_HOLE -3
|
||||||
|
|
||||||
|
#define OV_EREAD -128
|
||||||
|
#define OV_EFAULT -129
|
||||||
|
#define OV_EIMPL -130
|
||||||
|
#define OV_EINVAL -131
|
||||||
|
#define OV_ENOTVORBIS -132
|
||||||
|
#define OV_EBADHEADER -133
|
||||||
|
#define OV_EVERSION -134
|
||||||
|
#define OV_ENOTAUDIO -135
|
||||||
|
#define OV_EBADPACKET -136
|
||||||
|
#define OV_EBADLINK -137
|
||||||
|
#define OV_ENOSEEK -138
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
131
Windows/codecs/include/tremor/ivorbisfile.h
Normal file
131
Windows/codecs/include/tremor/ivorbisfile.h
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||||
|
* *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: stdio-based convenience library for opening/seeking/decoding
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
#ifndef _OV_FILE_H_
|
||||||
|
#define _OV_FILE_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "ivorbiscodec.h"
|
||||||
|
|
||||||
|
#define CHUNKSIZE 65535
|
||||||
|
#define READSIZE 1024
|
||||||
|
/* The function prototypes for the callbacks are basically the same as for
|
||||||
|
* the stdio functions fread, fseek, fclose, ftell.
|
||||||
|
* The one difference is that the FILE * arguments have been replaced with
|
||||||
|
* a void * - this is to be used as a pointer to whatever internal data these
|
||||||
|
* functions might need. In the stdio case, it's just a FILE * cast to a void *
|
||||||
|
*
|
||||||
|
* If you use other functions, check the docs for these functions and return
|
||||||
|
* the right values. For seek_func(), you *MUST* return -1 if the stream is
|
||||||
|
* unseekable
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
|
||||||
|
int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
|
||||||
|
int (*close_func) (void *datasource);
|
||||||
|
long (*tell_func) (void *datasource);
|
||||||
|
} ov_callbacks;
|
||||||
|
|
||||||
|
#define NOTOPEN 0
|
||||||
|
#define PARTOPEN 1
|
||||||
|
#define OPENED 2
|
||||||
|
#define STREAMSET 3
|
||||||
|
#define INITSET 4
|
||||||
|
|
||||||
|
typedef struct OggVorbis_File {
|
||||||
|
void *datasource; /* Pointer to a FILE *, etc. */
|
||||||
|
int seekable;
|
||||||
|
ogg_int64_t offset;
|
||||||
|
ogg_int64_t end;
|
||||||
|
ogg_sync_state oy;
|
||||||
|
|
||||||
|
/* If the FILE handle isn't seekable (eg, a pipe), only the current
|
||||||
|
stream appears */
|
||||||
|
int links;
|
||||||
|
ogg_int64_t *offsets;
|
||||||
|
ogg_int64_t *dataoffsets;
|
||||||
|
ogg_uint32_t *serialnos;
|
||||||
|
ogg_int64_t *pcmlengths;
|
||||||
|
vorbis_info *vi;
|
||||||
|
vorbis_comment *vc;
|
||||||
|
|
||||||
|
/* Decoding working state local storage */
|
||||||
|
ogg_int64_t pcm_offset;
|
||||||
|
int ready_state;
|
||||||
|
ogg_uint32_t current_serialno;
|
||||||
|
int current_link;
|
||||||
|
|
||||||
|
ogg_int64_t bittrack;
|
||||||
|
ogg_int64_t samptrack;
|
||||||
|
|
||||||
|
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||||
|
stream of packets */
|
||||||
|
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||||
|
vorbis_block vb; /* local working space for packet->PCM decode */
|
||||||
|
|
||||||
|
ov_callbacks callbacks;
|
||||||
|
|
||||||
|
} OggVorbis_File;
|
||||||
|
|
||||||
|
extern int ov_clear(OggVorbis_File *vf);
|
||||||
|
extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
|
||||||
|
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
|
||||||
|
const char *initial, long ibytes, ov_callbacks callbacks);
|
||||||
|
|
||||||
|
extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
|
||||||
|
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
|
||||||
|
const char *initial, long ibytes, ov_callbacks callbacks);
|
||||||
|
extern int ov_test_open(OggVorbis_File *vf);
|
||||||
|
|
||||||
|
extern long ov_bitrate(OggVorbis_File *vf,int i);
|
||||||
|
extern long ov_bitrate_instant(OggVorbis_File *vf);
|
||||||
|
extern long ov_streams(OggVorbis_File *vf);
|
||||||
|
extern long ov_seekable(OggVorbis_File *vf);
|
||||||
|
extern long ov_serialnumber(OggVorbis_File *vf,int i);
|
||||||
|
|
||||||
|
extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
|
||||||
|
extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
|
||||||
|
extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i);
|
||||||
|
|
||||||
|
extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
|
|
||||||
|
extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
|
||||||
|
extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
|
||||||
|
extern ogg_int64_t ov_time_tell(OggVorbis_File *vf);
|
||||||
|
|
||||||
|
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
|
||||||
|
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
|
||||||
|
|
||||||
|
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
|
||||||
|
int *bitstream);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
BIN
Windows/codecs/x86-watcom/FLAC.lib
Normal file
BIN
Windows/codecs/x86-watcom/FLAC.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/libxmp.lib
Normal file
BIN
Windows/codecs/x86-watcom/libxmp.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/mad.lib
Normal file
BIN
Windows/codecs/x86-watcom/mad.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/mikmod.lib
Normal file
BIN
Windows/codecs/x86-watcom/mikmod.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/ogg.lib
Normal file
BIN
Windows/codecs/x86-watcom/ogg.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/opus.lib
Normal file
BIN
Windows/codecs/x86-watcom/opus.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/opusfile.lib
Normal file
BIN
Windows/codecs/x86-watcom/opusfile.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/vorbis.lib
Normal file
BIN
Windows/codecs/x86-watcom/vorbis.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/vorbisfile.lib
Normal file
BIN
Windows/codecs/x86-watcom/vorbisfile.lib
Normal file
Binary file not shown.
BIN
Windows/codecs/x86-watcom/vorbisidec.lib
Normal file
BIN
Windows/codecs/x86-watcom/vorbisidec.lib
Normal file
Binary file not shown.
Loading…
Reference in a new issue