[xiph-commits] r11221 - branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis

illiminable at svn.xiph.org illiminable at svn.xiph.org
Fri Apr 21 14:10:50 PDT 2006


Author: illiminable
Date: 2006-04-21 14:10:40 -0700 (Fri, 21 Apr 2006)
New Revision: 11221

Modified:
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.cpp
   branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.h
Log:
* Return how many samples

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.cpp
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.cpp	2006-04-21 21:06:50 UTC (rev 11220)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.cpp	2006-04-21 21:10:40 UTC (rev 11221)
@@ -58,7 +58,8 @@
 VorbisDecoder::eVorbisResult VorbisDecoder::decodePacket(		const unsigned char* inPacket
 											,	unsigned long inPacketSize
 											,	short* outSamples
-											,	unsigned long inOutputBufferSize)
+											,	unsigned long inOutputBufferSize
+											,	unsigned long* outNumSamples)
 {
 	mWorkPacket.b_o_s = 0;
 	mWorkPacket.bytes = inPacketSize;
@@ -67,6 +68,8 @@
 	mWorkPacket.packet = (unsigned char*)inPacket;		//Naughty!
 	mWorkPacket.packetno = mPacketCount;
 
+	*outNumSamples = 0;
+
 	if (mPacketCount == 0) {
 		mPacketCount++;
 		mWorkPacket.b_o_s = 1;
@@ -121,6 +124,7 @@
 				}
 
 				vorbis_synthesis_read(&mVorbisState, locNumSamples);
+				*outNumSamples = locNumSamples;
 			}
 
 		}

Modified: branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.h
===================================================================
--- branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.h	2006-04-21 21:06:50 UTC (rev 11220)
+++ branches/oggdsf_ce_port/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisDecoder.h	2006-04-21 21:10:40 UTC (rev 11221)
@@ -27,7 +27,8 @@
 	eVorbisResult decodePacket(		const unsigned char* inPacket
 								,	unsigned long inPacketSize
 								,	short* outSamples
-								,	unsigned long inOutputBufferSize); 
+								,	unsigned long inOutputBufferSize
+								,	unsigned long* outNumSamples); 
 
 	int numChannels()	{	return mNumChannels;	}
 	int sampleRate()	{	return mSampleRate;		}



More information about the commits mailing list