ref: e162064e1a535c04a02acd1adf6803610e545f4e
parent: 849c0cf54dde798faf2b422f6012e6823ce4ed4d
author: menno <menno>
date: Mon Mar 19 15:57:40 EDT 2007
Made faacgui buildable again Made stdout as output possible (use - as output filename) Disabled MAIN and LTP encoding Increase version number
--- a/frontend/faacgui.dsp
+++ b/frontend/faacgui.dsp
@@ -25,7 +25,7 @@
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=xicl6.exe
+CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
@@ -51,7 +51,7 @@
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=xilink6.exe
+LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# SUBTRACT LINK32 /profile /nodefaultlib
@@ -78,7 +78,7 @@
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=xilink6.exe
+LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
@@ -110,6 +110,10 @@
# Begin Source File
SOURCE=..\include\faac.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\faaccfg.h
# End Source File
# Begin Source File
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -18,7 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: main.c,v 1.79 2006/09/25 19:53:36 menno Exp $
+ * $Id: main.c,v 1.80 2007/03/19 19:57:40 menno Exp $
*/
#ifdef _MSC_VER
@@ -694,6 +694,7 @@
dieMessage = "Unrecognised MPEG version!\n";
}
break;
+#if 0
case OBJTYPE_FLAG:
if (!strcasecmp(optarg, "LC"))
objectType = LOW;
@@ -705,6 +706,7 @@
} else
dieMessage = "Unrecognised object type!\n";
break;
+#endif
case 'L':
fprintf(stderr, faac_copyright_string);
dieMessage = license;
@@ -918,7 +920,14 @@
{
#endif
/* open the aac output file */
- outfile = fopen(aacFileName, "wb");
+ if (!strcmp(aacFileName, "-"))
+ {
+ outfile = stdout;
+ }
+ else
+ {
+ outfile = fopen(aacFileName, "wb");
+ }
if (!outfile)
{
fprintf(stderr, "Couldn't create output file %s\n", aacFileName);
@@ -1143,6 +1152,12 @@
/*
$Log: main.c,v $
+Revision 1.80 2007/03/19 19:57:40 menno
+Made faacgui buildable again
+Made stdout as output possible (use - as output filename)
+Disabled MAIN and LTP encoding
+Increase version number
+
Revision 1.79 2006/09/25 19:53:36 menno
Fixed track and disk number reading from command line
--- a/frontend/maingui.c
+++ b/frontend/maingui.c
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: maingui.c,v 1.20 2003/03/27 17:11:33 knik Exp $
+ * $Id: maingui.c,v 1.21 2007/03/19 19:57:40 menno Exp $
*/
#include <windows.h>
@@ -93,7 +93,7 @@
unsigned int sampleRate, numChannels;
char *pExt;
- if ((infile = wav_open_read(inputFilename)) == NULL)
+ if ((infile = wav_open_read(inputFilename, 0)) == NULL)
return;
/* determine input file parameters */
@@ -131,7 +131,7 @@
GetDlgItemText(hWnd, IDC_OUTPUTFILENAME, outputFilename, sizeof(outputFilename));
/* open the input file */
- if ((infile = wav_open_read(inputFilename)) != NULL)
+ if ((infile = wav_open_read(inputFilename, 0)) != NULL)
{
/* determine input file parameters */
unsigned int sampleRate = infile->samplerate;
@@ -203,12 +203,12 @@
unsigned int bytesInput = 0;
DWORD numberOfBytesWritten = 0;
- short *pcmbuf;
+ int *pcmbuf;
unsigned char *bitbuf;
char HeaderText[50];
char Percentage[5];
- pcmbuf = (short*)LocalAlloc(0, inputSamples*sizeof(short));
+ pcmbuf = (short*)LocalAlloc(0, inputSamples*sizeof(int));
bitbuf = (unsigned char*)LocalAlloc(0, maxOutputBytes*sizeof(unsigned char));
SendDlgItemMessage(hWnd, IDC_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 1024));
@@ -219,12 +219,12 @@
int bytesWritten;
UINT timeElapsed, timeEncoded;
- bytesInput = wav_read_short(infile, pcmbuf, inputSamples) * sizeof(short);
+ bytesInput = wav_read_int24(infile, pcmbuf, inputSamples, NULL) * sizeof(int);
- SendDlgItemMessage (hWnd, IDC_PROGRESS, PBM_SETPOS, (unsigned long)((float)totalBytesRead * 1024.0f / (infile->samples*2*numChannels)), 0);
+ SendDlgItemMessage (hWnd, IDC_PROGRESS, PBM_SETPOS, (unsigned long)((float)totalBytesRead * 1024.0f / (infile->samples*sizeof(int)*numChannels)), 0);
/* Percentage for Dialog Output */
- _itoa((int)((float)totalBytesRead * 100.0f / (infile->samples*2*numChannels)),Percentage,10);
+ _itoa((int)((float)totalBytesRead * 100.0f / (infile->samples*sizeof(int)*numChannels)),Percentage,10);
lstrcpy(HeaderText,"FAAC GUI: ");
lstrcat(HeaderText,Percentage);
lstrcat(HeaderText,"%");
@@ -233,7 +233,7 @@
totalBytesRead += bytesInput;
timeElapsed = (GetTickCount () - startTime) / 10;
- timeEncoded = 100.0 * totalBytesRead / (sampleRate * numChannels * sizeof (short));
+ timeEncoded = 100.0 * totalBytesRead / (sampleRate * numChannels * sizeof (int));
if (timeElapsed > (lastUpdated + 20))
{
@@ -259,7 +259,7 @@
/* call the actual encoding routine */
bytesWritten = faacEncEncode(hEncoder,
pcmbuf,
- bytesInput/2,
+ bytesInput/sizeof(int),
bitbuf,
maxOutputBytes);
@@ -334,12 +334,12 @@
SendMessage(GetDlgItem(hWnd, IDC_MPEGVERSION), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"MPEG4");
SendMessage(GetDlgItem(hWnd, IDC_MPEGVERSION), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"MPEG2");
- SendMessage(GetDlgItem(hWnd, IDC_MPEGVERSION), CB_SETCURSEL, 1, 0);
+ SendMessage(GetDlgItem(hWnd, IDC_MPEGVERSION), CB_SETCURSEL, 0, 0);
- SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"Main");
+// SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"Main");
SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"Low Complexity");
- SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"LTP");
- SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_SETCURSEL, 1, 0);
+// SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"LTP");
+ SendMessage(GetDlgItem(hWnd, IDC_OBJECTTYPE), CB_SETCURSEL, 0, 0);
CheckDlgButton(hWnd, IDC_ALLOWMIDSIDE, TRUE);
CheckDlgButton(hWnd, IDC_USELFE, FALSE);
--- a/libfaac/version.h
+++ b/libfaac/version.h
@@ -1,8 +1,8 @@
#ifndef _VERSION_H_
#define _VERSION_H_
-#define FAAC_RELEASE 1
+#define FAAC_RELEASE 0
-#define FAAC_VERSION "1.25"
+#define FAAC_VERSION "1.26"
#endif
--
⑨