fixes to build in MSVC
authorMonty <xiphmont@xiph.org>
Mon, 3 Apr 2000 08:30:49 +0000 (08:30 +0000)
committerMonty <xiphmont@xiph.org>
Mon, 3 Apr 2000 08:30:49 +0000 (08:30 +0000)
svn path=/trunk/vorbis/; revision=300

lib/block.c
lib/codebook.c
lib/psy.c
lib/psytune.c
lib/vorbisfile.c

index c53fe72..7347201 100644 (file)
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: PCM data vector blocking, windowing and dis/reassembly
- last mod: $Id: block.c,v 1.28 2000/03/10 13:21:18 xiphmont Exp $
+ last mod: $Id: block.c,v 1.29 2000/04/03 08:30:49 xiphmont Exp $
 
  Handle windowing, overlap-add, etc of the PCM vectors.  This is made
  more amusing by Vorbis' current two allowed block sizes.
@@ -118,7 +118,7 @@ void *_vorbis_block_alloc(vorbis_block *vb,long bytes){
     vb->localtop=0;
   }
   {
-    void *ret=vb->localstore+vb->localtop;
+    void *ret=(void *)(((char *)vb->localstore)+vb->localtop);
     vb->localtop+=bytes;
     return ret;
   }
index db61470..fafdca9 100644 (file)
  ********************************************************************
 
  function: basic codebook pack/unpack/code/decode operations
- last mod: $Id: codebook.c,v 1.12 2000/03/10 13:21:18 xiphmont Exp $
+ last mod: $Id: codebook.c,v 1.13 2000/04/03 08:30:49 xiphmont Exp $
 
  ********************************************************************/
 
 #include <stdlib.h>
+#include <string.h>
 #include <math.h>
 #include "vorbis/codec.h"
 #include "vorbis/codebook.h"
index 9ba5d21..f0af41f 100644 (file)
--- a/lib/psy.c
+++ b/lib/psy.c
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.17 2000/03/10 13:21:18 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.18 2000/04/03 08:30:49 xiphmont Exp $
 
  ********************************************************************/
 
@@ -23,6 +23,7 @@
 #include "vorbis/codec.h"
 
 #include "psy.h"
+#include "os.h"
 #include "lpc.h"
 #include "smallft.h"
 #include "scales.h"
index e8ab52e..e615df8 100644 (file)
@@ -13,7 +13,7 @@
 
  function: simple utility that runs audio through the psychoacoustics
            without encoding
- last mod: $Id: psytune.c,v 1.1 2000/02/25 11:05:32 xiphmont Exp $
+ last mod: $Id: psytune.c,v 1.2 2000/04/03 08:30:49 xiphmont Exp $
 
  ********************************************************************/
 
@@ -23,6 +23,7 @@
 #include <math.h>
 
 #include "vorbis/codec.h"
+#include "os.h"
 #include "psy.h"
 #include "mdct.h"
 #include "window.h"
index 6e304b7..3666fb4 100644 (file)
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.17 2000/03/10 16:23:57 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.18 2000/04/03 08:30:49 xiphmont Exp $
 
  ********************************************************************/
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <math.h>
 #include "vorbis/codec.h"
 #include "vorbis/vorbisfile.h"
@@ -898,7 +899,7 @@ double ov_time_tell(OggVorbis_File *vf){
     }
   }
 
-  return(time_total+(vf->pcm_offset-pcm_total)/vf->vi[link].rate);
+  return((double)time_total+(double)(vf->pcm_offset-pcm_total)/vf->vi[link].rate);
 }
 
 /*  link:   -1) return the vorbis_info struct for the bitstream section