shithub: aacenc

Download patch

ref: 616339114cd7d6c7e2ab8a85b3d07ce19739f2f8
parent: 0355026bed764cc0ff80a0fdd6f8e16cc4cbcaad
author: knik <knik>
date: Thu May 1 06:27:27 EDT 2003

libfaac version number compatibility

--- a/plugins/cooledit/Faac.cpp
+++ b/plugins/cooledit/Faac.cpp
@@ -154,11 +154,18 @@
 	{
 	case WM_INITDIALOG:
 		{
-		char buf[512];
+		  char buf[512];
+		  unsigned long samplesInput, maxBytesOutput;
+
+		  faacEncHandle hEncoder =
+		    faacEncOpen(44100, 2, &samplesInput, &maxBytesOutput);
+		  faacEncConfigurationPtr myFormat =
+		    faacEncGetCurrentConfiguration(hEncoder);
+
 			sprintf(buf,
 					APP_NAME " plugin " APP_VER " by Antonio Foranna\n\n"
 					"Engines used:\n"
-					"\tFAAC v%g\n"
+					"\tlibfaac v%s\n"
 					"\tFAAD2 v" FAAD2_VERSION "\n"
 					"\t" PACKAGE " v" VERSION "\n\n"
 					"This code is given with FAAC package and does not contain executables.\n"
@@ -165,10 +172,12 @@
 					"This program is free software and can be distributed/modifyed under the terms of the GNU General Public License.\n"
 					"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.\n\n"
 					"Compiled on %s\n",
-					/*FAACENC_VERSION*/ FAAC_CFG_VERSION,
+				(myFormat->version == FAAC_CFG_VERSION)
+				? myFormat->name : " bad version",
 					__DATE__
 					);
 			SetDlgItemText(hWndDlg, IDC_L_ABOUT, buf);
+			faacEncClose(hEncoder);
 		}
 		break;
 	case WM_COMMAND: