Commit 0946af36 authored by Monty's avatar Monty
Browse files

autoconf changes to handle looking for bit-width types on yet more
platforms without barfing.  Cleaner than before, hopefully works
better too.

Monty

svn path=/trunk/vorbis/; revision=605
parent f03fc45f
This diff is collapsed.
# $Id: configure.in,v 1.20 2000/08/15 09:09:31 xiphmont Exp $
# $Id: configure.in,v 1.21 2000/08/30 06:09:21 xiphmont Exp $
AC_INIT(lib/mdct.c)
#AC_CONFIG_HEADER(config.h)
......@@ -176,27 +176,142 @@ dummy="__noconf"
# X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
#fi
# check macro modified from Jon Shiring's to compensate for autoconf's lagging
# behind the times on type madness
AC_MSG_CHECKING(for int16_t)
AC_CACHE_VAL(has_int16_t,
[AC_TRY_RUN([
#ifdef __BEOS__
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
int16_t foo;
int main() {return 0;}
],
has_int16_t=yes,
has_int16_t=no,
has_int16_t=no
)])
AC_MSG_RESULT($has_int16_t)
AC_MSG_CHECKING(for int32_t)
AC_CACHE_VAL(has_int32_t,
[AC_TRY_RUN([
#ifdef __BEOS__
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
int32_t foo;
int main() {return 0;}
],
has_int32_t=yes,
has_int32_t=no,
has_int32_t=no
)])
AC_MSG_RESULT($has_int32_t)
AC_MSG_CHECKING(for uint32_t)
AC_CACHE_VAL(has_uint32_t,
[AC_TRY_RUN([
#ifdef __BEOS__
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
uint32_t foo;
int main() {return 0;}
],
has_uint32_t=yes,
has_uint32_t=no,
has_uint32_t=no
)])
AC_MSG_RESULT($has_uint32_t)
AC_MSG_CHECKING(for u_int32_t)
AC_CACHE_VAL(has_u_int32_t,
[AC_TRY_RUN([
#ifdef __BEOS__
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
u_int32_t foo;
int main() {return 0;}
],
has_u_int32_t=yes,
has_u_int32_t=no,
has_u_int32_t=no
)])
AC_MSG_RESULT($has_u_int32_t)
AC_MSG_CHECKING(for int64_t)
AC_CACHE_VAL(has_int64_t,
[AC_TRY_RUN([
#ifdef __BEOS__
#include <inttypes.h>
#else
#include <sys/types.h>
#endif
int64_t foo;
int main() {return 0;}
],
has_int64_t=yes,
has_int64_t=no,
has_int64_t=no
)])
AC_MSG_RESULT($has_int64_t)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
case 2 in
if test x$has_int16_t = "xyes" ; then
SIZE16="int16_t"
else
case 2 in
$ac_cv_sizeof_short) SIZE16="short";;
$ac_cv_sizeof_int) SIZE16="int";;
esac
esac
fi
case 4 in
if test x$has_int32_t = "xyes" ; then
SIZE32="int32_t"
else
case 4 in
$ac_cv_sizeof_short) SIZE32="short";;
$ac_cv_sizeof_int) SIZE32="int";;
$ac_cv_sizeof_long) SIZE32="long";;
esac
esac
fi
if test x$has_uint32_t = "xyes" ; then
USIZE32="uint32_t"
else
if test x$has_u_int32_t = "xyes" ; then
USIZE32="u_int32_t"
else
case 4 in
$ac_cv_sizeof_short) USIZE32="unsigned short";;
$ac_cv_sizeof_int) USIZE32="unsigned int";;
$ac_cv_sizeof_long) USIZE32="unsigned long";;
esac
fi
fi
if test x$has_int64_t = "xyes" ; then
SIZE64="int64_t"
else
case 8 in
$ac_cv_sizeof_int) SIZE64="int";;
$ac_cv_sizeof_long) SIZE64="long";;
$ac_cv_sizeof_long_long) SIZE64="long long";;
esac
fi
if test -z "$SIZE16"; then
AC_MSG_ERROR(No 16 bit type found on this platform!)
......@@ -204,6 +319,9 @@ fi
if test -z "$SIZE32"; then
AC_MSG_ERROR(No 32 bit type found on this platform!)
fi
if test -z "$USIZE32"; then
AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
fi
if test -z "$SIZE64"; then
AC_MSG_WARN(No 64 bit type found on this platform!)
fi
......@@ -225,6 +343,7 @@ AC_CHECK_FUNCS(gettimeofday select strcspn strerror strspn sigaction)
AC_SUBST(SIZE16)
AC_SUBST(SIZE32)
AC_SUBST(USIZE32)
AC_SUBST(SIZE64)
AC_SUBST(OPT)
AC_SUBST(LIBS)
......@@ -238,6 +357,7 @@ AC_SUBST(pthread_lib)
AC_CONFIG_SUBDIRS(vorbis-tools/libao)
AC_OUTPUT(Makefile lib/Makefile examples/Makefile vorbis-tools/Makefile\
AC_OUTPUT(Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\
vorbis-tools/Makefile\
vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile)
......@@ -12,7 +12,7 @@
********************************************************************
function: simple example decoder
last mod: $Id: decoder_example.c,v 1.11 2000/08/15 01:05:26 xiphmont Exp $
last mod: $Id: decoder_example.c,v 1.12 2000/08/30 06:09:21 xiphmont Exp $
********************************************************************/
......@@ -36,7 +36,7 @@
#include <console.h> /* CodeWarrior's Mac "command-line" support */
#endif
int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */
ogg_int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */
int convsize=4096;
int main(int argc, char **argv){
......@@ -236,7 +236,7 @@ int main(int argc, char **argv){
/* convert doubles to 16 bit signed ints (host order) and
interleave */
for(i=0;i<vi.channels;i++){
int16_t *ptr=convbuffer+i;
ogg_int16_t *ptr=convbuffer+i;
double *mono=pcm[i];
for(j=0;j<bout;j++){
int val=mono[j]*32767.;
......
......@@ -12,7 +12,7 @@
********************************************************************
function: libvorbis codec headers
last mod: $Id: codec.h,v 1.27 2000/08/23 10:27:14 xiphmont Exp $
last mod: $Id: codec.h,v 1.28 2000/08/30 06:09:21 xiphmont Exp $
********************************************************************/
......@@ -171,7 +171,7 @@ typedef struct {
int *lacing_vals; /* The values that will go to the segment table */
int64_t *pcm_vals; /* pcm_pos values for headers. Not compact
ogg_int64_t *pcm_vals; /* pcm_pos values for headers. Not compact
this way, but it is simple coupled to the
lacing fifo */
long lacing_storage;
......@@ -188,12 +188,12 @@ typedef struct {
of a logical bitstream */
long serialno;
int pageno;
int64_t packetno; /* sequence number for decode; the framing
ogg_int64_t packetno; /* sequence number for decode; the framing
knows where there's a hole in the data,
but we need coupling so that the codec
(which is in a seperate abstraction
layer) also knows about the gap */
int64_t pcmpos;
ogg_int64_t pcmpos;
} ogg_stream_state;
......@@ -206,8 +206,8 @@ typedef struct {
long b_o_s;
long e_o_s;
int64_t frameno;
int64_t packetno; /* sequence number for decode; the framing
ogg_int64_t frameno;
ogg_int64_t packetno; /* sequence number for decode; the framing
knows where there's a hole in the data,
but we need coupling so that the codec
(which is in a seperate abstraction
......@@ -248,13 +248,13 @@ typedef struct vorbis_dsp_state{
long nW;
long centerW;
int64_t frameno;
int64_t sequence;
ogg_int64_t frameno;
ogg_int64_t sequence;
int64_t glue_bits;
int64_t time_bits;
int64_t floor_bits;
int64_t res_bits;
ogg_int64_t glue_bits;
ogg_int64_t time_bits;
ogg_int64_t floor_bits;
ogg_int64_t res_bits;
/* local lookup storage */
void *ve; /* envelope lookup */
......@@ -296,8 +296,8 @@ typedef struct vorbis_block{
int mode;
int eofflag;
int64_t frameno;
int64_t sequence;
ogg_int64_t frameno;
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
......@@ -381,7 +381,7 @@ extern int ogg_page_version(ogg_page *og);
extern int ogg_page_continued(ogg_page *og);
extern int ogg_page_bos(ogg_page *og);
extern int ogg_page_eos(ogg_page *og);
extern int64_t ogg_page_frameno(ogg_page *og);
extern ogg_int64_t ogg_page_frameno(ogg_page *og);
extern int ogg_page_serialno(ogg_page *og);
extern int ogg_page_pageno(ogg_page *og);
......
......@@ -14,27 +14,42 @@
********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal.
last mod: $Id: os_types.h,v 1.7 2000/08/30 01:40:12 xiphmont Exp $
last mod: $Id: os_types.h.in,v 1.1 2000/08/30 06:09:21 xiphmont Exp $
********************************************************************/
#if defined (_WIN32)
#if !defined(__GNUC__)
typedef __int64 int64_t;
typedef __int16 int16_t;
#define vorbis_size32_t int
/* MSVC/Borland */
typedef __int64 ogg_int64_t;
typedef __int32 ogg_int32_t;
typedef unsigned __int32 ogg_int32_t;
typedef __int16 ogg_int16_t;
#else
/* Cygwin */
#include <_G_config.h>
typedef _G_int64_t int64_t;
typedef _G_int32_t int32_t;
typedef _G_int16_t int16_t;
#endif
typedef _G_int64_t ogg_int64_t;
typedef _G_int32_t ogg_int32_t;
typedef unsigned _G_int32_t ogg_int32_t;
typedef _G_int16_t ogg_int16_t;
#endif
#else
#ifdef __BEOS__
/* Be */
#include <inttypes.h>
#endif
/* filled in by configure */
typedef @SIZE16@ ogg_int16_t;
typedef @SIZE32@ ogg_int32_t;
typedef @USIZE32@ ogg_uint32_t;
typedef @SIZE64@ ogg_int64_t;
#endif
#endif
......@@ -12,7 +12,7 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
last mod: $Id: vorbisfile.h,v 1.6 2000/06/15 12:17:03 xiphmont Exp $
last mod: $Id: vorbisfile.h,v 1.7 2000/08/30 06:09:21 xiphmont Exp $
********************************************************************/
......@@ -39,7 +39,7 @@ extern "C"
*/
typedef struct {
size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource);
int (*seek_func) (void *datasource, int64_t offset, int whence);
int (*seek_func) (void *datasource, ogg_int64_t offset, int whence);
int (*close_func) (void *datasource);
long (*tell_func) (void *datasource);
} ov_callbacks;
......@@ -48,22 +48,22 @@ typedef struct {
typedef struct {
void *datasource; /* Pointer to a FILE *, etc. */
int seekable;
int64_t offset;
int64_t end;
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;
int64_t *offsets;
int64_t *dataoffsets;
ogg_int64_t *offsets;
ogg_int64_t *dataoffsets;
long *serialnos;
int64_t *pcmlengths;
ogg_int64_t *pcmlengths;
vorbis_info *vi;
vorbis_comment *vc;
/* Decoding working state local storage */
int64_t pcm_offset;
ogg_int64_t pcm_offset;
int decode_ready;
long current_serialno;
int current_link;
......@@ -91,16 +91,16 @@ extern long ov_streams(OggVorbis_File *vf);
extern long ov_seekable(OggVorbis_File *vf);
extern long ov_serialnumber(OggVorbis_File *vf,int i);
extern int64_t ov_raw_total(OggVorbis_File *vf,int i);
extern int64_t ov_pcm_total(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 double ov_time_total(OggVorbis_File *vf,int i);
extern int ov_raw_seek(OggVorbis_File *vf,long pos);
extern int ov_pcm_seek(OggVorbis_File *vf,int64_t pos);
extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
extern int ov_time_seek(OggVorbis_File *vf,double pos);
extern int64_t ov_raw_tell(OggVorbis_File *vf);
extern int64_t ov_pcm_tell(OggVorbis_File *vf);
extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
extern double ov_time_tell(OggVorbis_File *vf);
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
......
# vorbis makefile configured for use with gcc on any platform
# $Id: Makefile.in,v 1.33 2000/07/12 09:36:17 xiphmont Exp $
# $Id: Makefile.in,v 1.34 2000/08/30 06:09:21 xiphmont Exp $
###############################################################################
# #
......@@ -15,7 +15,7 @@
# (unless, of course, you know what you are doing :) ##########################
@SET_MAKE@
FLAGS=-I. -I../include @CFLAGS@ -Dvorbis_size32_t='@SIZE32@'
FLAGS=-I. -I../include @CFLAGS@
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ $(FLAGS)
PROFILE=@PROFILE@ $(FLAGS)
......
......@@ -13,7 +13,7 @@
function: code raw [Vorbis] packets into framed OggSquish stream and
decode Ogg streams back into raw packets
last mod: $Id: framing.c,v 1.24 2000/08/15 09:09:42 xiphmont Exp $
last mod: $Id: framing.c,v 1.25 2000/08/30 06:09:21 xiphmont Exp $
note: The CRC code is directly derived from public domain code by
Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html
......@@ -44,9 +44,9 @@ int ogg_page_eos(ogg_page *og){
return((int)(og->header[5]&0x04));
}
int64_t ogg_page_frameno(ogg_page *og){
ogg_int64_t ogg_page_frameno(ogg_page *og){
unsigned char *page=og->header;
int64_t pcmpos=page[13]&(0xff);
ogg_int64_t pcmpos=page[13]&(0xff);
pcmpos= (pcmpos<<8)|(page[12]&0xff);
pcmpos= (pcmpos<<8)|(page[11]&0xff);
pcmpos= (pcmpos<<8)|(page[10]&0xff);
......@@ -73,10 +73,10 @@ int ogg_page_pageno(ogg_page *og){
/* helper to initialize lookup for direct-table CRC */
static unsigned vorbis_size32_t crc_lookup[256];
static ogg_uint32_t crc_lookup[256];
static int crc_ready=0;
static unsigned vorbis_size32_t _ogg_crc_entry(unsigned long index){
static ogg_uint32_t _ogg_crc_entry(unsigned long index){
int i;
unsigned long r;
......@@ -115,7 +115,7 @@ int ogg_stream_init(ogg_stream_state *os,int serialno){
os->lacing_storage=1024;
os->lacing_vals=malloc(os->lacing_storage*sizeof(int));
os->pcm_vals=malloc(os->lacing_storage*sizeof(int64_t));
os->pcm_vals=malloc(os->lacing_storage*sizeof(ogg_int64_t));
/* initialize the crc_lookup table if not done */
_ogg_crc_init();
......@@ -161,7 +161,7 @@ static void _os_lacing_expand(ogg_stream_state *os,int needed){
if(os->lacing_storage<=os->lacing_fill+needed){
os->lacing_storage+=(needed+32);
os->lacing_vals=realloc(os->lacing_vals,os->lacing_storage*sizeof(int));
os->pcm_vals=realloc(os->pcm_vals,os->lacing_storage*sizeof(int64_t));
os->pcm_vals=realloc(os->pcm_vals,os->lacing_storage*sizeof(ogg_int64_t));
}
}
......@@ -170,7 +170,7 @@ static void _os_lacing_expand(ogg_stream_state *os,int needed){
perform the checksum silmultaneously with other copies */
static void _os_checksum(ogg_page *og){
unsigned vorbis_size32_t crc_reg=0;
ogg_uint32_t crc_reg=0;
int i;
for(i=0;i<og->header_len;i++)
......@@ -253,7 +253,7 @@ int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){
int maxvals=(os->lacing_fill>255?255:os->lacing_fill);
int bytes=0;
long acc=0;
int64_t pcm_pos=os->pcm_vals[0];
ogg_int64_t pcm_pos=os->pcm_vals[0];
if(maxvals==0)return(0);
......@@ -344,7 +344,7 @@ int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){
os->lacing_fill-=vals;
memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(int));
memmove(os->pcm_vals,os->pcm_vals+vals,os->lacing_fill*sizeof(int64_t));
memmove(os->pcm_vals,os->pcm_vals+vals,os->lacing_fill*sizeof(ogg_int64_t));
os->body_returned+=bytes;
/* calculate the checksum */
......@@ -591,7 +591,7 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
int continued=ogg_page_continued(og);
int bos=ogg_page_bos(og);
int eos=ogg_page_eos(og);
int64_t pcmpos=ogg_page_frameno(og);
ogg_int64_t pcmpos=ogg_page_frameno(og);
int serialno=ogg_page_serialno(og);
int pageno=ogg_page_pageno(og);
int segments=header[26];
......@@ -615,7 +615,7 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
memmove(os->lacing_vals,os->lacing_vals+lr,
(os->lacing_fill-lr)*sizeof(int));
memmove(os->pcm_vals,os->pcm_vals+lr,
(os->lacing_fill-lr)*sizeof(int64_t));
(os->lacing_fill-lr)*sizeof(ogg_int64_t));
}
os->lacing_fill-=lr;
os->lacing_packet-=lr;
......
......@@ -12,7 +12,7 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
last mod: $Id: vorbisfile.c,v 1.27 2000/08/15 09:09:43 xiphmont Exp $
last mod: $Id: vorbisfile.c,v 1.28 2000/08/30 06:09:21 xiphmont Exp $
********************************************************************/
......@@ -189,7 +189,7 @@ static void _bisect_forward_serialno(OggVorbis_File *vf,
if(searched>=end || ret==-1){
vf->links=m+1;
vf->offsets=malloc((m+2)*sizeof(int64_t));
vf->offsets=malloc((m+2)*sizeof(ogg_int64_t));
vf->offsets[m+1]=searched;
}else{
_bisect_forward_serialno(vf,next,vf->offset,
......@@ -265,8 +265,8 @@ static void _prefetch_all_headers(OggVorbis_File *vf,vorbis_info *first_i,
vf->vi=calloc(vf->links,sizeof(vorbis_info));
vf->vc=calloc(vf->links,sizeof(vorbis_info));
vf->dataoffsets=malloc(vf->links*sizeof(int64_t));
vf->pcmlengths=malloc(vf->links*sizeof(int64_t));
vf->dataoffsets=malloc(vf->links*sizeof(ogg_int64_t));
vf->pcmlengths=malloc(vf->links*sizeof(ogg_int64_t));
vf->serialnos=malloc(vf->links*sizeof(long));
for(i=0;i<vf->links;i++){
......@@ -413,7 +413,7 @@ static int _process_packet(OggVorbis_File *vf,int readp){
if(vf->decode_ready){
ogg_packet op;
int result=ogg_stream_packetout(&vf->os,&op);
int64_t frameno;
ogg_int64_t frameno;
/* if(result==-1)return(-1); hole in the data. For now, swallow
and go. We'll need to add a real
......@@ -559,7 +559,7 @@ int ov_clear(OggVorbis_File *vf){
return(0);
}
static int _fseek64_wrap(FILE *f,int64_t off,int whence){
static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
return fseek(f,(int)off,whence);
}
......@@ -574,7 +574,7 @@ static int _fseek64_wrap(FILE *f,int64_t off,int whence){
int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
ov_callbacks callbacks = {
(size_t (*)(void *, size_t, size_t, void *)) fread,
(int (*)(void *, int64_t, int)) _fseek64_wrap,
(int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,
(int (*)(void *)) fclose,
(long (*)(void *)) ftell
};
......@@ -642,7 +642,7 @@ long ov_bitrate(OggVorbis_File *vf,int i){
if(i>=vf->links)return(-1);
if(!vf->seekable && i!=0)return(ov_bitrate(vf,0));
if(i<0){
int64_t bits=0;
ogg_int64_t bits=0;
int i;
for(i=0;i<vf->links;i++)
bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8;
......@@ -696,7 +696,7 @@ long ov_serialnumber(OggVorbis_File *vf,int i){
raw (compressed) length of that logical bitstream for i==0 to n
-1 if the stream is not seekable (we can't know the length)
*/
int64_t ov_raw_total(OggVorbis_File *vf,int i){
ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){
if(!vf->seekable || i>=vf->links)return(-1);
if(i<0){
long acc=0;
......@@ -713,10 +713,10 @@ int64_t ov_raw_total(OggVorbis_File *vf,int i){
PCM length (samples) of that logical bitstream for i==0 to n
-1 if the stream is not seekable (we can't know the length)
*/
int64_t ov_pcm_total(OggVorbis_File *vf,int i){
ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){
if(!vf->seekable || i>=vf->links)return(-1);
if(i<0){
int64_t acc=0;
ogg_int64_t acc=0;
int i;
for(i=0;i<vf->links;i++)
acc+=ov_pcm_total(vf,i);
......@@ -810,9 +810,9 @@ int ov_raw_seek(OggVorbis_File *vf,long pos){
returns zero on success, nonzero on failure */
int ov_pcm_seek(OggVorbis_File *vf,int64_t pos){
int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){
int link=-1;
int64_t total=ov_pcm_total(vf,-1);
ogg_int64_t total=ov_pcm_total(vf,-1);
if(!vf->seekable)return(-1); /* don't dump machine if we can't seek */
if(pos<0 || pos>total)goto seek_error;
......@@ -829,7 +829,7 @@ int ov_pcm_seek(OggVorbis_File *vf,int64_t pos){
bitstream could make our task impossible. Account for that (it
would be an error condition) */
{
int64_t target=pos-total;
ogg_int64_t target=pos-total;
long end=vf->offsets[link+1];
long begin=vf->offsets[link];
long best=begin;
......@@ -851,7 +851,7 @@ int ov_pcm_seek(OggVorbis_File *vf,int64_t pos){
if(ret==-1){
end=bisect;
}else{
int64_t frameno=ogg_page_frameno(&og);
ogg_int64_t frameno=ogg_page_frameno(&og);
if(frameno<target){
best=ret; /* raw offset of packet with frameno */
begin=vf->offset; /* raw offset of next packet */
......@@ -900,7 +900,7 @@ int ov_time_seek(OggVorbis_File *vf,double seconds){
/* translate time to PCM position and call ov_pcm_seek */
int link=-1;
int64_t pcm_total=ov_pcm_total(vf,-1);
ogg_int64_t pcm_total=ov_pcm_total(vf,-1);
double time_total=ov_time_total(vf,-1);
if(!vf->seekable)return(-1); /* don't dump machine if we can't seek */
......@@ -915,7 +915,7 @@ int ov_time_seek(OggVorbis_File *vf,double seconds){
/* enough information to convert time offset to pcm offset */