Пример #1
0
void drmRx::init()
{
  avgSNR=0;
  avgSNRAvailable=false;
  n = DRMBUFSIZE;
  /* initialisations */
  demodulatorPtr->init();
  initGetmode( n / 4);
  rRation = 1.000;
  samplerate_offset_estimation = 0.0;
  runstate = RUN_STATE_POWER_ON;		/* POWER_ON */
  channel_decoding();
  runstate = RUN_STATE_INIT;		/* INIT */
  channel_decoding();
  runstate = RUN_STATE_FIRST;			/* FIRSTRUN */
  runstate = RUN_STATE_NORMAL;			/* NORMAL RUN */
  srcDecoder->init();
}
Пример #2
0
void DRMReceiver::DrmInit()
{
	m_n = DRMBUFSIZE;
	/* initialisations */
	demodulatorPtr->init();
	m_dataInputPtr->init(RXSTRIPE);
	initGetmode( m_n / 4);
	m_rRation = 1.000;
	samplerate_offset_estimation = 0.0;
	runstate = RUN_STATE_POWER_ON;		/* POWER_ON */
	channel_decoding();
	runstate = RUN_STATE_INIT;		/* INIT */
	channel_decoding();
	//////////////////////////////////////////////////////////////////////////////////////
	// channel_decoding() only looks for POWER_ON & INIT so FIRST & NORMAL are equal
	//////////////////////////////////////////////////////////////////////////////////////
	runstate = RUN_STATE_FIRST;			/* FIRSTRUN */
//	runstate = RUN_STATE_NORMAL;			/* NORMAL RUN */

	if(m_downSampleFilter==NULL)
	{
		m_downSampleFilter=new downsampleFilter(SAMPLINGSTRIPE,
															 downSampleFilterParam,
															 DSAMPLEFILTERLEN,
															 FALSE);
	}
	else
	{
		m_downSampleFilter->init();
	}
	m_sampleCounter=0;
	m_bufferCounter=0;
	m_rxHoldingBuffer.reset();
	vecrHammingWindow.resize(LEN_DS_INPUT_VECTOR);
	make_hamming_vec(vecrHammingWindow);
	fft.init(LEN_DS_INPUT_VECTOR);

}