[xiph-commits] r11201 - in branches/oggdsf_ce_port: sln/oggdsf_all src/lib/codecs/speex/filters/dsfSpeexDecoder src/tests/testOOSpeexDec

illiminable at svn.xiph.org illiminable at svn.xiph.org
Fri Apr 21 07:08:11 PDT 2006


Author: illiminable
Date: 2006-04-21 07:07:57 -0700 (Fri, 21 Apr 2006)
New Revision: 11201

Modified:
   branches/oggdsf_ce_port/sln/oggdsf_all/oggdsf_all.sln
   branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
   branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
   branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
   branches/oggdsf_ce_port/src/tests/testOOSpeexDec/SpeexDecWriter.cpp
Log:
* Change speex wrapper for decode filter. Now using int methods.

Modified: branches/oggdsf_ce_port/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- branches/oggdsf_ce_port/sln/oggdsf_all/oggdsf_all.sln	2006-04-21 13:06:02 UTC (rev 11200)
+++ branches/oggdsf_ce_port/sln/oggdsf_all/oggdsf_all.sln	2006-04-21 14:07:57 UTC (rev 11201)
@@ -73,11 +73,12 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfSpeexDecoder", "..\..\src\lib\codecs\speex\filters\dsfSpeexDecoder\dsfSpeexDecoder.vcproj", "{3FB9B20E-790A-402F-A02C-B0FBDC5938E3}"
 	ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+		{6D653C6F-8722-4B10-9C3A-CB7094DD159F} = {6D653C6F-8722-4B10-9C3A-CB7094DD159F}
+		{359DBC2D-2BF1-4A1A-BE81-248268F557CC} = {359DBC2D-2BF1-4A1A-BE81-248268F557CC}
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 		{EA7091BB-9906-41DF-9738-F4858A136086} = {EA7091BB-9906-41DF-9738-F4858A136086}
-		{AE0ABDB0-AE3B-4C38-843B-3408A6B87BA4} = {AE0ABDB0-AE3B-4C38-843B-3408A6B87BA4}
 		{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
-		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfSpeexEncoder", "..\..\src\lib\codecs\speex\filters\dsfSpeexEncoder\dsfSpeexEncoder.vcproj", "{419E0701-9C9A-4671-B3B6-79FA206DEE25}"
@@ -1100,13 +1101,16 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libDSPlay", "..\..\src\lib\player\libDSPlay\libDSPlay.vcproj", "{213C8003-BD07-4534-ACFC-D630C6D0D75F}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libOOSpeex", "..\..\src\lib\codecs\speex\libs\libOOSpeex\libOOSpeex.vcproj", "{359DBC2D-2BF1-4A1A-BE81-248268F557CC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{6D653C6F-8722-4B10-9C3A-CB7094DD159F} = {6D653C6F-8722-4B10-9C3A-CB7094DD159F}
+	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testOOSpeexDec", "..\..\src\tests\testOOSpeexDec\testOOSpeexDec.vcproj", "{E3F4D087-0166-484D-BA2C-BB183BA1BFAD}"
 	ProjectSection(ProjectDependencies) = postProject
+		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
+		{6D653C6F-8722-4B10-9C3A-CB7094DD159F} = {6D653C6F-8722-4B10-9C3A-CB7094DD159F}
+		{359DBC2D-2BF1-4A1A-BE81-248268F557CC} = {359DBC2D-2BF1-4A1A-BE81-248268F557CC}
 		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
-		{359DBC2D-2BF1-4A1A-BE81-248268F557CC} = {359DBC2D-2BF1-4A1A-BE81-248268F557CC}
-		{6D653C6F-8722-4B10-9C3A-CB7094DD159F} = {6D653C6F-8722-4B10-9C3A-CB7094DD159F}
-		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject
 Global

Modified: branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp	2006-04-21 13:06:02 UTC (rev 11200)
+++ branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.cpp	2006-04-21 14:07:57 UTC (rev 11201)
@@ -35,11 +35,13 @@
 
 SpeexDecodeInputPin::SpeexDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes)
 	:	AbstractTransformInputPin(inFilter, inFilterLock, inOutputPin, NAME("SpeexDecodeInputPin"), L"Speex In", inAcceptableMediaTypes)
-	,	mFishSound(NULL)
+	//FSN:::
+	//,	mFishSound(NULL)
 
 	,	mNumChannels(0)
-	,	mFrameSize(0)
+	,	mSampleFrameSize(0)
 	,	mSampleRate(0)
+	,	mSpeexFrameSize(0)
 	,	mUptoFrame(0)
 
 	,	mDecodedByteCount(0)
@@ -55,20 +57,29 @@
 	mDecodedBuffer = new unsigned char[DECODED_BUFFER_SIZE];
 }
 
-bool SpeexDecodeInputPin::ConstructCodec() {
-	mFishSound = fish_sound_new (FISH_SOUND_DECODE, &mFishInfo);
+bool SpeexDecodeInputPin::ConstructCodec() 
+{
+	//TODO::: Allow force options
+	
+	//Don't need to do much... mSpeexDecoder is good to go
+	return true;
 
-	int i = 1;
-	//FIX::: Use new API for interleave setting
-	fish_sound_command(mFishSound, FISH_SOUND_SET_INTERLEAVE, &i, sizeof(int));
+	////FSN:::
+	//mFishSound = fish_sound_new (FISH_SOUND_DECODE, &mFishInfo);
 
-	fish_sound_set_decoded_callback (mFishSound, SpeexDecodeInputPin::SpeexDecoded, this);
+	//int i = 1;
+	////FIX::: Use new API for interleave setting
+	//fish_sound_command(mFishSound, FISH_SOUND_SET_INTERLEAVE, &i, sizeof(int));
+
+	//fish_sound_set_decoded_callback (mFishSound, SpeexDecodeInputPin::SpeexDecoded, this);
 	//FIX::: Proper return value
-	return true;
+	//return true;
 }
-void SpeexDecodeInputPin::DestroyCodec() {
-	fish_sound_delete(mFishSound);
-	mFishSound = NULL;
+void SpeexDecodeInputPin::DestroyCodec() 
+{
+	//FSN:::
+	//fish_sound_delete(mFishSound);
+	//mFishSound = NULL;
 }
 SpeexDecodeInputPin::~SpeexDecodeInputPin(void)
 {
@@ -122,63 +133,63 @@
 
 	return S_OK;
 }
-int SpeexDecodeInputPin::SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer) 
-{
+//int SpeexDecodeInputPin::SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer) 
+//{
+//
+//	SpeexDecodeInputPin* locThis = reinterpret_cast<SpeexDecodeInputPin*> (inThisPointer);
+//	SpeexDecodeFilter* locFilter = reinterpret_cast<SpeexDecodeFilter*>(locThis->m_pFilter);
+//
+//	if (locThis->CheckStreaming() == S_OK) {
+//
+//		unsigned long locActualSize = inFrames * locThis->mFrameSize;
+//		unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
+//		unsigned long locBufferRemaining = DECODED_BUFFER_SIZE - locThis->mDecodedByteCount;
+//		
+//
+//
+//		//Create a pointer into the buffer		
+//		signed short* locShortBuffer = (signed short*)&locThis->mDecodedBuffer[locThis->mDecodedByteCount];
+//		
+//		
+//		signed short tempInt = 0;
+//		float tempFloat = 0;
+//		
+//		//FIX:::Move the clipping to the abstract function
+//
+//		if (locBufferRemaining >= locActualSize) {
+//			//Do float to int conversion with clipping
+//			const float SINT_MAX_AS_FLOAT = 32767.0f;
+//			for (unsigned long i = 0; i < locTotalFrameCount; i++) {
+//				//Clipping because vorbis puts out floats out of range -1 to 1
+//				if (((float*)inPCM)[i] <= -1.0f) {
+//					tempInt = SINT_MIN;	
+//				} else if (((float*)inPCM)[i] >= 1.0f) {
+//					tempInt = SINT_MAX;
+//				} else {
+//					//FIX:::Take out the unnescessary variable.
+//					tempFloat = ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
+//					//ASSERT((tempFloat <= 32767.0f) && (tempFloat >= -32786.0f));
+//					tempInt = (signed short)(tempFloat);
+//					//tempInt = (signed short) ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
+//				}
+//				
+//				*locShortBuffer = tempInt;
+//				locShortBuffer++;
+//			}
+//
+//			locThis->mDecodedByteCount += locActualSize;
+//			
+//			return 0;
+//		} else {
+//			throw 0;
+//		}
+//	} else {
+//		DbgLog((LOG_TRACE,1,TEXT("Fishsound sending stuff we aren't ready for...")));
+//		return -1;
+//	}
+//
+//}
 
-	SpeexDecodeInputPin* locThis = reinterpret_cast<SpeexDecodeInputPin*> (inThisPointer);
-	SpeexDecodeFilter* locFilter = reinterpret_cast<SpeexDecodeFilter*>(locThis->m_pFilter);
-
-	if (locThis->CheckStreaming() == S_OK) {
-
-		unsigned long locActualSize = inFrames * locThis->mFrameSize;
-		unsigned long locTotalFrameCount = inFrames * locThis->mNumChannels;
-		unsigned long locBufferRemaining = DECODED_BUFFER_SIZE - locThis->mDecodedByteCount;
-		
-
-
-		//Create a pointer into the buffer		
-		signed short* locShortBuffer = (signed short*)&locThis->mDecodedBuffer[locThis->mDecodedByteCount];
-		
-		
-		signed short tempInt = 0;
-		float tempFloat = 0;
-		
-		//FIX:::Move the clipping to the abstract function
-
-		if (locBufferRemaining >= locActualSize) {
-			//Do float to int conversion with clipping
-			const float SINT_MAX_AS_FLOAT = 32767.0f;
-			for (unsigned long i = 0; i < locTotalFrameCount; i++) {
-				//Clipping because vorbis puts out floats out of range -1 to 1
-				if (((float*)inPCM)[i] <= -1.0f) {
-					tempInt = SINT_MIN;	
-				} else if (((float*)inPCM)[i] >= 1.0f) {
-					tempInt = SINT_MAX;
-				} else {
-					//FIX:::Take out the unnescessary variable.
-					tempFloat = ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
-					//ASSERT((tempFloat <= 32767.0f) && (tempFloat >= -32786.0f));
-					tempInt = (signed short)(tempFloat);
-					//tempInt = (signed short) ((( (float*) inPCM )[i]) * SINT_MAX_AS_FLOAT);
-				}
-				
-				*locShortBuffer = tempInt;
-				locShortBuffer++;
-			}
-
-			locThis->mDecodedByteCount += locActualSize;
-			
-			return 0;
-		} else {
-			throw 0;
-		}
-	} else {
-		DbgLog((LOG_TRACE,1,TEXT("Fishsound sending stuff we aren't ready for...")));
-		return -1;
-	}
-
-}
-
 STDMETHODIMP SpeexDecodeInputPin::Receive(IMediaSample* inSample) 
 {
 	CAutoLock locLock(mStreamLock);
@@ -210,7 +221,7 @@
 				unsigned long locBytesCopied = 0;
 				unsigned long locBytesToCopy = 0;
 
-				locStart = convertGranuleToTime(locEnd) - (((mDecodedByteCount / mFrameSize) * UNITS) / mSampleRate);
+				locStart = convertGranuleToTime(locEnd) - (((mDecodedByteCount / mSampleFrameSize) * UNITS) / mSampleRate);
 				do {
 					HRESULT locHR = mOutputPin->GetDeliveryBuffer(&locSample, NULL, NULL, NULL);
 					if (locHR != S_OK) {
@@ -227,7 +238,7 @@
 					locBytesToCopy = ((mDecodedByteCount - locBytesCopied) <= locSample->GetSize()) ? (mDecodedByteCount - locBytesCopied) : locSample->GetSize();
 					//locBytesCopied += locBytesToCopy;
 
-					locSampleDuration = (((locBytesToCopy/mFrameSize) * UNITS) / mSampleRate);
+					locSampleDuration = (((locBytesToCopy/mSampleFrameSize) * UNITS) / mSampleRate);
 					locEnd = locStart + locSampleDuration;
 
 					//Adjust the time stamps for rate and seeking
@@ -242,10 +253,10 @@
 					} else {
 						if (locAdjustedStart < 0) {
 							locSeekStripOffset = (-locAdjustedStart) * mSampleRate;
-							locSeekStripOffset *= mFrameSize;
+							locSeekStripOffset *= mSampleFrameSize;
 							locSeekStripOffset /= UNITS;
-							locSeekStripOffset += (mFrameSize - (locSeekStripOffset % mFrameSize));
-							__int64 locStrippedDuration = (((locSeekStripOffset/mFrameSize) * UNITS) / mSampleRate);
+							locSeekStripOffset += (mSampleFrameSize - (locSeekStripOffset % mSampleFrameSize));
+							__int64 locStrippedDuration = (((locSeekStripOffset/mSampleFrameSize) * UNITS) / mSampleRate);
 							locAdjustedStart += locStrippedDuration;
 						}
 							
@@ -285,12 +296,28 @@
 
 HRESULT SpeexDecodeInputPin::TransformData(BYTE* inBuf, long inNumBytes) 
 {
-	long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
-	if (locErr == 0) {
+	////FSN:::
+	//long locErr = fish_sound_decode(mFishSound, inBuf, inNumBytes);
+	//if (locErr == 0) {
+	//	return S_OK;
+	//} else {
+	//	return S_FALSE;
+	//}
+
+	//TODO::: Verify size of remaining buffer
+	SpeexDecoder::eSpeexResult locResult;
+	locResult = mSpeexDecoder.decodePacket(		inBuf
+											,	inNumBytes
+											,	(short*)(mDecodedBuffer + mDecodedByteCount)
+											,	DECODED_BUFFER_SIZE - mDecodedByteCount);
+
+	if (locResult == SpeexDecoder::SPEEX_DATA_OK) {
+		mDecodedByteCount += mSpeexFrameSize;
 		return S_OK;
-	} else {
-		return S_FALSE;
 	}
+
+	//For now, just silently ignore busted packets.
+	return S_OK;
 }
 
 
@@ -344,7 +371,11 @@
 		case VSS_SEEN_NOTHING:
 			if (strncmp((char*)inCodecHeaderPacket->packetData(), "Speex   ", 8) == 0) {
 				//TODO::: Possibly verify version
-				if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
+
+				//FSN:::
+				//if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
+				if (mSpeexDecoder.decodePacket(	inCodecHeaderPacket->packetData(),	inCodecHeaderPacket->packetSize(),	NULL, 0) == SpeexDecoder::SPEEX_HEADER_OK) {
+					 
 					mSetupState = VSS_SEEN_BOS;
 					return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
 				}
@@ -357,15 +388,19 @@
 			//Just ignore the second packet we see, and hope fishsound does better.
 
 			//if (strncmp((char*)inCodecHeaderPacket->packetData(), "\003vorbis", 7) == 0) {
-				if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
+			//FSN:::
+				//if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
+			if (mSpeexDecoder.decodePacket(	inCodecHeaderPacket->packetData(),	inCodecHeaderPacket->packetSize(),	NULL, 0) == SpeexDecoder::SPEEX_COMMENT_OK) {
 					mSetupState = VSS_ALL_HEADERS_SEEN;
 
-					fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
+					//FSN:::
+					//fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
 					mBegun = true;
 			
-					mNumChannels = mFishInfo.channels;
-					mFrameSize = mNumChannels * SIZE_16_BITS;
-					mSampleRate = mFishInfo.samplerate;
+					mNumChannels = mSpeexDecoder.numChannels();//mFishInfo.channels;
+					mSampleFrameSize = mNumChannels * SIZE_16_BITS;
+					mSampleRate = mSpeexDecoder.sampleRate(); //mFishInfo.samplerate;
+					mSpeexFrameSize = mSampleFrameSize * mSpeexDecoder.frameSize();
 
 					return IOggDecoder::AHR_ALL_HEADERS_RECEIVED;
 				}

Modified: branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h	2006-04-21 13:06:02 UTC (rev 11200)
+++ branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/SpeexDecodeInputPin.h	2006-04-21 14:07:57 UTC (rev 11201)
@@ -37,11 +37,13 @@
 
 #include "SpeexDecodeFilter.h"
 
-extern "C" {
-//#include <fishsound/fishsound.h>
-#include "fish_cdecl.h"
-}
+#include "SpeexDecoder.h"
 
+//extern "C" {
+////#include <fishsound/fishsound.h>
+//#include "fish_cdecl.h"
+//}
+
 class SpeexDecodeOutputPin;
 
 class SpeexDecodeInputPin 
@@ -54,7 +56,7 @@
 	SpeexDecodeInputPin(AbstractTransformFilter* inFilter, CCritSec* inFilterLock, AbstractTransformOutputPin* inOutputPin, vector<CMediaType*> inAcceptableMediaTypes);
 	virtual ~SpeexDecodeInputPin(void);
 	
-	static int __cdecl SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
+	//static int __cdecl SpeexDecoded (FishSound* inFishSound, float** inPCM, long inFrames, void* inThisPointer);
 
 
 	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
@@ -85,18 +87,22 @@
 	virtual void DestroyCodec();
 	virtual HRESULT TransformData(unsigned char* inBuf, long inNumBytes);
 
-	FishSound* mFishSound;
-	FishSoundInfo mFishInfo; 
+	//FSN:::
+	//FishSound* mFishSound;
+	//FishSoundInfo mFishInfo; 
 
-	int mNumChannels;
-	int mFrameSize;
-	int mSampleRate;
+	SpeexDecoder mSpeexDecoder;
+
+	unsigned long mNumChannels;
+	unsigned long mSampleFrameSize;
+	unsigned long mSpeexFrameSize;
+	unsigned long mSampleRate;
+
+	//TODO::: NEEDED???
 	unsigned int mUptoFrame;
-
 	bool mBegun;
 
 	unsigned char* mDecodedBuffer;
-
 	unsigned long mDecodedByteCount;
 
 	enum eSpeexSetupState {

Modified: branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj	2006-04-21 13:06:02 UTC (rev 11200)
+++ branches/oggdsf_ce_port/src/lib/codecs/speex/filters/dsfSpeexDecoder/dsfSpeexDecoder.vcproj	2006-04-21 14:07:57 UTC (rev 11201)
@@ -47,7 +47,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2;..\..\libs\libOOSpeex;..\..\libs\libspeex\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -301,7 +301,7 @@
 				EnableIntrinsicFunctions="true"
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2;..\..\libs\libOOSpeex;..\..\libs\libspeex\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				StringPooling="true"
 				RuntimeLibrary="2"
@@ -565,7 +565,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2;..\..\libs\libOOSpeex;..\..\libs\libspeex\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -814,7 +814,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2;..\..\libs\libOOSpeex;..\..\libs\libspeex\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -1064,7 +1064,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				AdditionalIncludeDirectories="..\..\..\..\core\directshow\BaseClasses;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2;..\..\libs\libOOSpeex;..\..\libs\libspeex\include"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFSPEEXDECODER_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"

Modified: branches/oggdsf_ce_port/src/tests/testOOSpeexDec/SpeexDecWriter.cpp
===================================================================
--- branches/oggdsf_ce_port/src/tests/testOOSpeexDec/SpeexDecWriter.cpp	2006-04-21 13:06:02 UTC (rev 11200)
+++ branches/oggdsf_ce_port/src/tests/testOOSpeexDec/SpeexDecWriter.cpp	2006-04-21 14:07:57 UTC (rev 11201)
@@ -16,11 +16,15 @@
 
 bool SpeexDecWriter::acceptStampedOggPacket(StampedOggPacket* inPacket)
 {
-	SpeexDecoder::eSpeexResult locRes = mSpeexDecoder.decodePacket(inPacket, mOutputBuffer, OUTPUT_BUFFER_SIZE);
+	SpeexDecoder::eSpeexResult locRes = mSpeexDecoder.decodePacket(		inPacket->packetData()
+																	,	inPacket->packetSize()
+																	,	mOutputBuffer
+																	,	OUTPUT_BUFFER_SIZE);
+
 	if (locRes == SpeexDecoder::SPEEX_DATA_OK) {
 		mOutputFile.write((char*)mOutputBuffer, mSpeexDecoder.frameSize() * mSpeexDecoder.numChannels() * sizeof(short));
 		return true;
-	else if (locRes < SpeexDecoder::SPEEX_ERROR_MIN) {
+	} else if (locRes < SpeexDecoder::SPEEX_ERROR_MIN) {
 		return true;
 	} else {
 		return false;



More information about the commits mailing list