ref: 794232970215d1792a1ee7893f2857ca58e904b4
parent: 9b4a10a773d6088483a61b6feb305c2396e67f41
author: menno <menno>
date: Tue Feb 15 02:49:46 EST 2000
Made DLL compile
--- a/aacenc.h
+++ b/aacenc.h
@@ -136,7 +136,7 @@
#else
-__declspec(dllexport) faacAACStream *faacEncodeInit(faacAACConfig *ac, int *samplesToRead, int *bitBufferSize, int *headerSize);
+__declspec(dllexport) int faacEncodeInit(faacAACStream *as, int *samplesToRead, int *bitBufferSize, int *headerSize);
__declspec(dllexport) int faacEncodeFrame(faacAACStream *as, short *Buffer, int Samples, unsigned char *bitBuffer, int *bitBufSize);
__declspec(dllexport) int faacEncodeFree(faacAACStream *as, unsigned char *headerBuf);
__declspec(dllexport) int faacEncodeFinish(faacAACStream *as, unsigned char *bitBuffer, int *bitBufSize);
--- a/encoder.c
+++ b/encoder.c
@@ -28,20 +28,20 @@
int startupNumFrame;
if ((as->inputBuffer = (double**)malloc( as->channels*sizeof(double*)))==NULL)
- return NULL;
+ return 0;
for (ch=0; ch < as->channels; ch++)
{
if ((as->inputBuffer[ch]=(double*)malloc( 1024*sizeof(double)))==NULL)
- return NULL;
+ return 0;
}
if((as->bit_rate % 1000)||(as->bit_rate < 16000)) {
- return NULL;
+ return 0;
}
if (as->channels != 2)
- return NULL;
+ return 0;
if ((as->profile != MAIN_PROFILE)&&(as->profile != LOW_PROFILE))
- return NULL;
+ return 0;
as->total_bits = 0;
as->frames = 0;
@@ -325,7 +325,7 @@
faacVersion *faacv = malloc(sizeof(faacVersion));
faacv->DLLMajorVersion = 2;
- faacv->DLLMinorVersion = 20;
+ faacv->DLLMinorVersion = 30;
faacv->MajorVersion = 0;
faacv->MinorVersion = 65;
strcpy(faacv->HomePage, "http://www.slimline.net/aac/");
@@ -630,7 +630,7 @@
as->header_type = header_type;
res = faacEncodeInit(as, &readNumSample, &bitBufSize, &headerSize);
- if (res == NULL) {
+ if (res == 0) {
printf("Error while encoding %s.\n", FileNames[i]);
continue;
}