~jaromil/freej/master

« back to all changes in this revision

Viewing changes to qt/qJackClient.cpp

  • Committer: fred
  • Date: 2011-03-28 09:38:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1549.
  • Revision ID: git-v1:bfca90554d5bc27c56a9d410120adaad45ccbb1b
Modified encoder sample rate to sync sound with video

- in QJackClient, modified sample rate parameter when creating the AudioCollector
object. This modify the vorbis speed when streaming.
Commented out ::chgSampleRate() since it is not used

- in init_info(), use again the skeleton.

- VideoEncoder::thread_loop(), shaws the shout delay for testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    return (false);
50
50
  }
51
51
 
52
 
  m_audio = new AudioCollector(1024, 48000, m_Jack);
 
52
  m_audio = new AudioCollector(1024, 48192, m_Jack);            //48240 seems to be a good value in my config
 
53
//   m_audio = new AudioCollector(1024, 48000, m_Jack);
53
54
  m_Jack->isEncoded(false);
54
55
  m_Enc = m_Qfreej->getEnc();
55
56
 
71
72
  m_Coef->setEnabled(false);
72
73
  layoutG->addWidget(m_Coef, 2, 0, 1, 2);
73
74
  m_Coef->setToolTip("sets the Mix coefficient between Jack Input and Video Layer output");
74
 
  
 
75
 
 
76
  //not used
75
77
  m_SampleRate = new QLineEdit;
76
 
  connect (m_SampleRate, SIGNAL(returnPressed()), this, SLOT(chgSampleRate()));
 
78
//   connect (m_SampleRate, SIGNAL(returnPressed()), this, SLOT(chgSampleRate()));
77
79
  m_SampleRate->setValidator(new QIntValidator(m_SampleRate));
78
80
  m_SampleRate->setText("48000");       //default Jackd sample rate
79
81
  m_SampleRate->setEnabled(false);
80
82
//   m_Jack->m_SampleRate = 48000;      //not necessary as it is donne in AudioCollector constructor
81
 
 
 
83
  //
82
84
  QLabel *vSampleRate = new QLabel("J SampleRate :");
83
85
  layoutG->addWidget(vSampleRate, 3, 0);
84
86
  layoutG->addWidget(m_SampleRate, 3, 1);
166
168
  }
167
169
}
168
170
 
169
 
void QJackClient::chgSampleRate()
170
 
{
171
 
  m_Jack->m_SampleRate = m_SampleRate->text().toInt();
172
 
}
 
171
// void QJackClient::chgSampleRate()
 
172
// {
 
173
//   m_Jack->m_SampleRate = m_SampleRate->text().toInt();
 
174
// }
173
175
 
174
176
int QJackClient::getSampleRate()
175
177
{