shithub: aacdec

Download patch

ref: c9472c6c3d2d974cac60890e772266a16157b5c0
parent: 6bd8442bfc16bf6ba218fda8eba3abb6901669cf
author: menno <menno>
date: Tue Jul 29 06:50:35 EDT 2003

New CoreAAC code

diff: cannot open b/CoreAAC/resource//null: file does not exist: 'b/CoreAAC/resource//null'
--- /dev/null
+++ b/CoreAAC/.cvsignore
@@ -1,0 +1,6 @@
+*.ncb
+*.opt
+*.plg
+*.aps
+Debug
+Release
--- /dev/null
+++ b/CoreAAC/AACProfilesName.h
@@ -1,0 +1,35 @@
+static char* ObjectTypesNameTable[32] = {
+	"NULL",
+	"AAC Main",
+	"AAC LC",
+	"AAC SSR",
+	"AAC LTP",
+	"Reserved",
+	"AAC Scalable",
+	"TwinVQ",
+	"CELP",
+	"HVXC",
+	"Reserved",
+	"Reserved",
+	"TTSI",
+	"Main synthetic",
+	"Wavetable synthesis",
+	"General MIDI",
+	"Algorithmic Synthesis and Audio FX",
+	/* MPEG-4 Version 2 */
+	"ER AAC LC",
+	"(Reserved)",
+	"ER AAC LTP",
+	"ER AAC scalable",
+	"ER TwinVQ",
+	"ER BSAC",
+	"ER AAC LD",
+	"ER CELP",
+	"ER HVXC",
+	"ER HILN",
+	"ER Parametric",
+	"(Reserved)",
+	"(Reserved)",
+	"(Reserved)",
+	"(Reserved)"
+};
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/CoreAAC.cpp
@@ -1,0 +1,638 @@
+/* 
+ * CoreAAC - AAC DirectShow Decoder Filter
+ *
+ * Modification to decode AAC without ADTS and multichannel support
+ * (c) 2003 christophe.paris@free.fr
+ *
+ * Under section 8 of the GNU General Public License, the copyright
+ * holders of CoreAAC explicitly forbid distribution in the following
+ * countries:
+ * - Japan
+ * - United States of America 
+ *
+ *
+ * AAC DirectShow Decoder Filter
+ * Copyright (C) 2003 Robert Cioch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+ 
+
+#include <windows.h>
+#include <streams.h>
+#include <initguid.h>
+#include <olectl.h>
+#include <transfrm.h>
+
+#include <mmreg.h>
+#include <ks.h>
+#include <ksmedia.h>
+
+#include <stdio.h>
+
+#include "AACProfilesName.h"
+#include "ICoreAAC.h"
+#include "CoreAACGUID.h"
+#include "CoreAACInfoProp.h"
+#include "CoreAACAboutProp.h"
+#include "CoreAAC.h"
+
+// ============================================================================
+//  Registration setup stuff
+
+AMOVIESETUP_MEDIATYPE sudInputType[] =
+{
+	{ &MEDIATYPE_Audio, &MEDIASUBTYPE_AAC }
+};
+
+AMOVIESETUP_MEDIATYPE sudOutputType[] =
+{
+	{ &MEDIATYPE_Audio, &MEDIASUBTYPE_PCM }
+};
+
+AMOVIESETUP_PIN sudPins[] =
+{
+	{ L"Input",
+		FALSE,							// bRendered
+		FALSE,							// bOutput
+		FALSE,							// bZero
+		FALSE,							// bMany
+		&CLSID_NULL,					// clsConnectsToFilter
+		NULL,							// ConnectsToPin
+		NUMELMS(sudInputType),			// Number of media types
+		sudInputType
+	},
+	{ L"Output",
+		FALSE,							// bRendered
+		TRUE,							// bOutput
+		FALSE,							// bZero
+		FALSE,							// bMany
+		&CLSID_NULL,					// clsConnectsToFilter
+		NULL,							// ConnectsToPin
+		NUMELMS(sudOutputType),			// Number of media types
+		sudOutputType
+	}
+};
+
+AMOVIESETUP_FILTER sudDecoder =
+{
+	&CLSID_DECODER,
+	L"CoreAAC Audio Decoder",
+	MERIT_PREFERRED,
+	NUMELMS(sudPins),
+	sudPins
+};
+
+// ============================================================================
+// COM Global table of objects in this dll
+
+CFactoryTemplate g_Templates[] = 
+{
+  { L"CoreAAC Audio Decoder", &CLSID_DECODER, CCoreAACDecoder::CreateInstance, NULL, &sudDecoder },
+  { L"CoreAAC Audio Decoder Info", &CLSID_CoreAACInfoProp, CCoreAACInfoProp::CreateInstance, NULL, NULL},
+  { L"CoreAAC Audio Decoder About", &CLSID_CoreAACAboutProp, CCoreAACAboutProp::CreateInstance, NULL, NULL},
+};
+
+// Count of objects listed in g_cTemplates
+int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
+
+// ============================================================================
+
+STDAPI DllRegisterServer()
+{
+	return AMovieDllRegisterServer2(TRUE);
+}
+
+// ----------------------------------------------------------------------------
+
+STDAPI DllUnregisterServer()
+{
+	return AMovieDllRegisterServer2(FALSE);
+}
+
+// ----------------------------------------------------------------------------
+
+// The streams.h DLL entrypoint.
+extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
+
+// The entrypoint required by the MSVC runtimes. This is used instead
+// of DllEntryPoint directly to ensure global C++ classes get initialised.
+BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) {
+	
+    return DllEntryPoint(reinterpret_cast<HINSTANCE>(hDllHandle), dwReason, lpreserved);
+}
+
+// ----------------------------------------------------------------------------
+
+CUnknown *WINAPI CCoreAACDecoder::CreateInstance(LPUNKNOWN punk, HRESULT *phr)
+{
+	CCoreAACDecoder *pNewObject = new CCoreAACDecoder(punk, phr);
+	if (!pNewObject)
+		*phr = E_OUTOFMEMORY;
+	return pNewObject;
+}
+
+// ----------------------------------------------------------------------------
+
+void SaveInt(char* keyname, int value)
+{
+	HKEY hKey;
+	DWORD dwDisp;
+	if (ERROR_SUCCESS == RegCreateKeyEx(HKEY_CURRENT_USER,
+		"Software\\CoreAAC", 0, "REG_SZ",
+		REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, &dwDisp))
+	{
+		DWORD dwSize = sizeof(DWORD);
+		RegSetValueEx(hKey, keyname, 0, REG_DWORD, (CONST BYTE*)&value, dwSize);
+		RegCloseKey(hKey);
+	}
+}
+
+int LoadInt(char* keyname, int default_value)
+{
+	HKEY hKey;
+	int result = default_value;
+	
+	if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER,
+		"Software\\CoreAAC", 0, KEY_READ, &hKey))
+	{
+		DWORD dwTmp = 0;
+		DWORD dwcbData = sizeof(DWORD);
+		if(RegQueryValueEx(hKey, keyname, NULL, NULL, (LPBYTE) &dwTmp, &dwcbData) == ERROR_SUCCESS)
+		{
+			result = dwTmp;
+		}
+		RegCloseKey(hKey);
+	}
+	return result;
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACDecoder::CCoreAACDecoder(LPUNKNOWN lpunk, HRESULT *phr) :
+	CTransformFilter(NAME("CoreAAC Audio Decoder"), lpunk, CLSID_DECODER),
+	m_decHandle(NULL),
+	m_decoderSpecificLen(0),
+	m_decoderSpecific(NULL),
+	m_Channels(0),
+	m_SamplesPerSec(0),
+	m_BitsPerSample(0),
+	m_Bitrate(0),
+	m_brCalcFrames(0),
+	m_brBytesConsumed(0),
+	m_DecodedFrames(0),
+	m_OutputBuffLen(0),
+	m_DownMatrix(false)
+{
+	NOTE("CCoreAACDecoder::CCoreAACDecoder");
+
+	m_ProfileName[0] = '\0';
+	m_DownMatrix = LoadInt("DownMatrix", TRUE) ? true : false;	
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACDecoder::~CCoreAACDecoder()
+{
+	NOTE("CCoreAACDecoder::~CCoreAACDecoder");
+
+	SaveInt("DownMatrix",m_DownMatrix);
+
+	if(m_decHandle)
+	{
+		faacDecClose(m_decHandle);
+		m_decHandle = NULL;
+	}
+	if(m_decoderSpecific)
+	{
+		delete m_decoderSpecific;
+		m_decoderSpecific = NULL;
+	}
+}
+
+// ----------------------------------------------------------------------------
+
+STDMETHODIMP CCoreAACDecoder::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+	if(riid == IID_ICoreAACDec)
+		return GetInterface((ICoreAACDec *)this, ppv);	
+	else if (riid == IID_ISpecifyPropertyPages)
+		return GetInterface((ISpecifyPropertyPages *)this, ppv);
+	else
+		return CTransformFilter::NonDelegatingQueryInterface(riid, ppv);
+}
+
+// ----------------------------------------------------------------------------
+// property pages
+
+STDMETHODIMP CCoreAACDecoder::GetPages(CAUUID *pPages)
+{
+	pPages->cElems = 2;
+	pPages->pElems = (GUID *)CoTaskMemAlloc(pPages->cElems * sizeof(GUID));
+	if (!pPages->pElems)
+		return E_OUTOFMEMORY;
+
+	pPages->pElems[0] = CLSID_CoreAACInfoProp;
+	pPages->pElems[1] = CLSID_CoreAACAboutProp;
+
+	return S_OK;
+}
+ 
+// ============================================================================
+// accept only aac audio wrapped in waveformat
+
+HRESULT CCoreAACDecoder::CheckInputType(const CMediaType *mtIn)
+{
+	if (*mtIn->Type() != MEDIATYPE_Audio || *mtIn->Subtype() != MEDIASUBTYPE_AAC)
+		return VFW_E_TYPE_NOT_ACCEPTED;
+
+	if (*mtIn->FormatType() != FORMAT_WaveFormatEx)
+		return VFW_E_TYPE_NOT_ACCEPTED;
+
+	WAVEFORMATEX *wfex = (WAVEFORMATEX *)mtIn->Format();
+	if (wfex->wFormatTag != WAVE_FORMAT_AAC)
+		return VFW_E_TYPE_NOT_ACCEPTED;
+
+	if(wfex->cbSize < 2)
+		return VFW_E_TYPE_NOT_ACCEPTED;
+
+	m_decoderSpecificLen = wfex->cbSize;
+	if(m_decoderSpecific)
+	{
+		delete m_decoderSpecific;
+		m_decoderSpecific = NULL;
+	}
+	m_decoderSpecific = new unsigned char[m_decoderSpecificLen];
+	
+	// Keep decoderSpecific initialization data (appended to the WAVEFORMATEX struct)
+	memcpy(m_decoderSpecific,(char*)wfex+sizeof(WAVEFORMATEX), m_decoderSpecificLen);
+	
+	return S_OK;
+}
+
+// ============================================================================
+// propose proper waveformat
+
+HRESULT CCoreAACDecoder::GetMediaType(int iPosition, CMediaType *mtOut)
+{
+	if (!m_pInput->IsConnected())
+	{
+		return E_UNEXPECTED;
+	}
+	
+	if (iPosition < 0)
+	{
+		return E_INVALIDARG;
+	}
+	
+	if (iPosition > 0)
+	{
+		return VFW_S_NO_MORE_ITEMS;
+	}
+	
+	// Some drivers don't like WAVEFORMATEXTENSIBLE when channels are <= 2 so
+	// we fall back to a classic WAVEFORMATEX struct in this case 
+	
+	WAVEFORMATEXTENSIBLE wfex;
+	ZeroMemory(&wfex, sizeof(WAVEFORMATEXTENSIBLE));
+	
+	wfex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
+	wfex.Format.wFormatTag = (m_Channels <= 2) ? WAVE_FORMAT_PCM : WAVE_FORMAT_EXTENSIBLE;
+	wfex.Format.cbSize = (m_Channels <= 2) ? 0 : sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
+	wfex.Format.nChannels = (unsigned short)m_Channels;
+	wfex.Format.nSamplesPerSec = (unsigned short)m_SamplesPerSec;
+	wfex.Format.wBitsPerSample = m_BitsPerSample;
+	wfex.Format.nBlockAlign = (unsigned short)((wfex.Format.nChannels * wfex.Format.wBitsPerSample) / 8);
+	wfex.Format.nAvgBytesPerSec = wfex.Format.nSamplesPerSec * wfex.Format.nBlockAlign;
+	switch(m_Channels)
+	{
+	case 1:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_MONO;		
+		break;
+	case 2:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_STEREO;
+		break;
+	case 3:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_STEREO | SPEAKER_FRONT_CENTER;
+		break;
+	case 4:
+		//wfex.dwChannelMask = KSAUDIO_SPEAKER_QUAD;
+		wfex.dwChannelMask = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER);
+		break;
+	case 5:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_QUAD | SPEAKER_FRONT_CENTER;
+		break;
+	case 6:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_5POINT1;
+		break;
+	default:
+		wfex.dwChannelMask = KSAUDIO_SPEAKER_DIRECTOUT; // XXX : or SPEAKER_ALL ??
+		break;
+	}
+	wfex.Samples.wValidBitsPerSample = wfex.Format.wBitsPerSample;	
+	
+	mtOut->SetType(&MEDIATYPE_Audio);
+	mtOut->SetSubtype(&MEDIASUBTYPE_PCM);
+	mtOut->SetFormatType(&FORMAT_WaveFormatEx);
+	mtOut->SetFormat( (BYTE*) &wfex, sizeof(WAVEFORMATEX)+wfex.Format.cbSize);
+	mtOut->SetTemporalCompression(FALSE);
+	
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACDecoder::CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut)
+{
+	if (*mtOut->Type() != MEDIATYPE_Audio	||
+		*mtOut->Subtype() != MEDIASUBTYPE_PCM ||
+		*mtOut->FormatType() != FORMAT_WaveFormatEx)
+	{
+		return VFW_E_TYPE_NOT_ACCEPTED;
+	}
+	
+	return S_OK; 
+}
+
+// ----------------------------------------------------------------------------
+
+// 960 for LD or else 1024 (expanded to 2048 for HE-AAC)
+#define MAXFRAMELEN 2048
+
+HRESULT CCoreAACDecoder::DecideBufferSize(IMemAllocator *pAllocator, ALLOCATOR_PROPERTIES *pProperties)
+{
+	pProperties->cBuffers = 8;
+	m_OutputBuffLen = m_Channels * MAXFRAMELEN * sizeof(short);
+	pProperties->cbBuffer = m_OutputBuffLen;
+	
+	NOTE1("CCoreAACDecoder::DecideBufferSize %d", pProperties->cbBuffer);
+
+	ALLOCATOR_PROPERTIES Actual;
+	HRESULT hr = pAllocator->SetProperties(pProperties, &Actual);
+	if(FAILED(hr))
+		return hr;
+
+	if (Actual.cbBuffer < pProperties->cbBuffer || Actual.cBuffers < pProperties->cBuffers)
+		return E_INVALIDARG;
+
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACDecoder::CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin)
+{
+	HRESULT hr = CTransformFilter::CompleteConnect(direction, pReceivePin);
+	
+	if(direction == PINDIR_INPUT)
+	{
+		if(m_decHandle)
+		{
+			faacDecClose(m_decHandle);
+			m_decHandle = NULL;
+		}
+		m_decHandle = faacDecOpen();
+
+        faacDecConfigurationPtr config;		
+        config = faacDecGetCurrentConfiguration(m_decHandle);
+		config->downMatrix = m_DownMatrix;
+        faacDecSetConfiguration(m_decHandle, config);
+
+		// Initialize the decoder
+		unsigned long SamplesPerSec = 0;
+		unsigned char Channels = 0;
+		if(faacDecInit2(m_decHandle, m_decoderSpecific, m_decoderSpecificLen,
+			&SamplesPerSec, &Channels) < 0)
+		{
+			return E_FAIL;
+		}
+		
+		if(m_DownMatrix)
+		{
+			Channels = 2; // TODO : check with mono
+		}
+
+		mp4AudioSpecificConfig info;
+		AudioSpecificConfig(m_decoderSpecific,m_decoderSpecificLen,&info);
+		
+		wsprintf(m_ProfileName,"%s%s",
+			ObjectTypesNameTable[info.objectTypeIndex],
+#if 0
+			info.sbr_present_flag ?
+#else
+			false ?
+#endif
+			"+SBR" :
+			""
+			);
+
+		m_Channels = Channels;
+		m_SamplesPerSec = SamplesPerSec;
+		m_BitsPerSample = 16; // we always decode to the default 16 bits (we could add 24,32,float)
+		
+		m_brCalcFrames = 0;
+		m_brBytesConsumed = 0;
+		m_DecodedFrames = 0;
+	}
+
+	return hr;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACDecoder::StartStreaming(void)
+{
+	m_brCalcFrames = 0;
+	m_brBytesConsumed = 0;
+	m_DecodedFrames = 0;
+	return CTransformFilter::StartStreaming();
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACDecoder::Transform(IMediaSample *pIn, IMediaSample *pOut)
+{
+	if (m_State == State_Stopped)
+	{	
+		pOut->SetActualDataLength(0);
+		return S_OK;
+	}
+
+	if(pIn->IsPreroll() == S_OK)
+	{
+		return S_FALSE;
+	}
+
+	// Decode the sample data
+	DWORD ActualDstLength;
+	BYTE *pSrc, *pDst;
+	DWORD SrcLength = pIn->GetActualDataLength();
+	DWORD DstLength = pOut->GetSize();
+	HRESULT hr;
+	hr = pIn->GetPointer(&pSrc);
+	if(hr != S_OK)
+		return hr;
+	hr = pOut->GetPointer(&pDst);
+	if(hr != S_OK)
+		return hr;
+	
+	if(!pSrc || !pDst || (DstLength < m_OutputBuffLen))
+		return S_FALSE;  
+
+	// Decode data
+	// (use our buffer calculated len, as the Waveout renderer seems to report wrongly a bigger size)	
+	if(!Decode(pSrc, SrcLength, pDst, m_OutputBuffLen, &ActualDstLength))
+		return S_FALSE;
+
+	NOTE3("Transform: %u->%u (%u)\n", SrcLength, ActualDstLength, m_OutputBuffLen);
+
+	// Copy the actual data length
+	pOut->SetActualDataLength(ActualDstLength);
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+// AAC order : C, L, R, L", R", LFE
+// DShow order : L, R, C, LFE, L", R"
+
+const int MAXCHANNELS = 6;
+const int chmap[MAXCHANNELS][MAXCHANNELS+1] = {
+	// first column tell us if we need to remap
+	{  0, },					// mono
+	{  0, },					// l, r
+	{  1, 1, 2, 0, },			// c ,l, r -> l, r, c
+	{  1, 1, 2, 0, 3, },		// c, l, r, bc -> l, r, c, bc
+	{  1, 1, 2, 0, 3, 4, },		// c, l, r, bl, br -> l, r, c, bl, br
+	{  1, 1, 2, 0, 5, 3, 4 }	// c, l, r, bl, br, lfe -> l, r, c, lfe, bl, br
+};
+
+// ----------------------------------------------------------------------------
+
+bool CCoreAACDecoder::Decode(BYTE *pSrc, DWORD SrcLength, BYTE *pDst, DWORD DstLength, DWORD *ActualDstLength)
+{
+	faacDecFrameInfo frameInfo;
+	short *outsamples = (short *)faacDecDecode(m_decHandle, &frameInfo, pSrc, DstLength);
+
+	if (frameInfo.error)
+	{
+		NOTE2("CCoreAACDecoder::Decode Error %d [%s]\n", 
+			frameInfo.error, faacDecGetErrorMessage(frameInfo.error));
+		return false;
+	}
+
+	m_brCalcFrames++;
+	m_DecodedFrames++;
+	m_brBytesConsumed += SrcLength;
+
+	if(m_brCalcFrames == 43)
+	{
+		m_Bitrate = (int)((m_brBytesConsumed * 8) / (m_DecodedFrames / 43.07));
+		m_brCalcFrames = 0;
+	}
+
+	if (!frameInfo.error && outsamples)
+	{
+		int channelidx = frameInfo.channels-1;
+		if(chmap[channelidx][0])
+		{
+			// dshow remapping
+			short *dstBuffer = (short*)pDst;
+			for(unsigned int i = 0;
+			    i < frameInfo.samples;
+				i += frameInfo.channels, outsamples += frameInfo.channels)
+			{
+				for(unsigned int j=1; j <= frameInfo.channels; j++)
+				{
+					*dstBuffer++ = outsamples[chmap[channelidx][j]];
+				}				
+			}
+		}
+		else
+		{
+			memcpy(pDst, outsamples, frameInfo.samples * sizeof(short));
+		}
+	}
+	else
+		return false;
+
+	*ActualDstLength = frameInfo.samples * sizeof(short);
+	return true;
+}
+
+// ============================================================================
+// ICoreAAC
+// ============================================================================
+
+STDMETHODIMP CCoreAACDecoder::get_ProfileName(char** name)
+{
+	CheckPointer(name,E_POINTER);
+	*name = m_ProfileName;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_SampleRate(int* sample_rate)
+{
+	CheckPointer(sample_rate,E_POINTER);
+	*sample_rate = m_SamplesPerSec;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_Channels(int *channels)
+{
+	CheckPointer(channels,E_POINTER);
+	*channels = m_Channels;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_BitsPerSample(int *bits_per_sample)
+{
+	CheckPointer(bits_per_sample,E_POINTER);
+	*bits_per_sample = m_BitsPerSample;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_Bitrate(int *bitrate)
+{
+	CheckPointer(bitrate,E_POINTER);
+	*bitrate = m_Bitrate;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_FramesDecoded(unsigned int *frames_decoded)
+{
+	CheckPointer(frames_decoded,E_POINTER);
+	*frames_decoded = m_DecodedFrames;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::get_DownMatrix(bool *down_matrix)
+{
+	CheckPointer(down_matrix,E_POINTER);
+	*down_matrix = m_DownMatrix;
+	return S_OK;
+}
+
+STDMETHODIMP CCoreAACDecoder::set_DownMatrix(bool down_matrix)
+{
+	m_DownMatrix = down_matrix;
+	return S_OK;
+}
+
+// ============================================================================
+
+
+
--- /dev/null
+++ b/CoreAAC/CoreAAC.def
@@ -1,0 +1,8 @@
+; This file provides declarations of the entrypoints in the DLL.
+
+LIBRARY CoreAAC.ax
+EXPORTS
+	DllGetClassObject   PRIVATE
+	DllCanUnloadNow     PRIVATE
+	DllRegisterServer   PRIVATE
+	DllUnregisterServer PRIVATE
--- /dev/null
+++ b/CoreAAC/CoreAAC.dsp
@@ -1,0 +1,322 @@
+# Microsoft Developer Studio Project File - Name="CoreAAC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=CoreAAC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "CoreAAC.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "CoreAAC.mak" CFG="CoreAAC - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "CoreAAC - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "CoreAAC - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "CoreAAC - Win32 Release Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "CoreAAC - Win32 Debug Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "CoreAAC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /Gz /MD /W3 /O2 /D DBG=0 /D WINVER=0x400 /D "INC_OLE2" /D "STRICT" /D "WIN32" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /YX"streams.h" /Oxs /GF /D_WIN32_WINNT=-0x0400 /c
+# SUBTRACT CPP /Fr
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "NDEBUG" /d "WIN32"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+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 /dll /machine:I386
+# ADD LINK32 strmbase.lib msvcrt.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /machine:I386 /nodefaultlib /def:".\CoreAAC.def" /out:".\Release\CoreAAC.ax" /subsystem:windows,4.0 /opt:ref /release /debug:none /OPT:NOREF /OPT:ICF /ignore:4089 /ignore:4078
+# Begin Custom Build
+TargetDir=.\Release
+TargetPath=.\Release\CoreAAC.ax
+InputPath=.\Release\CoreAAC.ax
+SOURCE="$(InputPath)"
+
+"$(TargetDir)\null.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	regsvr32.exe /s /c "$(TargetPath)" 
+	echo "pouette" > $(TargetDir)\null.txt 
+	
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /Gz /MDd /W3 /Zi /Od /Gy /D _WIN32_WINNT=0x0400 /D WINVER=0x0400 /D DBG=1 /D "DEBUG" /D "_DEBUG" /D "INC_OLE2" /D "STRICT" /D "WIN32" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /YX"streams.h" /Oid /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "_DEBUG" /d "WIN32"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+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 /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 strmbasd.lib msvcrtd.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /debug /machine:I386 /nodefaultlib /out:".\Debug\CoreAAC.ax" /debug:mapped,full /subsystem:windows,4.0 /ignore:4089 /ignore:4078
+# Begin Custom Build
+TargetDir=.\Debug
+TargetPath=.\Debug\CoreAAC.ax
+InputPath=.\Debug\CoreAAC.ax
+SOURCE="$(InputPath)"
+
+"$(TargetDir)\null.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	regsvr32.exe /s /c "$(TargetPath)" 
+	echo "pouette" > $(TargetDir)\null.txt 
+	
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Release Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_Unicode"
+# PROP Intermediate_Dir "Release_Unicode"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /Gy /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D DBG=0 /D WINVER=0x400 /D "INC_OLE2" /D "STRICT" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /D "WIN32" /D "UNICODE" /D "_UNICODE" /YX"streams.h" /Oxs /GF /D_WIN32_WINNT=-0x0400 /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "NDEBUG" /d "WIN32"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+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 /dll /machine:I386
+# ADD LINK32 ..\..\BaseClasses\release_unicode\strmbase.lib msvcrt.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /machine:I386 /nodefaultlib /out:".\Release_Unicode\CoreAAC.ax" /libpath:"..\..\..\..\lib" /subsystem:windows,4.0 /opt:ref /release /debug:none /OPT:NOREF /OPT:ICF /ignore:4089 /ignore:4078
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Debug Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_Unicode"
+# PROP Intermediate_Dir "Debug_Unicode"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /Gz /MDd /W4 /Zi /Od /Gy /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D _WIN32_WINNT=0x0400 /D WINVER=0x0400 /D DBG=1 /D "DEBUG" /D "_DEBUG" /D "INC_OLE2" /D "STRICT" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /D "WIN32" /D "UNICODE" /D "_UNICODE" /YX"streams.h" /Oid /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "_DEBUG" /d "WIN32"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+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 /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\BaseClasses\debug_unicode\strmbasd.lib msvcrtd.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /debug /machine:I386 /nodefaultlib /out:".\Debug_Unicode\CoreAAC.ax" /libpath:"..\..\..\..\lib" /debug:mapped,full /subsystem:windows,4.0 /ignore:4089 /ignore:4078
+
+!ENDIF 
+
+# Begin Target
+
+# Name "CoreAAC - Win32 Release"
+# Name "CoreAAC - Win32 Debug"
+# Name "CoreAAC - Win32 Release Unicode"
+# Name "CoreAAC - Win32 Debug Unicode"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\CoreAAC.cpp
+DEP_CPP_AACDE=\
+	"..\faad2\include\faad.h"\
+	".\CoreAAC.h"\
+	".\AACProfilesName.h"\
+	".\CoreAACAboutProp.h"\
+	".\CoreAACGUID.h"\
+	".\ICoreAAC.h"\
+	{$(INCLUDE)}"amextra.h"\
+	{$(INCLUDE)}"amfilter.h"\
+	{$(INCLUDE)}"audevcod.h"\
+	{$(INCLUDE)}"cache.h"\
+	{$(INCLUDE)}"combase.h"\
+	{$(INCLUDE)}"cprop.h"\
+	{$(INCLUDE)}"ctlutil.h"\
+	{$(INCLUDE)}"dllsetup.h"\
+	{$(INCLUDE)}"dsschedule.h"\
+	{$(INCLUDE)}"fourcc.h"\
+	{$(INCLUDE)}"ksmedia.h"\
+	{$(INCLUDE)}"measure.h"\
+	{$(INCLUDE)}"msgthrd.h"\
+	{$(INCLUDE)}"mtype.h"\
+	{$(INCLUDE)}"outputq.h"\
+	{$(INCLUDE)}"pstream.h"\
+	{$(INCLUDE)}"refclock.h"\
+	{$(INCLUDE)}"reftime.h"\
+	{$(INCLUDE)}"renbase.h"\
+	{$(INCLUDE)}"source.h"\
+	{$(INCLUDE)}"streams.h"\
+	{$(INCLUDE)}"strmctl.h"\
+	{$(INCLUDE)}"sysclock.h"\
+	{$(INCLUDE)}"transfrm.h"\
+	{$(INCLUDE)}"transip.h"\
+	{$(INCLUDE)}"videoctl.h"\
+	{$(INCLUDE)}"vtrans.h"\
+	{$(INCLUDE)}"winctrl.h"\
+	{$(INCLUDE)}"winutil.h"\
+	{$(INCLUDE)}"wxdebug.h"\
+	{$(INCLUDE)}"wxlist.h"\
+	{$(INCLUDE)}"wxutil.h"\
+	
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAAC.def
+
+!IF  "$(CFG)" == "CoreAAC - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Debug"
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Release Unicode"
+
+!ELSEIF  "$(CFG)" == "CoreAAC - Win32 Debug Unicode"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAACAboutProp.cpp
+DEP_CPP_COREA=\
+	"..\faad2\include\faad.h"\
+	".\CoreAACAboutProp.h"\
+	{$(INCLUDE)}"amextra.h"\
+	{$(INCLUDE)}"amfilter.h"\
+	{$(INCLUDE)}"audevcod.h"\
+	{$(INCLUDE)}"cache.h"\
+	{$(INCLUDE)}"combase.h"\
+	{$(INCLUDE)}"cprop.h"\
+	{$(INCLUDE)}"ctlutil.h"\
+	{$(INCLUDE)}"dllsetup.h"\
+	{$(INCLUDE)}"dsschedule.h"\
+	{$(INCLUDE)}"fourcc.h"\
+	{$(INCLUDE)}"measure.h"\
+	{$(INCLUDE)}"msgthrd.h"\
+	{$(INCLUDE)}"mtype.h"\
+	{$(INCLUDE)}"outputq.h"\
+	{$(INCLUDE)}"pstream.h"\
+	{$(INCLUDE)}"refclock.h"\
+	{$(INCLUDE)}"reftime.h"\
+	{$(INCLUDE)}"renbase.h"\
+	{$(INCLUDE)}"source.h"\
+	{$(INCLUDE)}"streams.h"\
+	{$(INCLUDE)}"strmctl.h"\
+	{$(INCLUDE)}"sysclock.h"\
+	{$(INCLUDE)}"transfrm.h"\
+	{$(INCLUDE)}"transip.h"\
+	{$(INCLUDE)}"videoctl.h"\
+	{$(INCLUDE)}"vtrans.h"\
+	{$(INCLUDE)}"winctrl.h"\
+	{$(INCLUDE)}"winutil.h"\
+	{$(INCLUDE)}"wxdebug.h"\
+	{$(INCLUDE)}"wxlist.h"\
+	{$(INCLUDE)}"wxutil.h"\
+	
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAACInfoProp.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\CoreAAC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AACProfilesName.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAACAboutProp.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAACGUID.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAACInfoProp.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ICoreAAC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# End Group
+# Begin Group "resource"
+
+# PROP Default_Filter ".rc"
+# Begin Source File
+
+SOURCE=.\resource\aac_logo_sm.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CoreAAC.rc
+# End Source File
+# End Group
+# End Target
+# End Project
--- /dev/null
+++ b/CoreAAC/CoreAAC.dsw
@@ -1,0 +1,44 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "CoreAAC"=.\CoreAAC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libfaad
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libfaad"=.\faad2\libfaad\libfaad.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
--- /dev/null
+++ b/CoreAAC/CoreAAC.h
@@ -1,0 +1,90 @@
+/* 
+ * CoreAAC - AAC DirectShow Decoder Filter
+ *
+ * Modification to decode AAC without ADTS and multichannel support
+ * christophe.paris@free.fr
+ *
+ * Under section 8 of the GNU General Public License, the copyright
+ * holders of CoreAAC explicitly forbid distribution in the following
+ * countries:
+ * - Japan
+ * - United States of America 
+ *
+ *
+ * AAC DirectShow Decoder Filter
+ * Copyright (C) 2003 Robert Cioch
+ *  
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "../faad2/include/faad.h"
+
+// ===========================================================================================
+
+class CCoreAACDecoder : public CTransformFilter,
+                 public ISpecifyPropertyPages,
+				 public ICoreAACDec
+{
+public :
+	DECLARE_IUNKNOWN
+	static CUnknown *WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
+	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);    
+
+	CCoreAACDecoder(LPUNKNOWN lpunk, HRESULT *phr);
+	virtual ~CCoreAACDecoder();
+
+	// ----- ISpecifyPropertyPages -----
+	STDMETHODIMP GetPages(CAUUID *pPages);
+ 
+	// ----- ITransformFilter -----
+	HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
+	HRESULT CheckInputType(const CMediaType *mtIn);
+	HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
+	HRESULT DecideBufferSize(IMemAllocator *pAllocator, ALLOCATOR_PROPERTIES *pprop);
+	HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
+	HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
+	HRESULT StartStreaming(void);
+	bool Decode(BYTE *pSrc, DWORD SrcLength, BYTE *pDst, DWORD DstLength, DWORD *ActualDstLength);
+
+	// ----- ICoreAACDec -----
+	STDMETHODIMP get_ProfileName(char** name);
+    STDMETHODIMP get_SampleRate(int* sample_rate);
+    STDMETHODIMP get_Channels(int *channels);
+	STDMETHODIMP get_BitsPerSample(int *bits_per_sample);
+	STDMETHODIMP get_Bitrate(int *bitrate);
+	STDMETHODIMP get_FramesDecoded(unsigned int *frames_decoded);
+	STDMETHODIMP get_DownMatrix(bool *down_matrix);
+	STDMETHODIMP set_DownMatrix(bool down_matrix);
+	
+private:
+	unsigned char* m_decoderSpecific;
+	int m_decoderSpecificLen;
+	faacDecHandle m_decHandle;
+	int m_Channels;
+	int m_SamplesPerSec;
+	int m_BitsPerSample;
+	bool m_DownMatrix;
+	char m_ProfileName[64];
+
+	unsigned int m_Bitrate;
+	unsigned int m_brCalcFrames;
+	unsigned int m_brBytesConsumed;
+	unsigned int m_DecodedFrames;
+
+	unsigned int m_OutputBuffLen;
+};
+
+// ===========================================================================================
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/CoreAAC.nsi
@@ -1,0 +1,78 @@
+; ---------------------------------------------------------------------------
+; CoreAAC install script for NSIS
+; ---------------------------------------------------------------------------
+
+!define NAME "CoreAAC Audio Decoder"
+!define OUTFILE "Redist\CoreAAC.exe"
+!define INPUT_PATH "Release\"
+!define FILTER_FILE1 "CoreAAC.ax"
+!define UNINST_NAME "CoreAAC-uninstall.exe"
+
+; ---------------------------------------------------------------------------
+; NOTE: this .NSI script is designed for NSIS v1.8+
+; ---------------------------------------------------------------------------
+
+Name "${NAME}"
+OutFile "${OUTFILE}"
+
+SetOverwrite ifnewer
+SetCompress auto ; (can be off or force)
+SetDatablockOptimize on ; (can be off)
+CRCCheck on ; (can be off)
+AutoCloseWindow false ; (can be true for the window go away automatically at end)
+ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
+SetDateSave off ; (can be on to have files restored to their orginal date)
+
+InstallColors /windows
+InstProgressFlags smooth
+
+; ---------------------------------------------------------------------------
+
+Function .onInit
+  MessageBox MB_YESNO "This will install ${NAME}. Do you wish to continue?" IDYES gogogo
+    Abort
+  gogogo:
+FunctionEnd
+
+; ---------------------------------------------------------------------------
+
+Section "" ; (default section)
+	SetOutPath "$SYSDIR"
+	; add files / whatever that need to be installed here.
+	File "${INPUT_PATH}${FILTER_FILE1}"
+
+	; write out uninstaller
+	WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME} (remove only)"
+	WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" '"$SYSDIR\${UNINST_NAME}"'
+	WriteUninstaller "$SYSDIR\${UNINST_NAME}"
+
+	RegDLL "$SYSDIR\${FILTER_FILE1}"
+SectionEnd ; end of default section
+
+; ---------------------------------------------------------------------------
+
+; begin uninstall settings/section
+UninstallText "This will uninstall ${NAME} from your system"
+
+Section Uninstall
+	UnRegDLL "$SYSDIR\${FILTER_FILE1}"
+	
+	; add delete commands to delete whatever files/registry keys/etc you installed here.
+	Delete /REBOOTOK "$SYSDIR\${FILTER_FILE1}"   
+	Delete "$SYSDIR\${UNINST_NAME}"
+   
+	DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"
+SectionEnd ; end of uninstall section
+
+; ---------------------------------------------------------------------------
+
+Function un.onUninstSuccess
+	IfRebootFlag 0 NoReboot
+		MessageBox MB_OK \ 
+			"A file couldn't be deleted. It will be deleted at next reboot."
+	NoReboot:
+FunctionEnd
+
+; ---------------------------------------------------------------------------
+; eof
+; ---------------------------------------------------------------------------
--- /dev/null
+++ b/CoreAAC/CoreAAC.rc
@@ -1,0 +1,213 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUT DIALOG DISCARDABLE  0, 0, 211, 144
+STYLE WS_CHILD
+FONT 8, "MS Sans Serif"
+BEGIN
+    GROUPBOX        "",IDC_STATIC,4,4,200,43,BS_CENTER
+    CTEXT           "Copyright � 2003 Robert Cioch",IDC_STATIC,10,73,187,8,
+                    SS_CENTERIMAGE
+    CTEXT           "FAAD2 v1.1 - Freeware Advanced Audio Decoder",
+                    IDC_STATIC_FAAD_VERSION,10,102,187,8,SS_CENTERIMAGE
+    CTEXT           "Copyright � 2002 Menno Bakker",IDC_STATIC,10,113,187,8,
+                    SS_CENTERIMAGE
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,10,96,187,1
+    CTEXT           "http://www.audiocoding.com",IDC_STATIC,10,124,187,8,
+                    SS_CENTERIMAGE
+    CTEXT           "http://www.borgtech.org",IDC_STATIC,10,83,187,8,
+                    SS_CENTERIMAGE
+    CTEXT           "AAC Decoder v1.1",IDC_STATIC,10,62,187,8,SS_CENTERIMAGE
+    CTEXT           "http://corecodec.org/projects/coreaac/",IDC_STATIC,10,
+                    34,187,8
+    CTEXT           "Version 1.0b - (May 21 2003, 17:05:09)",
+                    IDC_STATIC_VERSION,10,24,187,8
+    CTEXT           "CoreAAC : AAC DirectShow Filter Decoder",IDC_STATIC,10,
+                    13,187,8
+    GROUPBOX        " This software is based on : ",IDC_STATIC,4,52,200,85
+END
+
+IDD_DIALOG_INFO DIALOG DISCARDABLE  0, 0, 211, 144
+STYLE WS_CHILD
+FONT 8, "MS Sans Serif"
+BEGIN
+    GROUPBOX        "",IDC_STATIC,4,29,200,109,BS_CENTER
+    LTEXT           "Sample rate :",IDC_STATIC,84,52,42,8
+    LTEXT           "Channels :",IDC_STATIC,84,63,34,8
+    LTEXT           "Profile :",IDC_STATIC,84,41,41,8
+    LTEXT           "Bitrate :",IDC_STATIC,84,85,25,8
+    RTEXT           "AAC LC",IDC_LABEL_PROFILE,110,41,87,8
+    RTEXT           "48000 Hz",IDC_LABEL_SAMPLERATE,154,52,43,8
+    RTEXT           "2",IDC_LABEL_CHANNELS,154,63,43,8
+    RTEXT           "-",IDC_LABEL_BITRATE,154,85,43,8
+    LTEXT           "Bits per sample :",IDC_STATIC,84,74,52,8
+    RTEXT           "16",IDC_LABEL_BPS,154,74,43,8
+    LTEXT           "Frames decoded :",IDC_STATIC,84,96,58,8
+    RTEXT           "-",IDC_LABEL_FRAMES_DECODED,154,96,43,8
+    CONTROL         105,IDC_STATIC,"Static",SS_BITMAP | SS_SUNKEN,10,40,64,
+                    65
+    LTEXT           "The ""AAC"" logo is a trademark of Dolby Laboratories.",
+                    IDC_STATIC,10,125,168,8
+    CTEXT           "CoreAAC : AAC DirectShow Filter Decoder",IDC_STATIC,10,
+                    13,187,8
+    GROUPBOX        "",IDC_STATIC,4,4,200,23
+    CONTROL         "Downmix to 2 channels",IDC_CHECK_DOWNMIX,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,84,108,89,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    IDD_ABOUT, DIALOG
+    BEGIN
+        LEFTMARGIN, 4
+        VERTGUIDE, 10
+        VERTGUIDE, 197
+        VERTGUIDE, 204
+        TOPMARGIN, 4
+        BOTTOMMARGIN, 143
+    END
+
+    IDD_DIALOG_INFO, DIALOG
+    BEGIN
+        LEFTMARGIN, 4
+        VERTGUIDE, 84
+        VERTGUIDE, 154
+        VERTGUIDE, 197
+        TOPMARGIN, 4
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE MOVEABLE PURE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE MOVEABLE PURE 
+BEGIN
+    "#include ""windows.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE MOVEABLE PURE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,1,0,456
+ PRODUCTVERSION 1,1,0,456
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "Comments", "http://corecodec.org/projects/coreaac/\0"
+            VALUE "FileDescription", "CoreAAC\0"
+            VALUE "FileVersion", "1, 1, 0, 456\0"
+            VALUE "InternalName", "CoreAAC\0"
+            VALUE "LegalCopyright", "see the about box :p\0"
+            VALUE "OriginalFilename", "CoreAAC.ax\0"
+            VALUE "ProductVersion", "1, 1, 0, 456\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_BITMAP_AAC_LOGO     BITMAP  DISCARDABLE     "resource/aac_logo_sm.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE 
+BEGIN
+    IDS_ABOUT               "About"
+    IDS_INFO                "Info"
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
--- /dev/null
+++ b/CoreAAC/CoreAACAboutProp.cpp
@@ -1,0 +1,52 @@
+#include <stdio.h>
+#include <streams.h>
+#include "CoreAACAboutProp.h"
+#include "resource.h"
+
+#include "../faad2/include/faad.h"
+#define FILTER_VERSION "1.0b4"
+
+// ----------------------------------------------------------------------------
+
+CUnknown *WINAPI CCoreAACAboutProp::CreateInstance(LPUNKNOWN punk, HRESULT *phr)
+{
+	CCoreAACAboutProp *pNewObject = new CCoreAACAboutProp(punk, phr);
+	if (!pNewObject)
+		*phr = E_OUTOFMEMORY;
+	return pNewObject;
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACAboutProp::CCoreAACAboutProp(LPUNKNOWN pUnk, HRESULT *phr) :
+	CBasePropertyPage(NAME("About"), pUnk, IDD_ABOUT, IDS_ABOUT)
+{
+		
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACAboutProp::~CCoreAACAboutProp()
+{
+	
+}	
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACAboutProp::OnActivate()
+{		
+	SetDlgItemText(m_hwnd, IDC_STATIC_VERSION, 
+		"Version " FILTER_VERSION " - ("__DATE__", "__TIME__")");
+	SetDlgItemText(m_hwnd, IDC_STATIC_FAAD_VERSION, 
+		"FAAD2 " FAAD2_VERSION " - Freeware Advanced Audio Decoder");
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+BOOL CCoreAACAboutProp::OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+	return CBasePropertyPage::OnReceiveMessage(hwnd, uMsg, wParam, lParam);		
+}
+
+// ----------------------------------------------------------------------------
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/CoreAACAboutProp.h
@@ -1,0 +1,15 @@
+#if !defined(AFX_COREAACABOUTPROP_H__D1E17C99_2135_46E3_A2D6_7A9845F1A296__INCLUDED_)
+#define AFX_COREAACABOUTPROP_H__D1E17C99_2135_46E3_A2D6_7A9845F1A296__INCLUDED_
+
+class CCoreAACAboutProp : public CBasePropertyPage
+{
+public:
+	static CUnknown *WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);	
+	CCoreAACAboutProp(LPUNKNOWN pUnk, HRESULT *phr);
+	virtual ~CCoreAACAboutProp();
+	HRESULT OnActivate();	
+	BOOL OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+};
+
+
+#endif // !defined(AFX_COREAACABOUTPROP_H__D1E17C99_2135_46E3_A2D6_7A9845F1A296__INCLUDED_)
--- /dev/null
+++ b/CoreAAC/CoreAACGUID.h
@@ -1,0 +1,28 @@
+//-----------------------------------------------------------------------------
+#ifndef _COREAAC_H_
+#define _COREAAC_H_
+// ----------------------------------------------------------------------------
+
+// {6AC7C19E-8CA0-4e3d-9A9F-2881DE29E0AC}
+DEFINE_GUID(CLSID_DECODER,
+			0x6ac7c19e, 0x8ca0, 0x4e3d, 0x9a, 0x9f, 0x28, 0x81, 0xde, 0x29, 0xe0, 0xac);
+
+// Be compatible with 3ivx
+#define WAVE_FORMAT_AAC 0x00FF
+//#define WAVE_FORMAT_AAC 0xAAC0
+
+// {000000FF-0000-0010-8000-00AA00389B71}
+DEFINE_GUID(MEDIASUBTYPE_AAC,
+			WAVE_FORMAT_AAC, 0x000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
+
+// {4665E44B-8B9A-4515-A086-E94ECE374608}
+DEFINE_GUID(CLSID_CoreAACAboutProp,
+			0x4665e44b, 0x8b9a, 0x4515, 0xa0, 0x86, 0xe9, 0x4e, 0xce, 0x37, 0x46, 0x8);
+
+// {BBFC1A2A-D3A2-4610-847D-26592022F86E}
+DEFINE_GUID(CLSID_CoreAACInfoProp, 
+			0xbbfc1a2a, 0xd3a2, 0x4610, 0x84, 0x7d, 0x26, 0x59, 0x20, 0x22, 0xf8, 0x6e);
+
+// ----------------------------------------------------------------------------
+#endif // _COREAAC_H_
+// ----------------------------------------------------------------------------
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/CoreAACInfoProp.cpp
@@ -1,0 +1,183 @@
+#include <stdio.h>
+#include <streams.h>
+#include "ICoreAAC.h"
+#include "CoreAACInfoProp.h"
+#include "resource.h"
+
+// ----------------------------------------------------------------------------
+
+CUnknown *WINAPI CCoreAACInfoProp::CreateInstance(LPUNKNOWN punk, HRESULT *phr)
+{
+	CCoreAACInfoProp *pNewObject = new CCoreAACInfoProp(punk, phr);
+	if (!pNewObject)
+		*phr = E_OUTOFMEMORY;
+	return pNewObject;
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACInfoProp::CCoreAACInfoProp(LPUNKNOWN pUnk, HRESULT *phr) :
+	CBasePropertyPage(NAME("Info"), pUnk, IDD_DIALOG_INFO, IDS_INFO),
+	m_pICoreAACDec(NULL),
+	m_fWindowInActive(TRUE)
+{
+	
+}
+
+// ----------------------------------------------------------------------------
+
+CCoreAACInfoProp::~CCoreAACInfoProp()
+{
+	
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACInfoProp::OnConnect(IUnknown *pUnknown)
+{
+	if (pUnknown == NULL)
+	{
+		return E_POINTER;
+	}
+	
+	ASSERT(m_pICoreAACDec == NULL);
+
+	// Ask the filter for it's control interface		
+	HRESULT hr = pUnknown->QueryInterface(IID_ICoreAACDec,reinterpret_cast<void**>(&m_pICoreAACDec));
+	if(FAILED(hr))
+	{
+		return hr;
+	}
+	
+	ASSERT(m_pICoreAACDec);
+
+	m_pICoreAACDec->get_DownMatrix(&m_DownMatrix);
+
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACInfoProp::OnDisconnect()
+{
+	// Release the interface
+	if (m_pICoreAACDec == NULL) {
+		return E_UNEXPECTED;
+	}
+	m_pICoreAACDec->Release();
+	m_pICoreAACDec = NULL;
+	return NOERROR;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACInfoProp::OnActivate()
+{		
+	char msgFormat[255];
+	m_fWindowInActive = FALSE;
+	
+	char* profileName = NULL;
+	m_pICoreAACDec->get_ProfileName(&profileName);
+	SetDlgItemText(m_hwnd, IDC_LABEL_PROFILE, profileName);
+	
+	int sampleRate = 0;
+	m_pICoreAACDec->get_SampleRate(&sampleRate);
+	wsprintf(msgFormat, "%d Hz", sampleRate);
+	SetDlgItemText(m_hwnd, IDC_LABEL_SAMPLERATE, msgFormat);
+	
+	int channels = 0;
+	m_pICoreAACDec->get_Channels(&channels);
+	wsprintf(msgFormat, "%d", channels);
+	SetDlgItemText(m_hwnd, IDC_LABEL_CHANNELS, msgFormat);
+	
+	int bps = 0;
+	m_pICoreAACDec->get_BitsPerSample(&bps);
+	wsprintf(msgFormat, "%d", bps);
+	SetDlgItemText(m_hwnd, IDC_LABEL_BPS, msgFormat);
+	
+	CheckDlgButton(m_hwnd,IDC_CHECK_DOWNMIX, m_DownMatrix ? BST_CHECKED : BST_UNCHECKED);
+
+	RefreshDisplay(m_hwnd);
+	SetTimer(m_hwnd,0,1000,NULL);
+	
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACInfoProp::OnDeactivate()
+{
+	KillTimer(m_hwnd,0);
+	m_fWindowInActive = TRUE;
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+HRESULT CCoreAACInfoProp::OnApplyChanges(void)
+{
+	m_pICoreAACDec->set_DownMatrix(m_DownMatrix);
+	return S_OK;
+}
+
+// ----------------------------------------------------------------------------
+
+BOOL CCoreAACInfoProp::OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+	if(m_fWindowInActive)
+		return FALSE;
+	
+	switch(uMsg)
+	{
+	case WM_COMMAND:
+		switch (LOWORD(wParam))
+		{
+		case IDC_CHECK_DOWNMIX:
+			m_DownMatrix = (IsDlgButtonChecked(hwnd,IDC_CHECK_DOWNMIX) == BST_CHECKED) ? true : false;
+			SetDirty();
+			break;
+		}
+		break;
+		
+		case WM_TIMER:
+			RefreshDisplay(hwnd);
+			return (LRESULT) 1;
+	}
+	
+	return CBasePropertyPage::OnReceiveMessage(hwnd, uMsg, wParam, lParam);			
+}
+
+// ----------------------------------------------------------------------------
+
+void CCoreAACInfoProp::RefreshDisplay(HWND hwnd)
+{
+	static char msgFormat[16];
+	
+	int bitrate = 0;		
+	m_pICoreAACDec->get_Bitrate(&bitrate);
+	if(bitrate)
+		wsprintf(msgFormat, "%d kbps", bitrate/1000);
+	else
+		wsprintf(msgFormat, "-");
+	SetDlgItemText(hwnd, IDC_LABEL_BITRATE, msgFormat);
+	
+	unsigned int frames_decoded = 0;
+	m_pICoreAACDec->get_FramesDecoded(&frames_decoded);
+	if(frames_decoded)
+		wsprintf(msgFormat, "%d", frames_decoded);
+	else
+		wsprintf(msgFormat, "-");		
+	SetDlgItemText(hwnd, IDC_LABEL_FRAMES_DECODED, msgFormat);
+	
+}
+
+// ----------------------------------------------------------------------------
+
+void CCoreAACInfoProp::SetDirty()
+{
+    m_bDirty = TRUE;
+    if (m_pPageSite)
+        m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY);
+}
+
+// ----------------------------------------------------------------------------
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/CoreAACInfoProp.h
@@ -1,0 +1,26 @@
+#if !defined(AFX_COREAACINFOPROP_H__2722D950_7796_4061_B127_B78F1B28B908__INCLUDED_)
+#define AFX_COREAACINFOPROP_H__2722D950_7796_4061_B127_B78F1B28B908__INCLUDED_
+
+class CCoreAACInfoProp : public CBasePropertyPage
+{
+public:
+	static CUnknown *WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);	
+	CCoreAACInfoProp(LPUNKNOWN pUnk, HRESULT *phr);	
+	virtual ~CCoreAACInfoProp();
+	HRESULT OnConnect(IUnknown *pUnknown);
+	HRESULT OnDisconnect();
+	HRESULT OnActivate();	
+	HRESULT OnDeactivate();
+	BOOL OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+	HRESULT OnApplyChanges();
+	void SetDirty();
+
+private:
+	void CCoreAACInfoProp::RefreshDisplay(HWND hwnd);
+
+	ICoreAACDec* m_pICoreAACDec;
+	bool     m_DownMatrix;
+	BOOL     m_fWindowInActive;          // TRUE ==> dialog is being destroyed
+};
+
+#endif // !defined(AFX_COREAACINFOPROP_H__2722D950_7796_4061_B127_B78F1B28B908__INCLUDED_)
--- /dev/null
+++ b/CoreAAC/ICoreAAC.h
@@ -1,0 +1,33 @@
+#ifndef _ICoreAAC_H_
+#define _ICoreAAC_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+	
+// ICoreAACDec GUID
+// {231E221B-AA58-4a83-A209-06C3526E7EE4}
+DEFINE_GUID(IID_ICoreAACDec, 
+	0x231e221b, 0xaa58, 0x4a83, 0xa2, 0x9, 0x6, 0xc3, 0x52, 0x6e, 0x7e, 0xe4);
+	
+//
+// ICoreAACDec
+//
+DECLARE_INTERFACE_(ICoreAACDec, IUnknown)
+{
+	STDMETHOD(get_ProfileName)(THIS_ char** name) PURE;
+	STDMETHOD(get_SampleRate)(THIS_ int* sample_rate) PURE;
+	STDMETHOD(get_Channels)(THIS_ int *channels) PURE;
+	STDMETHOD(get_BitsPerSample)(THIS_ int *bits_per_sample) PURE;
+	STDMETHOD(get_Bitrate)(THIS_ int *bitrate) PURE;
+	STDMETHOD(get_FramesDecoded)(THIS_ unsigned int *frames_decoded) PURE;
+	STDMETHOD(get_DownMatrix)(THIS_ bool *down_matrix) PURE;
+	STDMETHOD(set_DownMatrix)(THIS_ bool down_matrix) PURE;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ICoreAAC_H_
\ No newline at end of file
--- /dev/null
+++ b/CoreAAC/INSTALL
@@ -1,0 +1,57 @@
+CoreAAC build instructions
+==========================
+
+
+Requirements :
+--------------
+
+Visual C++ 6 (or later but there is no project file up to date)
+DX SDK9 (probably compile with DX SDK8 also)
+faad2 module in the FAAC CVS (http://sourceforge.net/projects/faac/)
+
+
+How to compile the filter :
+---------------------------
+
+First you need to compile the DirectShow BaseClasses available in the
+SDK ($DXSDK\Samples\C++\DirectShow\BaseClasses).
+
+Make sure you have the path to the include files and to the library in
+your Visual C++ options (they must be at the top of the list).
+- Include :
+$DXSDK\Include
+$DXSDK\Samples\C++\DirectShow\BaseClasses\
+- Library :
+$DXSDK\Lib
+$DXSDK\Samples\C++\DirectShow\BaseClasses\Debug
+$DXSDK\Samples\C++\DirectShow\BaseClasses\Release
+
+The faad2 directory must be at the same level as the CoreAAC directory.
+
+Now you can open the project workspace CoreAAC.dsw and compile the filter.
+
+
+Registering the filter :
+------------------------
+
+The filter is automatically registered with the project file provided.
+If you want to register/unregister the filter manually you can use the
+following commands :
+To register : regsvr32 CoreAAC.ax
+To unregister : regsvr32 /u CoreAAC.ax
+
+Also some .bat files are provided :
+register_release.bat
+unregister_release.bat
+register_debug.bat
+unregister_debug.bat
+
+
+Installer
+---------
+
+To create the installer you need to install NSIS
+(http://nsis.sourceforge.net/)
+
+Just right click on the file CoreAAC.nsi and select "Compile NSI".
+The file Redist\CoreAAC.exe should be created.
--- a/CoreAAC/aacdec.cpp
+++ /dev/null
@@ -1,449 +1,0 @@
-/* 
- * CoreAAC - AAC DirectShow Decoder Filter
- *
- * Modification to decode AAC without ADTS and multichannel support
- * christophe.paris@free.fr
- */
- 
-/*
- * AAC DirectShow Decoder Filter
- * Copyright (C) 2003 Robert Cioch
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
- 
-
-#include <windows.h>
-#include <streams.h>
-#include <initguid.h>
-#include <olectl.h>
-#include <dvdmedia.h>
-#include <transfrm.h>
-
-#include <mmreg.h>
-#include <ks.h>
-#include <ksmedia.h>
-
-#include "aacdec.h"
-
-// ===========================================================================================
-#include <stdio.h>
-
-#if defined(_DEBUG)
-	void DBGOUT(char *s, ...)
-	{
-		char b[1024];
-		va_list args;
-
-		va_start(args, s);
-		vsprintf(b, s, args);
-		va_end(args);
-		OutputDebugString(b);
-	}
-#else
-	#define DBGOUT
-#endif
-
-// ===========================================================================================
-/*
-// As for today there is no Dolby's AAC waveformat tag registered at Microsoft
-// I have choosen 0xAAC0 because it looks nice, but when Dolby registers this format
-// then we may get in trouble since on 99.9% it will _NOT_ be 0xAAC0
-
-#define WAVE_FORMAT_AAC 0xAAC0
-
-// {0000aac0-0000-0010-8000-00AA00389B71}
-DEFINE_GUID(MEDIASUBTYPE_AAC,
-	WAVE_FORMAT_AAC, 0x000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
-*/
-
-// Be compatible with 3ivx
-#define WAVE_FORMAT_AAC 0x00FF
-
-// {000000FF-0000-0010-8000-00AA00389B71}
-DEFINE_GUID(MEDIASUBTYPE_AAC,
-	WAVE_FORMAT_AAC, 0x000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
-	
-
-// ===========================================================================================
-//  Registration setup stuff
-
-AMOVIESETUP_MEDIATYPE sudInputType[] =
-{
-	{ &MEDIATYPE_Audio, &MEDIASUBTYPE_AAC }
-};
-
-AMOVIESETUP_MEDIATYPE sudOutputType[] =
-{
-	{ &MEDIATYPE_Audio, &MEDIASUBTYPE_PCM }
-};
-
-AMOVIESETUP_PIN sudPins[] =
-{
-	{ L"Input",
-		FALSE,							// bRendered
-		FALSE,							// bOutput
-		FALSE,							// bZero
-		FALSE,							// bMany
-		&CLSID_NULL,					// clsConnectsToFilter
-		NULL,							// ConnectsToPin
-		NUMELMS(sudInputType),			// Number of media types
-		sudInputType
-	},
-	{ L"Output",
-		FALSE,							// bRendered
-		TRUE,							// bOutput
-		FALSE,							// bZero
-		FALSE,							// bMany
-		&CLSID_NULL,					// clsConnectsToFilter
-		NULL,							// ConnectsToPin
-		NUMELMS(sudOutputType),			// Number of media types
-		sudOutputType
-	}
-};
-
-AMOVIESETUP_FILTER sudDecoder =
-{
-	&CLSID_DECODER,
-	L"CoreAAC Audio Decoder",
-	MERIT_PREFERRED,
-	NUMELMS(sudPins),
-	sudPins
-};
-
-// ===========================================================================================
-// COM Global table of objects in this dll
-
-CFactoryTemplate g_Templates[] = 
-{
-  { L"CoreAAC Audio Decoder", &CLSID_DECODER, CDecoder::CreateInstance, NULL, &sudDecoder },
-  { L"CoreAAC Audio Decoder About", &CLSID_ABOUT, CAbout::CreateInstance}
-};
-
-// Count of objects listed in g_cTemplates
-int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
-
-// ===========================================================================================
-
-STDAPI DllRegisterServer()
-{
-	DBGOUT("RegisterServer\n");
-	return AMovieDllRegisterServer2(TRUE);
-}
-
-// -------------------------------------------------------------------------------------------
-
-STDAPI DllUnregisterServer()
-{
-	DBGOUT("UnregisterServer\n");
-	return AMovieDllRegisterServer2(FALSE);
-}
-
-// -------------------------------------------------------------------------------------------
-
-// The streams.h DLL entrypoint.
-extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
-
-// The entrypoint required by the MSVC runtimes. This is used instead
-// of DllEntryPoint directly to ensure global C++ classes get initialised.
-BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) {
-	
-    return DllEntryPoint(reinterpret_cast<HINSTANCE>(hDllHandle), dwReason, lpreserved);
-}
-
-// -------------------------------------------------------------------------------------------
-
-CUnknown *WINAPI CDecoder :: CreateInstance(LPUNKNOWN punk, HRESULT *phr)
-{
-	DBGOUT("CreateInstance\n");
-	CDecoder *pNewObject = new CDecoder(punk, phr);
-	if (!pNewObject)
-		*phr = E_OUTOFMEMORY;
-	return pNewObject;
-}
-
-// -------------------------------------------------------------------------------------------
-
-CDecoder :: ~CDecoder()
-{
-	if(m_decHandle)
-	{
-		faacDecClose(m_decHandle);
-		m_decHandle = NULL;
-	}
-	if(m_decoderSpecific)
-	{
-		delete m_decoderSpecific;
-		m_decoderSpecific = NULL;
-	}
-}
-
-// -------------------------------------------------------------------------------------------
-
-STDMETHODIMP CDecoder :: NonDelegatingQueryInterface(REFIID riid, void **ppv)
-{
-	if (riid == IID_ISpecifyPropertyPages)
-		return GetInterface((ISpecifyPropertyPages *)this, ppv);
-
-	return CTransformFilter::NonDelegatingQueryInterface(riid, ppv);
-}
-
-// -------------------------------------------------------------------------------------------
-// property pages
-
-STDMETHODIMP CDecoder :: GetPages(CAUUID *pPages)
-{
-	DBGOUT("GetPages\n");
-
-	pPages->cElems = 1;
-	pPages->pElems = (GUID *)CoTaskMemAlloc(pPages->cElems * sizeof(GUID));
-	if (!pPages->pElems)
-		return E_OUTOFMEMORY;
-
-	pPages->pElems[0] = CLSID_ABOUT;
-
-	return S_OK;
-}
- 
-// -------------------------------------------------------------------------------------------
-
-STDMETHODIMP CDecoder :: FreePages(CAUUID *pPages)
-{
-	DBGOUT("FreePages\n");
-
-	CoTaskMemFree(pPages->pElems);
-	return S_OK;
-}
-
-// ===========================================================================================
-// accept only aac audio wrapped in waveformat
-
-HRESULT CDecoder :: CheckInputType(const CMediaType *mtIn)
-{
-	DBGOUT("CheckInputType\n");
-
-	if (*mtIn->Type() != MEDIATYPE_Audio || *mtIn->Subtype() != MEDIASUBTYPE_AAC)
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	if (*mtIn->FormatType() != FORMAT_WaveFormatEx)
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	if (mtIn->IsTemporalCompressed())
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	WAVEFORMATEX *wfex = (WAVEFORMATEX *)mtIn->Format();
-	if (wfex->wFormatTag != WAVE_FORMAT_AAC)
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	if(wfex->cbSize < 2)
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	m_decoderSpecificLen = wfex->cbSize;
-	if(m_decoderSpecific)
-	{
-		delete m_decoderSpecific;
-		m_decoderSpecific = NULL;
-	}
-	m_decoderSpecific = new unsigned char[m_decoderSpecificLen];
-	
-	// Keep decoderSpecific initialization data (appended to the WAVEFORMATEX struct)
-	memcpy(m_decoderSpecific,(char*)wfex+sizeof(WAVEFORMATEX), m_decoderSpecificLen);
-	
-	return S_OK;
-}
-
-// ===========================================================================================
-// propose proper waveformat
-
-HRESULT CDecoder :: GetMediaType(int iPosition, CMediaType *mtOut)
-{
-	DBGOUT("GetMediaType\n");
-
-	if (!m_pInput->IsConnected())
-		return E_UNEXPECTED;
-
-	if (iPosition < 0)
-		return E_INVALIDARG;
-
-	if (iPosition > 0)
-		return VFW_S_NO_MORE_ITEMS;
-
-
-	WAVEFORMATEXTENSIBLE wfex;
-	ZeroMemory(&wfex, sizeof(WAVEFORMATEXTENSIBLE));
-	
-	wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
-	wfex.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE);
-	wfex.Format.nChannels = (unsigned short)m_Channels;
-	wfex.Format.nSamplesPerSec = (unsigned short)m_SamplesPerSec;
-	wfex.Format.wBitsPerSample = (unsigned short)m_BitesPerSample;
-	wfex.Format.nBlockAlign = (unsigned short)((wfex.Format.nChannels * wfex.Format.wBitsPerSample) / 8);
-	wfex.Format.nAvgBytesPerSec = wfex.Format.nSamplesPerSec * wfex.Format.nBlockAlign;
-	switch(m_Channels)
-	{
-	case 1:
-		wfex.dwChannelMask = KSAUDIO_SPEAKER_MONO;		
-		break;
-	case 2:
-		wfex.dwChannelMask = KSAUDIO_SPEAKER_STEREO;
-		break;
-	case 6:
-		wfex.dwChannelMask = KSAUDIO_SPEAKER_5POINT1;
-		break;
-	default:
-		break;
-	}
-	wfex.Samples.wValidBitsPerSample = wfex.Format.wBitsPerSample;	
-	wfex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
-	
-	mtOut->SetType(&MEDIATYPE_Audio);
-	mtOut->SetSubtype(&MEDIASUBTYPE_PCM);
-	mtOut->SetFormatType(&FORMAT_WaveFormatEx);
-	mtOut->SetFormat( (BYTE*) &wfex,sizeof(WAVEFORMATEXTENSIBLE));
-	mtOut->SetTemporalCompression(FALSE);
-	
-	return S_OK; 
-}
-
-// -------------------------------------------------------------------------------------------
-
-HRESULT CDecoder :: CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut)
-{
-	DBGOUT("CheckTransform\n");
-
-	if (*mtOut->FormatType() != FORMAT_WaveFormatEx)
-		return VFW_E_INVALIDMEDIATYPE;
-
-	if (mtOut->FormatLength() < sizeof(WAVEFORMATEX))
-		return VFW_E_INVALIDMEDIATYPE;
-
-	if (((WAVEFORMATEX *)mtIn->Format())->nSamplesPerSec != ((WAVEFORMATEX *)mtOut->Format())->nSamplesPerSec)
-		return VFW_E_TYPE_NOT_ACCEPTED;
-
-	// should we compare whole waveformat here???
-	return S_OK; 
-}
-
-// -------------------------------------------------------------------------------------------
-#define MAXFRAMELEN 1024		// 960 for LD or else 1024 
-
-HRESULT CDecoder :: DecideBufferSize(IMemAllocator *pAllocator, ALLOCATOR_PROPERTIES *pProperties)
-{
-	DBGOUT("DecideBufferSize\n");
-	pProperties->cBuffers = 1;
-	pProperties->cbBuffer = m_Channels * MAXFRAMELEN * 2;
-	
-	DBGOUT("CDecoder::DecideBufferSize %d", pProperties->cbBuffer);
-
-	ALLOCATOR_PROPERTIES Actual;
-	HRESULT hr = pAllocator->SetProperties(pProperties, &Actual);
-	if(FAILED(hr))
-		return hr;
-
-	if (Actual.cbBuffer < pProperties->cbBuffer || Actual.cBuffers < pProperties->cBuffers)
-		return E_INVALIDARG;
-
-	return S_OK;
-}
-
-// -------------------------------------------------------------------------------------------
-
-HRESULT CDecoder :: CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin)
-{
-	DBGOUT("CompleteConnect\n");	
-	HRESULT hr = CTransformFilter::CompleteConnect(direction, pReceivePin);
-	
-	if(direction == PINDIR_INPUT)
-	{
-		if(m_decHandle)
-		{
-			faacDecClose(m_decHandle);
-			m_decHandle = NULL;
-		}
-		m_decHandle = faacDecOpen();
-
-		// Initialize the decoder
-		unsigned long SamplesPerSec = 0;
-		unsigned char Channels = 0;
-		if(faacDecInit2(m_decHandle, m_decoderSpecific, m_decoderSpecificLen,
-			&SamplesPerSec, &Channels) < 0)
-		{
-			return E_FAIL;
-		}
-
-		// WAVEFORMATEX used for output mediatype
-		m_Channels = Channels;
-		m_SamplesPerSec = SamplesPerSec;
-		m_BitesPerSample = 16; // XXX : can it be different ???
-	}
-
-	return hr;
-}
-
-// -------------------------------------------------------------------------------------------
-
-HRESULT CDecoder :: Transform(IMediaSample *pIn, IMediaSample *pOut)
-{
-	DBGOUT("Transform\n");
-
-	if (m_State == State_Stopped)
-	{	
-		pOut->SetActualDataLength(0);
-		return S_OK;
-	}
-
-	// Decode the sample data
-	DWORD ActualDstLength;
-	BYTE *pSrc, *pDst;
-	DWORD SrcLength = pIn->GetActualDataLength();
-	DWORD DstLength = pOut->GetSize();
-	pIn->GetPointer(&pSrc);
-	pOut->GetPointer(&pDst);    	
-
-	// Decode data
-	if(!Decode(pSrc, SrcLength, pDst, DstLength, &ActualDstLength))
-		return S_FALSE;
-
-	DBGOUT("Transform: %u->%u (%u)\n", SrcLength, ActualDstLength, DstLength);
-
-	// Copy the actual data length
-	pOut->SetActualDataLength(ActualDstLength);
-	return S_OK;
-}
-
-// ===========================================================================================
-
-bool CDecoder :: Decode(BYTE *pSrc, DWORD SrcLength, BYTE *pDst, DWORD DstLength, DWORD *ActualDstLength)
-{
-	faacDecFrameInfo frameInfo;
-	short *outsamples = (short *)faacDecDecode(m_decHandle, &frameInfo, pSrc, DstLength);
-
-	if (frameInfo.error)
-	{
-		DBGOUT("AAC: Error %d [%s]\n", frameInfo.error, faacDecGetErrorMessage(frameInfo.error));
-		return false;
-	}
-
-	if (!frameInfo.error && outsamples)
-		memcpy(pDst, outsamples, frameInfo.samples * 2);
-	else
-		return false;
-
-	*ActualDstLength = frameInfo.samples * 2;
-	return true;
-}
-
-// ===========================================================================================
--- a/CoreAAC/aacdec.def
+++ /dev/null
@@ -1,8 +1,0 @@
-; This file provides declarations of the entrypoints in the DLL.
-
-LIBRARY CoreAAC.ax
-EXPORTS
-	DllGetClassObject   PRIVATE
-	DllCanUnloadNow     PRIVATE
-	DllRegisterServer   PRIVATE
-	DllUnregisterServer PRIVATE
--- a/CoreAAC/aacdec.dsp
+++ /dev/null
@@ -1,255 +1,0 @@
-# Microsoft Developer Studio Project File - Name="aacdec" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=aacdec - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "aacdec.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "aacdec.mak" CFG="aacdec - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "aacdec - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "aacdec - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "aacdec - Win32 Release Unicode" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "aacdec - Win32 Debug Unicode" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "aacdec - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /Gz /MD /W3 /O2 /D DBG=0 /D WINVER=0x400 /D "INC_OLE2" /D "STRICT" /D "WIN32" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /YX"streams.h" /Oxs /GF /D_WIN32_WINNT=-0x0400 /c
-# SUBTRACT CPP /Fr
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "NDEBUG" /d "WIN32"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-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 /dll /machine:I386
-# ADD LINK32 strmbase.lib msvcrt.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /machine:I386 /nodefaultlib /def:".\aacdec.def" /out:".\Release\CoreAAC.ax" /subsystem:windows,4.0 /opt:ref /release /debug:none /OPT:NOREF /OPT:ICF /ignore:4089 /ignore:4078
-# Begin Custom Build
-TargetDir=.\Release
-TargetPath=.\Release\CoreAAC.ax
-InputPath=.\Release\CoreAAC.ax
-SOURCE="$(InputPath)"
-
-"$(TargetDir)\null.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	regsvr32.exe /s /c "$(TargetPath)" 
-	echo "pouette" > $(TargetDir)\null.txt 
-	
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /Gz /MDd /W3 /Zi /Od /Gy /D _WIN32_WINNT=0x0400 /D WINVER=0x0400 /D DBG=1 /D "DEBUG" /D "_DEBUG" /D "INC_OLE2" /D "STRICT" /D "WIN32" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /YX"streams.h" /Oid /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "_DEBUG" /d "WIN32"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-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 /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 strmbasd.lib msvcrtd.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /debug /machine:I386 /nodefaultlib /out:".\Debug\CoreAAC.ax" /debug:mapped,full /subsystem:windows,4.0 /ignore:4089 /ignore:4078
-# Begin Custom Build
-TargetDir=.\Debug
-TargetPath=.\Debug\CoreAAC.ax
-InputPath=.\Debug\CoreAAC.ax
-SOURCE="$(InputPath)"
-
-"$(TargetDir)\null.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	regsvr32.exe /s /c "$(TargetPath)" 
-	echo "pouette" > $(TargetDir)\null.txt 
-	
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Release Unicode"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_Unicode"
-# PROP Intermediate_Dir "Release_Unicode"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /Gz /MD /W4 /Gy /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D DBG=0 /D WINVER=0x400 /D "INC_OLE2" /D "STRICT" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /D "WIN32" /D "UNICODE" /D "_UNICODE" /YX"streams.h" /Oxs /GF /D_WIN32_WINNT=-0x0400 /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "NDEBUG" /d "WIN32"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-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 /dll /machine:I386
-# ADD LINK32 ..\..\BaseClasses\release_unicode\strmbase.lib msvcrt.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /machine:I386 /nodefaultlib /out:".\Release_Unicode\aacdec.ax" /libpath:"..\..\..\..\lib" /subsystem:windows,4.0 /opt:ref /release /debug:none /OPT:NOREF /OPT:ICF /ignore:4089 /ignore:4078
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Debug Unicode"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_Unicode"
-# PROP Intermediate_Dir "Debug_Unicode"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /Gz /MDd /W4 /Zi /Od /Gy /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D _WIN32_WINNT=0x0400 /D WINVER=0x0400 /D DBG=1 /D "DEBUG" /D "_DEBUG" /D "INC_OLE2" /D "STRICT" /D "_WIN32" /D "_MT" /D "_DLL" /D _X86_=1 /D "WIN32" /D "UNICODE" /D "_UNICODE" /YX"streams.h" /Oid /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\..\BaseClasses" /d "_DEBUG" /d "WIN32"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-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 /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\BaseClasses\debug_unicode\strmbasd.lib msvcrtd.lib quartz.lib vfw32.lib winmm.lib kernel32.lib advapi32.lib version.lib largeint.lib user32.lib gdi32.lib comctl32.lib ole32.lib olepro32.lib oleaut32.lib uuid.lib /nologo /stack:0x200000,0x200000 /dll /pdb:none /debug /machine:I386 /nodefaultlib /out:".\Debug_Unicode\aacdec.ax" /libpath:"..\..\..\..\lib" /debug:mapped,full /subsystem:windows,4.0 /ignore:4089 /ignore:4078
-
-!ENDIF 
-
-# Begin Target
-
-# Name "aacdec - Win32 Release"
-# Name "aacdec - Win32 Debug"
-# Name "aacdec - Win32 Release Unicode"
-# Name "aacdec - Win32 Debug Unicode"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\aacdec.cpp
-DEP_CPP_AACDE=\
-	".\aacdec.h"\
-	".\faad2\include\faad.h"\
-	{$(INCLUDE)}"amextra.h"\
-	{$(INCLUDE)}"amfilter.h"\
-	{$(INCLUDE)}"audevcod.h"\
-	{$(INCLUDE)}"cache.h"\
-	{$(INCLUDE)}"combase.h"\
-	{$(INCLUDE)}"cprop.h"\
-	{$(INCLUDE)}"ctlutil.h"\
-	{$(INCLUDE)}"dllsetup.h"\
-	{$(INCLUDE)}"dsschedule.h"\
-	{$(INCLUDE)}"fourcc.h"\
-	{$(INCLUDE)}"ksmedia.h"\
-	{$(INCLUDE)}"measure.h"\
-	{$(INCLUDE)}"msgthrd.h"\
-	{$(INCLUDE)}"mtype.h"\
-	{$(INCLUDE)}"outputq.h"\
-	{$(INCLUDE)}"pstream.h"\
-	{$(INCLUDE)}"refclock.h"\
-	{$(INCLUDE)}"reftime.h"\
-	{$(INCLUDE)}"renbase.h"\
-	{$(INCLUDE)}"source.h"\
-	{$(INCLUDE)}"streams.h"\
-	{$(INCLUDE)}"strmctl.h"\
-	{$(INCLUDE)}"sysclock.h"\
-	{$(INCLUDE)}"transfrm.h"\
-	{$(INCLUDE)}"transip.h"\
-	{$(INCLUDE)}"videoctl.h"\
-	{$(INCLUDE)}"vtrans.h"\
-	{$(INCLUDE)}"winctrl.h"\
-	{$(INCLUDE)}"winutil.h"\
-	{$(INCLUDE)}"wxdebug.h"\
-	{$(INCLUDE)}"wxlist.h"\
-	{$(INCLUDE)}"wxutil.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=.\aacdec.def
-
-!IF  "$(CFG)" == "aacdec - Win32 Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Debug"
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Release Unicode"
-
-!ELSEIF  "$(CFG)" == "aacdec - Win32 Debug Unicode"
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\aacdec.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\faad2\include\faad.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.h
-# End Source File
-# End Group
-# Begin Group "resource"
-
-# PROP Default_Filter ".rc"
-# Begin Source File
-
-SOURCE=.\aacdec.rc
-# End Source File
-# End Group
-# End Target
-# End Project
--- a/CoreAAC/aacdec.dsw
+++ /dev/null
@@ -1,44 +1,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "aacdec"=.\aacdec.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name libfaad
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "libfaad"=..\libfaad\libfaad.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
--- a/CoreAAC/aacdec.h
+++ /dev/null
@@ -1,114 +1,0 @@
-/* 
- * CoreAAC - AAC DirectShow Decoder Filter
- *
- * Modification to decode AAC without ADTS and multichannel support
- * christophe.paris@free.fr
- */
-
-/*
- * AAC DirectShow Decoder Filter
- * Copyright (C) 2003 Robert Cioch
- *  
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include "..\\include\\faad.h"
-#include "resource.h"
-
-#define FILTER_VERSION "1.0b"
-
-// ===========================================================================================
-
-// {6AC7C19E-8CA0-4e3d-9A9F-2881DE29E0AC}
-DEFINE_GUID(CLSID_DECODER, 0x6ac7c19e, 0x8ca0, 0x4e3d, 0x9a, 0x9f, 0x28, 0x81, 0xde, 0x29, 0xe0, 0xac);
-
-class CDecoder : public CTransformFilter, public ISpecifyPropertyPages
-{
-public :
-	DECLARE_IUNKNOWN
-	static CUnknown *WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
-	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);    
-
-	CDecoder(LPUNKNOWN lpunk, HRESULT *phr) :
-		CTransformFilter(NAME("AAC Audio Decoder"), lpunk, CLSID_DECODER),
-		m_decHandle(NULL),
-		m_decoderSpecificLen(0),
-		m_decoderSpecific(NULL)
-		{ }
-
-	virtual ~CDecoder();
-
-	// property pages
-	STDMETHODIMP GetPages(CAUUID *pPages);
-	STDMETHODIMP FreePages(CAUUID *pPages);
- 
-	// ITransformFilter interface methods
-	HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
-	HRESULT CheckInputType(const CMediaType *mtIn);
-	HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
-	HRESULT DecideBufferSize(IMemAllocator *pAllocator, ALLOCATOR_PROPERTIES *pprop);
-	HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
-
-	HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
-
-	bool Decode(BYTE *pSrc, DWORD SrcLength, BYTE *pDst, DWORD DstLength, DWORD *ActualDstLength);
-
-private:
-	unsigned char* m_decoderSpecific;
-	int m_decoderSpecificLen;
-	faacDecHandle m_decHandle;
-	int m_Channels;
-	int m_SamplesPerSec;
-	int m_BitesPerSample;
-};
-
-// ===========================================================================================
-// simple about page
-
-// {4665E44B-8B9A-4515-A086-E94ECE374608}
-DEFINE_GUID(CLSID_ABOUT, 0x4665e44b, 0x8b9a, 0x4515, 0xa0, 0x86, 0xe9, 0x4e, 0xce, 0x37, 0x46, 0x8);
-
-class CAbout : public CBasePropertyPage
-{
-public:
-	static CUnknown *WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr)
-	{
-	    CAbout *pNewObject = new CAbout(punk, phr);
-	    if (!pNewObject)
-	        *phr = E_OUTOFMEMORY;
-	    return pNewObject;
-	}
-
-	CAbout(LPUNKNOWN pUnk, HRESULT *phr) :
-		CBasePropertyPage(NAME("About"), pUnk, IDD_ABOUT, IDS_ABOUT)
-		{ }
-
-	~CAbout()
-		{ }
-
-	HRESULT OnActivate()
-	{		
-		SetDlgItemText(m_hwnd,IDC_STATIC_VERSION,"Version " FILTER_VERSION " - ("__DATE__", "__TIME__")");
-		return S_OK;
-	}
-
-	BOOL OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-	{
-		return CBasePropertyPage::OnReceiveMessage(hwnd, uMsg, wParam, lParam);		
-	}
-};
-
-// ===========================================================================================
--- a/CoreAAC/aacdec.rc
+++ /dev/null
@@ -1,178 +1,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "windows.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Polish resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK)
-#ifdef _WIN32
-LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
-#pragma code_page(1250)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_ABOUT               "About"
-END
-
-#endif    // Polish resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_ABOUT DIALOG DISCARDABLE  0, 0, 212, 142
-STYLE WS_CHILD | WS_VISIBLE
-FONT 8, "Tahoma"
-BEGIN
-    GROUPBOX        "CoreAAC Decoder",IDC_STATIC,4,4,204,130,BS_CENTER
-    CTEXT           "Copyright � 2003 Robert Cioch",IDC_STATIC,7,65,198,8,
-                    SS_CENTERIMAGE
-    CTEXT           "This software is based on :",IDC_STATIC,8,37,196,8,
-                    SS_CENTERIMAGE
-    CTEXT           "FAAD2 v1.1 - Freeware Advanced Audio Decoder",
-                    IDC_STATIC,7,97,198,8,SS_CENTERIMAGE
-    CTEXT           "Copyright � 2002 Menno Bakker",IDC_STATIC,7,108,198,8,
-                    SS_CENTERIMAGE
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,8,90,197,1
-    CTEXT           "http://www.audiocoding.com",IDC_STATIC,7,119,198,8,
-                    SS_CENTERIMAGE
-    CTEXT           "http://www.borgtech.org",IDC_STATIC,7,76,198,8,
-                    SS_CENTERIMAGE
-    CTEXT           "AAC Decoder v1.1",IDC_STATIC,7,54,198,8,SS_CENTERIMAGE
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,49,198,1
-    CTEXT           "http://corecodec.org/projects/coreaac/",IDC_STATIC,7,26,
-                    198,8
-    CTEXT           "Version 1.0b - (May 21 2003, 17:05:09)",
-                    IDC_STATIC_VERSION,7,15,198,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_ABOUT, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 205
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 135
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE MOVEABLE PURE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE MOVEABLE PURE 
-BEGIN
-    "#include ""windows.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE MOVEABLE PURE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,0,166
- PRODUCTVERSION 1,1,0,166
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "Comments", "http://www.borgtech.org\r\n\r\nWe are the Borg.\r\nResistance is futile.\0"
-            VALUE "FileDescription", "AAC DirectShow Decoder\0"
-            VALUE "FileVersion", "1, 1, 0, 166\0"
-            VALUE "InternalName", "aacdec\0"
-            VALUE "LegalCopyright", "Copyright � 2003 Robert Cioch\0"
-            VALUE "OriginalFilename", "aacdec.ax\0"
-            VALUE "ProductVersion", "1, 1, 0, 166\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1200
-    END
-END
-
-#endif    // !_MAC
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
--- a/CoreAAC/aacdec.vcproj
+++ /dev/null
@@ -1,373 +1,0 @@
-<?xml version="1.0" encoding = "windows-1250"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="aacdec"
-	ProjectGUID="{FB7F9727-0B56-4995-997B-5AD8A70940A4}"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				GlobalOptimizations="TRUE"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="TRUE"
-				FavorSizeOrSpeed="1"
-				OptimizeForProcessor="0"
-				OptimizeForWindowsApplication="TRUE"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RELEASE"
-				StringPooling="TRUE"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=".\Release/aacdec.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				CallingConvention="2"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="strmbase.lib winmm.lib odbc32.lib odbccp32.lib"
-				OutputFile="Release/aacdec.ax"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ModuleDefinitionFile=".\aacdec.def"
-				ProgramDatabaseFile=".\Release/aacdec.pdb"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="2"
-				EntryPointSymbol="DllEntryPoint@12"
-				ImportLibrary=".\Release/aacdec.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Release/aacdec.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1045"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DEBUG"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/aacdec.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"
-				CallingConvention="2"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="strmbasd.lib winmm.lib odbc32.lib odbccp32.lib"
-				OutputFile="Debug/aacdec.ax"
-				LinkIncremental="2"
-				SuppressStartupBanner="TRUE"
-				ModuleDefinitionFile=".\aacdec.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/aacdec.pdb"
-				OptimizeForWindows98="0"
-				EntryPointSymbol="DllEntryPoint@12"
-				ImportLibrary=".\Debug/aacdec.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Debug/aacdec.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1045"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="faad2"
-			Filter="">
-			<File
-				RelativePath="faad2\libfaad\analysis.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\bits.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\bits.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\cfft.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\cfft.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\common.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\common.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\data.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\data.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\decoder.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\decoder.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\drc.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\drc.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\error.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\error.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\filtbank.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\filtbank.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\huffman.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\ic_predict.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\ic_predict.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\is.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\is.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\kbd_win.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\lt_predict.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\lt_predict.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\mdct.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\mdct.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\mp4.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\mp4.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\ms.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\ms.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\output.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\output.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\pns.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\pns.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\pulse.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\pulse.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\reordered_spectral_data.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\rvlc_scale_factors.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\rvlc_scale_factors.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_dec.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_dec.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_huff.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_huff.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_qmf.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_qmf.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_syntax.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\sbr_syntax.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\specrec.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\specrec.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\syntax.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\syntax.h">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\tns.c">
-			</File>
-			<File
-				RelativePath="faad2\libfaad\tns.h">
-			</File>
-			<Filter
-				Name="codebook"
-				Filter="">
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb.h">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_1.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_10.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_11.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_2.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_3.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_4.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_5.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_6.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_7.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_8.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_9.c">
-				</File>
-				<File
-					RelativePath="faad2\libfaad\codebook\hcb_sf.c">
-				</File>
-			</Filter>
-		</Filter>
-		<File
-			RelativePath=".\aacdec.cpp">
-		</File>
-		<File
-			RelativePath=".\aacdec.def">
-		</File>
-		<File
-			RelativePath=".\aacdec.h">
-		</File>
-		<File
-			RelativePath=".\aacdec.rc">
-		</File>
-		<File
-			RelativePath="faad2\include\faad.h">
-		</File>
-		<File
-			RelativePath="resource.h">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
--- a/CoreAAC/resource.h
+++ b/CoreAAC/resource.h
@@ -3,8 +3,21 @@
 // Used by aacdec.rc
 //
 #define IDS_ABOUT                       1
+#define IDS_INFO                        2
 #define IDD_ABOUT                       101
+#define IDD_DIALOG_INFO                 102
+#define IDB_BITMAP_AAC_LOGO             105
 #define IDC_STATIC_VERSION              1000
+#define IDC_LABEL_PROFILE               1001
+#define IDC_LABEL_SAMPLERATE            1002
+#define IDC_LABEL_CHANNELS              1003
+#define IDC_LABEL_IBITRATE              1004
+#define IDC_LABEL_BITRATE               1004
+#define IDC_LABEL_BPS                   1005
+#define IDC_STATIC_FAAD_VERSION         1006
+#define IDC_LABEL_FRAMES_DECODED        1007
+#define IDC_CHECK1                      1008
+#define IDC_CHECK_DOWNMIX               1008
 #define IDC_STATIC                      -1
 
 // Next default values for new objects
@@ -11,9 +24,9 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_RESOURCE_VALUE        106
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_CONTROL_VALUE         1009
 #define _APS_NEXT_SYMED_VALUE           102
 #endif
 #endif
binary files /dev/null b/CoreAAC/resource/aac_logo_sm.bmp differ