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[0]));
|
||||||
InitIIR21_Resampler(&(IIR21_reSampler[1]));
|
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");
|
throw Exception(__FILE__, __LINE__, "IIR21 resampler delay is bigger then MAX_DS_FILTER_DELAY");
|
||||||
}
|
|
||||||
writeOffset += IIR21_reSampler[0].delay*MAX_CHANNELS;
|
writeOffset += IIR21_reSampler[0].delay*MAX_CHANNELS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,9 +110,8 @@ aacPlusEncoder :: open ( void )
|
||||||
config.bandWidth=bandwidth;
|
config.bandWidth=bandwidth;
|
||||||
|
|
||||||
/* set up SBR configuration */
|
/* 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");
|
throw Exception(__FILE__, __LINE__, "No valid SBR configuration found");
|
||||||
}
|
|
||||||
|
|
||||||
InitializeSbrDefaults (&sbrConfig);
|
InitializeSbrDefaults (&sbrConfig);
|
||||||
sbrConfig.usePs = useParametricStereo;
|
sbrConfig.usePs = useParametricStereo;
|
||||||
|
@ -182,10 +180,12 @@ aacPlusEncoder :: write ( const void * buf,
|
||||||
|
|
||||||
reportEvent(10, "converting short to float");
|
reportEvent(10, "converting short to float");
|
||||||
short *TimeDataPcm = (short *) buf;
|
short *TimeDataPcm = (short *) buf;
|
||||||
|
|
||||||
for (i=0; i<samples; i++)
|
for (i=0; i<samples; i++)
|
||||||
inBuf[i+writeOffset+writtenSamples] = (float) TimeDataPcm[i];
|
inBuf[i+writeOffset+writtenSamples] = (float) TimeDataPcm[i];
|
||||||
writtenSamples+=samples;
|
writtenSamples+=samples;
|
||||||
reportEvent(10, "writtenSamples", writtenSamples);
|
reportEvent(10, "writtenSamples", writtenSamples);
|
||||||
|
|
||||||
if (writtenSamples < inSamples)
|
if (writtenSamples < inSamples)
|
||||||
return samples;
|
return samples;
|
||||||
|
|
||||||
|
@ -211,6 +211,7 @@ aacPlusEncoder :: write ( const void * buf,
|
||||||
inBuf+ch,
|
inBuf+ch,
|
||||||
&outSamples,
|
&outSamples,
|
||||||
MAX_CHANNELS);
|
MAX_CHANNELS);
|
||||||
|
|
||||||
reportEvent(10, "outSamples=", outSamples);
|
reportEvent(10, "outSamples=", outSamples);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +225,6 @@ aacPlusEncoder :: write ( const void * buf,
|
||||||
&numAncDataBytes,
|
&numAncDataBytes,
|
||||||
(unsigned *) (outBuf+ADTS_HEADER_SIZE),
|
(unsigned *) (outBuf+ADTS_HEADER_SIZE),
|
||||||
&numOutBytes);
|
&numOutBytes);
|
||||||
|
|
||||||
if(hEnvEnc)
|
if(hEnvEnc)
|
||||||
memcpy( inBuf,inBuf+AACENC_BLOCKSIZE,CORE_INPUT_OFFSET_PS*sizeof(float));
|
memcpy( inBuf,inBuf+AACENC_BLOCKSIZE,CORE_INPUT_OFFSET_PS*sizeof(float));
|
||||||
|
|
||||||
|
@ -249,6 +249,7 @@ aacPlusEncoder :: write ( const void * buf,
|
||||||
adts_hdr_up(outBuf, numOutBytes);
|
adts_hdr_up(outBuf, numOutBytes);
|
||||||
sink->write(outBuf, numOutBytes+ADTS_HEADER_SIZE);
|
sink->write(outBuf, numOutBytes+ADTS_HEADER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
writtenSamples=0;
|
writtenSamples=0;
|
||||||
|
|
||||||
return samples;
|
return samples;
|
||||||
|
|
|
@ -78,8 +78,8 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* A class representing aacplus AAC+ encoder.
|
* A class representing aacplus AAC+ encoder.
|
||||||
*
|
*
|
||||||
* @author $Author: tipok $
|
* @author $Author$
|
||||||
* @version $Revision: 1 $
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CORE_DELAY (1600)
|
#define CORE_DELAY (1600)
|
||||||
|
|
Loading…
Reference in New Issue