added svn keywords, tabs changed into 4 whitespaces, re #2
This commit is contained in:
parent
c8260ff827
commit
d606610431
|
@ -98,9 +98,8 @@ aacPlusEncoder :: open ( void )
|
|||
InitIIR21_Resampler(&(IIR21_reSampler[0]));
|
||||
InitIIR21_Resampler(&(IIR21_reSampler[1]));
|
||||
|
||||
if(IIR21_reSampler[0].delay > MAX_DS_FILTER_DELAY){
|
||||
if(IIR21_reSampler[0].delay > MAX_DS_FILTER_DELAY)
|
||||
throw Exception(__FILE__, __LINE__, "IIR21 resampler delay is bigger then MAX_DS_FILTER_DELAY");
|
||||
}
|
||||
writeOffset += IIR21_reSampler[0].delay*MAX_CHANNELS;
|
||||
}
|
||||
|
||||
|
@ -111,9 +110,8 @@ aacPlusEncoder :: open ( void )
|
|||
config.bandWidth=bandwidth;
|
||||
|
||||
/* set up SBR configuration */
|
||||
if(!IsSbrSettingAvail (bitrate, nChannelsAAC, sampleRateAAC, &sampleRateAAC)) {
|
||||
if(!IsSbrSettingAvail(bitrate, nChannelsAAC, sampleRateAAC, &sampleRateAAC))
|
||||
throw Exception(__FILE__, __LINE__, "No valid SBR configuration found");
|
||||
}
|
||||
|
||||
InitializeSbrDefaults (&sbrConfig);
|
||||
sbrConfig.usePs = useParametricStereo;
|
||||
|
@ -182,10 +180,12 @@ aacPlusEncoder :: write ( const void * buf,
|
|||
|
||||
reportEvent(10, "converting short to float");
|
||||
short *TimeDataPcm = (short *) buf;
|
||||
|
||||
for (i=0; i<samples; i++)
|
||||
inBuf[i+writeOffset+writtenSamples] = (float) TimeDataPcm[i];
|
||||
writtenSamples+=samples;
|
||||
reportEvent(10, "writtenSamples", writtenSamples);
|
||||
|
||||
if (writtenSamples < inSamples)
|
||||
return samples;
|
||||
|
||||
|
@ -201,16 +201,17 @@ aacPlusEncoder :: write ( const void * buf,
|
|||
reportEvent(10, "numAncDataBytes=", numAncDataBytes);
|
||||
|
||||
/* 2:1 downsampling for AAC core */
|
||||
if (!useParametricStereo){
|
||||
if (!useParametricStereo) {
|
||||
reportEvent(10, "2:1 downsampling for AAC core");
|
||||
for( ch=0; ch<nChannelsAAC; ch++ )
|
||||
IIR21_Downsample( &(IIR21_reSampler[ch]),
|
||||
inBuf+writeOffset+ch,
|
||||
inBuf + writeOffset+ch,
|
||||
writtenSamples/getInChannel(),
|
||||
MAX_CHANNELS,
|
||||
inBuf+ch,
|
||||
&outSamples,
|
||||
MAX_CHANNELS);
|
||||
|
||||
reportEvent(10, "outSamples=", outSamples);
|
||||
}
|
||||
|
||||
|
@ -224,14 +225,13 @@ aacPlusEncoder :: write ( const void * buf,
|
|||
&numAncDataBytes,
|
||||
(unsigned *) (outBuf+ADTS_HEADER_SIZE),
|
||||
&numOutBytes);
|
||||
|
||||
if(hEnvEnc)
|
||||
memcpy( inBuf,inBuf+AACENC_BLOCKSIZE,CORE_INPUT_OFFSET_PS*sizeof(float));
|
||||
|
||||
} else {
|
||||
reportEvent(10, "encode one AAC frame");
|
||||
AacEncEncode( aacEnc,
|
||||
inBuf+coreReadOffset,
|
||||
inBuf + coreReadOffset,
|
||||
MAX_CHANNELS,
|
||||
ancDataBytes,
|
||||
&numAncDataBytes,
|
||||
|
@ -249,6 +249,7 @@ aacPlusEncoder :: write ( const void * buf,
|
|||
adts_hdr_up(outBuf, numOutBytes);
|
||||
sink->write(outBuf, numOutBytes+ADTS_HEADER_SIZE);
|
||||
}
|
||||
|
||||
writtenSamples=0;
|
||||
|
||||
return samples;
|
||||
|
|
|
@ -78,8 +78,8 @@ extern "C" {
|
|||
/**
|
||||
* A class representing aacplus AAC+ encoder.
|
||||
*
|
||||
* @author $Author: tipok $
|
||||
* @version $Revision: 1 $
|
||||
* @author $Author$
|
||||
* @version $Revision$
|
||||
*/
|
||||
|
||||
#define CORE_DELAY (1600)
|
||||
|
|
Loading…
Reference in New Issue