[xiph-commits] r10286 - branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder

illiminable at svn.xiph.org illiminable at svn.xiph.org
Mon Oct 24 05:27:38 PDT 2005


Author: illiminable
Date: 2005-10-24 05:27:35 -0700 (Mon, 24 Oct 2005)
New Revision: 10286

Modified:
   branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
Log:
* Move the gathering of sample rate, etc info to the header setup, instead of waiting until play starts

Modified: branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2005-10-24 11:54:22 UTC (rev 10285)
+++ branches/oggdsf_new_demux/src/lib/codecs/vorbis/filters/dsfVorbisDecoder/VorbisDecodeInputPin.cpp	2005-10-24 12:27:35 UTC (rev 10286)
@@ -326,17 +326,17 @@
 	HRESULT locHR = CheckStreaming();
 
 	if (locHR == S_OK) {
-		if (!mBegun) {
-			//locThis->debugLog<<"First Time"<<endl;
-			//Set up fishsound		
-			fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
-			mBegun = true;
-			
-			mNumChannels = mFishInfo.channels;
-			mFrameSize = mNumChannels * SIZE_16_BITS;
-			mSampleRate = mFishInfo.samplerate;
+		//if (!mBegun) {
+		//	//locThis->debugLog<<"First Time"<<endl;
+		//	//Set up fishsound		
+		//	fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
+		//	mBegun = true;
+		//	
+		//	mNumChannels = mFishInfo.channels;
+		//	mFrameSize = mNumChannels * SIZE_16_BITS;
+		//	mSampleRate = mFishInfo.samplerate;
 
-		}
+		//}
 
 
 		BYTE* locBuff = NULL;
@@ -518,6 +518,16 @@
 		case VSS_SEEN_COMMENT:
 			if (strncmp((char*)inCodecHeaderPacket->packetData(), "\005vorbis", 7) == 0) {
 				if (fish_sound_decode(mFishSound, inCodecHeaderPacket->packetData(), inCodecHeaderPacket->packetSize()) >= 0) {
+		
+					fish_sound_command (mFishSound, FISH_SOUND_GET_INFO, &(mFishInfo), sizeof (FishSoundInfo)); 
+					//Is mBegun useful ?
+					mBegun = true;
+			
+					mNumChannels = mFishInfo.channels;
+					mFrameSize = mNumChannels * SIZE_16_BITS;
+					mSampleRate = mFishInfo.samplerate;
+
+		
 					mSetupState = VSS_ALL_HEADERS_SEEN;
 					return IOggDecoder::AHR_ALL_HEADERS_RECEIVED;
 				}



More information about the commits mailing list