ref: 84530f503f9db43289dcc5e554fc2534364048c6
parent: 7c48e1435506c392728894d86a27c339b7f6bec5
author: menno <menno>
date: Wed Jan 24 07:56:46 EST 2001
Minor changes to GUI
--- a/frontend/faacgui.rc
+++ b/frontend/faacgui.rc
@@ -63,7 +63,7 @@
PUSHBUTTON "...",IDC_SELECT_OUTPUTFILE,228,32,19,14,WS_DISABLED,
WS_EX_STATICEDGE
CONTROL "Allow Mid/Side",IDC_ALLOWMIDSIDE,"Button",
- BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,17,78,63,10
+ BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,13,78,71,10
EDITTEXT IDC_BITRATE,142,73,69,14,ES_AUTOHSCROLL
EDITTEXT IDC_BANDWIDTH,142,93,69,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "Encode",IDOK,75,149,50,14,WS_DISABLED
@@ -76,7 +76,7 @@
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,7,54,
252,1
LTEXT "-",IDC_INPUTPARAMS,32,66,55,8
- LTEXT "In:",IDC_STATIC,18,66,12,8
+ LTEXT "In:",IDC_STATIC,14,66,12,8
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,
120,252,10
GROUPBOX "Output Format",IDC_STATIC,94,62,153,51
@@ -85,6 +85,8 @@
LTEXT "Bitrate:",IDC_STATIC,101,76,37,8
LTEXT "bps/ch",IDC_STATIC,218,76,24,8
LTEXT "Hz",IDC_STATIC,218,96,10,8
+ CONTROL "Use LFE channel",IDC_USELFE,"Button",BS_AUTOCHECKBOX |
+ BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,13,89,71,10
END
--- a/frontend/maingui.c
+++ b/frontend/maingui.c
@@ -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: maingui.c,v 1.1 2001/01/23 23:02:15 menno Exp $
+ * $Id: maingui.c,v 1.2 2001/01/24 12:56:46 menno Exp $
*/
#include <windows.h>
@@ -36,7 +36,7 @@
static char inputFilename[_MAX_PATH], outputFilename [_MAX_PATH];
-static BOOL SelectFileName (HWND hParent, char *filename, BOOL forReading)
+static BOOL SelectFileName(HWND hParent, char *filename, BOOL forReading)
{
OPENFILENAME ofn;
@@ -61,6 +61,8 @@
if (forReading)
{
char filters[] = { "Wave Files (*.wav)\0*.wav\0" \
+ "AIFF Files (*.aif;*.aiff;*.aifc)\0*.aif;*.aiff;*.aifc\0" \
+ "AU Files (*.au)\0*.au\0" \
"All Files (*.*)\0*.*\0\0" };
ofn.lpstrFilter = filters;
@@ -118,7 +120,7 @@
SetDlgItemText(hWnd, IDC_OUTPUTFILENAME, outputFilename);
- wsprintf(szTemp, "%iHz %s", sampleRate, (numChannels > 1) ? "Stereo" : "Mono");
+ wsprintf(szTemp, "%iHz %ich", sampleRate, numChannels);
SetDlgItemText(hWnd, IDC_INPUTPARAMS, szTemp);
// // //
@@ -175,6 +177,7 @@
faacEncConfigurationPtr config = faacEncGetCurrentConfiguration(hEncoder);
config->allowMidside = IsDlgButtonChecked(hWnd, IDC_ALLOWMIDSIDE) == BST_CHECKED ? 1 : 0;
+ config->useLfe = IsDlgButtonChecked(hWnd, IDC_USELFE) == BST_CHECKED ? 1 : 0;
GetDlgItemText(hWnd, IDC_BITRATE, szTemp, sizeof(szTemp));
config->bitRate = atoi(szTemp);
GetDlgItemText(hWnd, IDC_BANDWIDTH, szTemp, sizeof(szTemp));
@@ -202,9 +205,12 @@
unsigned int bytesInput = 0, bytesConsumed = 0;
DWORD numberOfBytesWritten = 0;
- unsigned char bitbuf[BITBUFSIZE];
- short pcmbuf[PCMBUFSIZE];
+ short *pcmbuf;
+ unsigned char *bitbuf;
+ pcmbuf = (short*)malloc(PCMBUFSIZE*numChannels*sizeof(short));
+ bitbuf = (unsigned char*)malloc(BITBUFSIZE*sizeof(unsigned char));
+
SendDlgItemMessage(hWnd, IDC_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 1024));
SendDlgItemMessage(hWnd, IDC_PROGRESS, PBM_SETPOS, 0, 0);
@@ -269,6 +275,8 @@
}
CloseHandle(hOutfile);
+ if (pcmbuf) free(pcmbuf);
+ if (bitbuf) free(bitbuf);
}
faacEncClose(hEncoder);
@@ -292,6 +300,7 @@
inputFilename [0] = 0x00;
CheckDlgButton(hWnd, IDC_ALLOWMIDSIDE, TRUE);
+ CheckDlgButton(hWnd, IDC_USELFE, FALSE);
SetDlgItemText(hWnd, IDC_BITRATE, "64000");
SetDlgItemText(hWnd, IDC_BANDWIDTH, "18000");
--- a/frontend/resource.h
+++ b/frontend/resource.h
@@ -14,6 +14,7 @@
#define IDC_TIME 1008
#define IDC_BANDWIDTH 1009
#define IDC_BITRATE 1010
+#define IDC_USELFE 1011
// Next default values for new objects
//