ref: 2244f7c92f733cd69fa014252bb9ded3ac59266b
parent: 3192dd937a71f737af84273806d91b306526cece
author: menno <menno>
date: Wed Aug 14 13:59:53 EDT 2002
Updates in aacDECdrop
--- a/aacDECdrop/Script.rc
+++ b/aacDECdrop/Script.rc
@@ -97,7 +97,7 @@
// Dialog
//
-IDD_VOLUME DIALOGEX 0, 0, 255, 218
+IDD_VOLUME DIALOGEX 0, 0, 255, 236
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "Decoder Options V1.2"
@@ -117,7 +117,7 @@
WS_DISABLED,15,60,65,10
CONTROL "DEC AU",IDC_DECAU,"Button",BS_AUTORADIOBUTTON |
WS_DISABLED,125,60,65,10
- GROUPBOX "Output Sample Format Settings",IDC_STATIC,7,82,241,50
+ GROUPBOX "Output Sample Format Settings",IDC_STATIC,7,82,241,65
CONTROL "16 bit PCM",IDC_16BIT,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,15,96,65,10
CONTROL "24 bit PCM",IDC_24BIT,"Button",BS_AUTORADIOBUTTON,125,
@@ -126,32 +126,32 @@
111,65,10
CONTROL "32 bit floats",IDC_FLOATS,"Button",BS_AUTORADIOBUTTON,
125,111,65,10
- GROUPBOX "Object Type Settings",IDC_STATIC,7,133,241,50
+ CONTROL "16 bit PCM - Dithered",IDC_16BIT_DITHER,"Button",
+ BS_AUTORADIOBUTTON,15,126,83,10
+ GROUPBOX "Object Type Settings",IDC_STATIC,7,149,241,50
CONTROL "Main",IDC_MAIN,"Button",BS_AUTORADIOBUTTON | WS_GROUP,
- 15,147,65,10
+ 15,163,65,10
CONTROL "Low Complexity",IDC_LC,"Button",BS_AUTORADIOBUTTON,125,
- 147,65,10
+ 163,65,10
CONTROL "Long Term Prediction",IDC_LTP,"Button",
- BS_AUTORADIOBUTTON,15,162,85,10
- CONTROL "Low Delay",IDC_LD,"Button",BS_AUTORADIOBUTTON,125,162,
+ BS_AUTORADIOBUTTON,15,178,85,10
+ CONTROL "Low Delay",IDC_LD,"Button",BS_AUTORADIOBUTTON,125,178,
65,10
- DEFPUSHBUTTON "Accept",IDC_BUTTON1,102,192,50,16
+ DEFPUSHBUTTON "Accept",IDC_BUTTON1,102,210,50,16
END
-IDD_ABOUT DIALOG 0, 0, 255, 194
+IDD_ABOUT DIALOGEX 0, 0, 255, 194
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
-CAPTION "About aacDECdrop V1.2"
-FONT 8, "MS Sans Serif"
+CAPTION "About aacDECdrop V1.21"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
GROUPBOX "",IDC_STATIC,7,5,241,157
CTEXT "A decoder to decode/playback aac/Mpeg4 files.",
IDC_STATIC,70,13,155,8
- CTEXT "Copyright 2002 John Edwards.",IDC_STATIC,70,29,97,8
- CTEXT "Utilises standard libfaad from Menno Bakker and",
- IDC_STATIC,70,37,153,8
- CTEXT "LibSndFile from Erik de Castro Lopo.",IDC_STATIC,70,45,
- 115,8
+ CTEXT "Copyright 2002 John Edwards.",IDC_STATIC,70,30,97,8
+ CTEXT "Utilises standard libfaad2 from Menno Bakker.",
+ IDC_STATIC,70,46,145,8
LTEXT "This program is free software; you can redistribute it and/or modify it",
IDC_STATIC,13,62,212,8
LTEXT "under the terms of the GNU Public Licence as published by the Free",
--- a/aacDECdrop/decode.c
+++ b/aacDECdrop/decode.c
@@ -16,8 +16,8 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: decode.c,v 1.8 2002/08/13 19:28:08 menno Exp $
-** $Id: decode.c,v 1.8 2002/08/13 19:28:08 menno Exp $
+** $Id: decode.c,v 1.9 2002/08/14 17:59:53 menno Exp $
+** $Id: decode.c,v 1.9 2002/08/14 17:59:53 menno Exp $
**/
#ifdef _WIN32
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <faad.h>
-#include <sndfile.h>
#include <mp4.h>
#include "audio.h"
@@ -138,7 +137,6 @@
faacDecConfigurationPtr config;
int first_time = 1;
- int i;
/* declare variables for buffering */
@@ -318,7 +316,6 @@
audio_file *aufile;
faacDecHandle hDecoder;
- faacDecConfigurationPtr config;
faacDecFrameInfo frameInfo;
unsigned char *buffer;
--- a/aacDECdrop/main.c
+++ b/aacDECdrop/main.c
@@ -507,107 +507,56 @@
if(iniSettings.decode_mode == 0)
{
CheckDlgButton(hwndDlg,IDC_PLAYBACK,TRUE);
- CheckDlgButton(hwndDlg,IDC_DECODE,FALSE);
CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
+ if(iniSettings.outputFormat != 1
+ && iniSettings.outputFormat != 5)
+ CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
+ else if(iniSettings.outputFormat == 1)
+ CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
+ else if(iniSettings.outputFormat == 5)
+ CheckDlgButton(hwndDlg,IDC_16BIT_DITHER,TRUE);
+ CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AIFF), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUNAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DECAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_24BIT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_32BIT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FLOATS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT_DITHER), TRUE);
}
else if(iniSettings.decode_mode == 1)
{
CheckDlgButton(hwndDlg,IDC_PLAYBACK,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECODE,TRUE);
if(iniSettings.outputFormat == 1)
- {
CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
else if(iniSettings.outputFormat == 2)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
CheckDlgButton(hwndDlg,IDC_24BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
else if(iniSettings.outputFormat == 3)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
CheckDlgButton(hwndDlg,IDC_32BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
else if(iniSettings.outputFormat == 4)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
CheckDlgButton(hwndDlg,IDC_FLOATS,TRUE);
- }
+ else if(iniSettings.outputFormat == 5)
+ CheckDlgButton(hwndDlg,IDC_16BIT_DITHER,TRUE);
if(iniSettings.fileType == 1)
- {
CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
else if(iniSettings.fileType == 2)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
CheckDlgButton(hwndDlg,IDC_AIFF,TRUE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
else if(iniSettings.fileType == 3)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
CheckDlgButton(hwndDlg,IDC_SUNAU,TRUE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
else if(iniSettings.fileType == 4)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
CheckDlgButton(hwndDlg,IDC_DECAU,TRUE);
- }
}
if(iniSettings.object_type == 0)
- {
CheckDlgButton(hwndDlg,IDC_MAIN,TRUE);
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- }
else if(iniSettings.object_type == 1)
- {
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
CheckDlgButton(hwndDlg,IDC_LC,TRUE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- }
else if(iniSettings.object_type == 3)
- {
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
CheckDlgButton(hwndDlg,IDC_LTP,TRUE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- }
else if(iniSettings.object_type == 23)
- {
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
CheckDlgButton(hwndDlg,IDC_LD,TRUE);
- }
break;
case WM_CLOSE:
@@ -641,6 +590,8 @@
set_outputFormat(3); // 32 bit PCM
else if (IsDlgButtonChecked(hwndDlg, IDC_FLOATS) == BST_CHECKED)
set_outputFormat(4); // 32 bit floats
+ else if (IsDlgButtonChecked(hwndDlg, IDC_16BIT_DITHER) == BST_CHECKED)
+ set_outputFormat(5); // 16 bit PCM dithered
if (IsDlgButtonChecked(hwndDlg, IDC_MAIN) == BST_CHECKED)
set_object_type(0); // Main
@@ -659,138 +610,31 @@
return TRUE;
case IDC_PLAYBACK:
- CheckDlgButton(hwndDlg,IDC_DECODE,FALSE);
CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AIFF), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUNAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DECAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_24BIT), FALSE);
CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_32BIT), FALSE);
CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FLOATS), FALSE);
CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- break;
- case IDC_DECODE:
- CheckDlgButton(hwndDlg,IDC_PLAYBACK,FALSE);
- break;
- case IDC_WAV:
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- break;
- case IDC_AIFF:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
- else
- {
- CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
- break;
- case IDC_SUNAU:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
- else
- {
- CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
- break;
- case IDC_DECAU:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_WAV,FALSE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- }
- else
- {
- CheckDlgButton(hwndDlg,IDC_WAV,TRUE);
- CheckDlgButton(hwndDlg,IDC_AIFF,FALSE);
- CheckDlgButton(hwndDlg,IDC_SUNAU,FALSE);
- CheckDlgButton(hwndDlg,IDC_DECAU,FALSE);
- }
- break;
- case IDC_16BIT:
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- break;
- case IDC_24BIT:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
- else
- {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT_DITHER), TRUE);
+ if (IsDlgButtonChecked(hwndDlg, IDC_16BIT_DITHER) != BST_CHECKED
+ && IsDlgButtonChecked(hwndDlg, IDC_16BIT) != BST_CHECKED)
CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
break;
- case IDC_32BIT:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
- else
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
- break;
- case IDC_FLOATS:
- if (IsDlgButtonChecked(hwndDlg, IDC_DECODE) == BST_CHECKED)
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- }
- else
- {
- CheckDlgButton(hwndDlg,IDC_16BIT,TRUE);
- CheckDlgButton(hwndDlg,IDC_24BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_32BIT,FALSE);
- CheckDlgButton(hwndDlg,IDC_FLOATS,FALSE);
- }
- break;
- case IDC_MAIN:
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- break;
- case IDC_LC:
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- break;
- case IDC_LTP:
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
- CheckDlgButton(hwndDlg,IDC_LD,FALSE);
- break;
- case IDC_LD:
- CheckDlgButton(hwndDlg,IDC_MAIN,FALSE);
- CheckDlgButton(hwndDlg,IDC_LC,FALSE);
- CheckDlgButton(hwndDlg,IDC_LTP,FALSE);
+ case IDC_DECODE:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AIFF), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUNAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DECAU), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_24BIT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_32BIT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FLOATS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_16BIT_DITHER), TRUE);
break;
default:
break;
--- a/aacDECdrop/resource.h
+++ b/aacDECdrop/resource.h
@@ -1,5 +1,5 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by Script.rc
//
#define IDD_VOLUME 101
@@ -29,6 +29,7 @@
#define IDC_LC 1024
#define IDC_LTP 1025
#define IDC_LD 1026
+#define IDC_16BIT_DITHER 1027
#define IDC_BUTTON6 1033
#define IDM_VOLUME 40005
#define IDM_STOP_DEC 40006
@@ -44,7 +45,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 134
#define _APS_NEXT_COMMAND_VALUE 40018
-#define _APS_NEXT_CONTROL_VALUE 1021
+#define _APS_NEXT_CONTROL_VALUE 1028
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif