shithub: aacdec

Download patch

ref: c13fd2a1bb16abef815a5ca95fb685b0a4902402
parent: 26d190b3b044f04affebc0ea91152cae4c8203ca
author: menno <menno>
date: Tue Feb 19 10:31:56 EST 2002

Little fixes for MSVC

--- a/plugins/winamp3/aacpcm.cpp
+++ b/plugins/winamp3/aacpcm.cpp
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: aacpcm.cpp,v 1.1 2002/01/21 20:38:34 menno Exp $
+** $Id: aacpcm.cpp,v 1.2 2002/02/19 15:31:56 menno Exp $
 **/
 
 #include <stdio.h>
@@ -49,7 +49,8 @@
 
 int AacPcm::processData(MediaInfo *infos, ChunkList *chunk_list, bool *killswitch)
 {
-    unsigned long sr, ch;
+    unsigned long sr;
+    unsigned char ch;
     short *samplebuffer;
     faacDecFrameInfo frameInfo;
     int k, last_frame = 0;
@@ -64,7 +65,7 @@
     if (!init_called)
     {
         buffercount = 0;
-        reader->read(buffer, 768*2);
+        reader->read((char*)buffer, 768*2);
         bytecount += 768*2;
 
         buffercount = faacDecInit(hDecoder, buffer, &sr, &ch);
@@ -81,11 +82,11 @@
         for (k = 0; k < (768*2 - buffercount); k++)
             buffer[k] = buffer[k + buffercount];
 
-        reader->read(buffer + (768*2) - buffercount, buffercount);
+        reader->read((char*)(buffer + (768*2) - buffercount), buffercount);
         buffercount = 0;
     }
 
-    samplebuffer = faacDecDecode(hDecoder, &frameInfo, buffer);
+    samplebuffer = (short*)faacDecDecode(hDecoder, &frameInfo, (unsigned char*)buffer);
     if (frameInfo.error)
     {
         last_frame = 1;