void RDExportSettingsDialog::formatData(const QString &str)
{
  RDSettings::Format fmt=RDSettings::Pcm16;

  fmt=GetFormat(str);
  bool ok;
  unsigned bitrate=lib_bitrate_box->currentText().toUInt(&ok);
  if(!ok) {
    bitrate=0;
  }
  ShowBitRates(fmt,lib_samprate_box->currentText().toInt(),
	       bitrate,lib_quality_spin->value());
}
AudioSettingsDialog::AudioSettingsDialog(AudioSettings *settings,bool mpeg,
			       QWidget *parent,const char *name)
  : QDialog(parent,name,true)
{
  lib_lib=settings;

  //
  // Dialog Name
  //
  setCaption(tr("Edit Settings"));

  //
  // Fix the Window Size
  //
  setMinimumWidth(sizeHint().width());
  setMaximumWidth(sizeHint().width());
  setMinimumHeight(sizeHint().height());
  setMaximumHeight(sizeHint().height());

  //
  // Generate Fonts
  //
  QFont font=QFont("Helvetica",12,QFont::Normal);
  font.setPixelSize(12);
  QFont button_font=QFont("Helvetica",12,QFont::Bold);
  button_font.setPixelSize(12);

  //
  // Default Format
  //
  lib_format_box=new QComboBox(this,"lib_name_edit");
  lib_format_box->setGeometry(150,10,150,20);
  lib_format_box->setFont(font);
  connect(lib_format_box,SIGNAL(activated(int)),this,SLOT(formatData(int)));
  QLabel *lib_format_label=new QLabel(lib_format_box,tr("Default &Format:"),
				      this,"lib_format_label");
  lib_format_label->setGeometry(25,10,120,20);
  lib_format_label->setFont(font);
  lib_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);

  //
  // Default Channels
  //
  lib_channels_box=new QComboBox(this,"lib_name_edit");
  lib_channels_box->setGeometry(150,32,60,20);
  lib_channels_box->setFont(font);
  QLabel *lib_channels_label=new QLabel(lib_channels_box,
					tr("Default &Channels:"),
					this,"lib_channels_label");
  lib_channels_label->setGeometry(25,32,120,20);
  lib_channels_label->setFont(font);
  lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);

  //
  // Default Sample Rate
  //
  lib_samprate_box=new QComboBox(this,"lib_name_edit");
  lib_samprate_box->setGeometry(150,54,100,20);
  lib_samprate_box->setFont(font);
  QLabel *lib_samprate_label=
    new QLabel(lib_samprate_box,tr("Default &Sample Rate:"),this,
	       "lib_samprate_label");
  lib_samprate_label->setGeometry(20,54,125,20);
  lib_samprate_label->setFont(font);
  lib_samprate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);

  //
  // Default Bitrate
  //
  lib_bitrate_box=new QComboBox(this,"lib_name_edit");
  lib_bitrate_box->setGeometry(150,76,100,20);
  lib_bitrate_box->setFont(font);
  QLabel *lib_bitrate_label=
    new QLabel(lib_bitrate_box,tr("Default &Bitrate:"),this,
	       "lib_bitrate_label");
  lib_bitrate_label->setGeometry(25,76,120,20);
  lib_bitrate_label->setFont(font);
  lib_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);

  //
  //  Ok Button
  //
  QPushButton *ok_button=new QPushButton(this,"ok_button");
  ok_button->setGeometry(145,108,80,50);
  ok_button->setDefault(true);
  ok_button->setFont(button_font);
  ok_button->setText(tr("&OK"));
  connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));

  //
  //  Cancel Button
  //
  QPushButton *cancel_button=new QPushButton(this,"cancel_button");
  cancel_button->setGeometry(235,108,80,50);
  cancel_button->setFont(button_font);
  cancel_button->setText(tr("&Cancel"));
  connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));

  //
  // Populate Fields
  //
  lib_format_box->insertItem(tr("PCM16"));
#ifdef HAVE_VORBIS
  lib_format_box->insertItem(tr("OggVorbis"));
#endif  // HAVE_VORBIS
  if(mpeg) {
    lib_format_box->insertItem(tr("MPEG Layer 2"));
    lib_format_box->insertItem(tr("MPEG Layer 3"));
  }
  QString str;
  switch(lib_lib->format()) {
      case AudioSettings::Pcm16:
	str="PCM16";
	break;

      case AudioSettings::OggVorbis:
	str="OggVorbis";
	break;

      case AudioSettings::Layer1:
	str="MPEG Layer 1";
	break;

      case AudioSettings::Layer2:
	str="MPEG Layer 2";
	break;

      case AudioSettings::Layer3:
	str="MPEG Layer 3";
	break;
  }
  for(int i=0;i<lib_format_box->count();i++) {
    if(lib_format_box->text(i)==str) {
      lib_format_box->setCurrentItem(i);
    }
  }
  lib_channels_box->insertItem("1");
  lib_channels_box->insertItem("2");
  lib_channels_box->setCurrentItem(lib_lib->channels()-1);
  lib_samprate_box->insertItem("32000");
  lib_samprate_box->insertItem("44100");
  lib_samprate_box->insertItem("48000");
  switch(lib_lib->sampleRate()) {
      case 32000:
	lib_samprate_box->setCurrentItem(0);
	break;

      case 44100:
	lib_samprate_box->setCurrentItem(1);
	break;

      case 48000:
	lib_samprate_box->setCurrentItem(2);
	break;
  }
  ShowBitRates(lib_lib->format(),lib_lib->bitRate());
}
void AudioSettingsDialog::formatData(int index)
{
  ShowBitRates(ReadFormat(),lib_lib->bitRate());
}
RDExportSettingsDialog::RDExportSettingsDialog(RDSettings *settings,
					       QWidget *parent)
  : QDialog(parent,"",true)
{
  lib_settings=settings;

  //
  // Generate Fonts
  //
  QFont button_font("helvetica",12,QFont::Bold);
  button_font.setPixelSize(12);

  //
  // Dialog Name
  //
  setCaption(tr("Edit Export Settings"));

  //
  // Default Format
  //
  lib_format_box=new QComboBox(this);
  lib_format_box->setGeometry(100,10,150,19);
  connect(lib_format_box,SIGNAL(activated(const QString &)),
	  this,SLOT(formatData(const QString &)));
  QLabel *lib_format_label=new QLabel(lib_format_box,"Format:",this);
  lib_format_label->setGeometry(25,10,70,19);
  lib_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

  //
  // Default Channels
  //
  lib_channels_box=new QComboBox(this);
  lib_channels_box->setGeometry(100,32,60,19);
  QLabel *lib_channels_label=
    new QLabel(lib_channels_box,tr("&Channels:"),this);
  lib_channels_label->setGeometry(25,32,70,19);
  lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

  //
  // Default Sample Rate
  //
  lib_samprate_box=new QComboBox(this);
  lib_samprate_box->setGeometry(100,54,100,19);
  connect(lib_samprate_box,SIGNAL(activated(const QString &)),
	  this,SLOT(samprateData(const QString &)));
  QLabel *lib_samprate_label=
    new QLabel(lib_samprate_box,tr("&Sample Rate:"),this);
  lib_samprate_label->setGeometry(25,54,75,19);
  lib_samprate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

  //
  // Default Bitrate
  //
  lib_bitrate_box=new QComboBox(this);
  lib_bitrate_box->setGeometry(100,76,100,19);
  connect(lib_bitrate_box,SIGNAL(activated(const QString &)),
	  this,SLOT(bitrateData(const QString &)));
  lib_bitrate_label=new QLabel(lib_bitrate_box,tr("&Bitrate:"),this);
  lib_bitrate_label->setGeometry(25,76,70,19);
  lib_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

  //
  // Quality
  //
  lib_quality_spin=new QSpinBox(this);
  lib_quality_spin->setGeometry(100,98,50,19);
  lib_quality_spin->setRange(0,10);
  lib_quality_label=new QLabel(lib_quality_spin,tr("&Quality:"),this);
  lib_quality_label->setGeometry(25,98,70,19);
  lib_quality_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

  //
  //  Ok Button
  //
  QPushButton *ok_button=new QPushButton(this);
  ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
  ok_button->setDefault(true);
  ok_button->setFont(button_font);
  ok_button->setText(tr("&OK"));
  connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));

  //
  //  Cancel Button
  //
  QPushButton *cancel_button=new QPushButton(this);
  cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
			     80,50);
  cancel_button->setFont(button_font);
  cancel_button->setText(tr("&Cancel"));
  connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));

  //
  // Populate Fields
  //
  lib_format_box->insertItem(tr("PCM16"));
  if(settings->format()==RDSettings::Pcm16) {
    lib_format_box->setCurrentItem(lib_format_box->count()-1);
  }
  lib_format_box->insertItem(tr("PCM24"));
  if(settings->format()==RDSettings::Pcm24) {
    lib_format_box->setCurrentItem(lib_format_box->count()-1);
  }
  if(rda->station()->haveCapability(RDStation::HaveFlac)) {
    lib_format_box->insertItem(tr("FLAC"));
    if(settings->format()==RDSettings::Flac) {
      lib_format_box->setCurrentItem(lib_format_box->count()-1);
    }
  }
  lib_format_box->insertItem(tr("MPEG Layer 2"));
  if(settings->format()==RDSettings::MpegL2) {
    lib_format_box->setCurrentItem(lib_format_box->count()-1);
  }
  if(rda->station()->haveCapability(RDStation::HaveLame)) {
    lib_format_box->insertItem(tr("MPEG Layer 3"));
    if(settings->format()==RDSettings::MpegL3) {
      lib_format_box->setCurrentItem(lib_format_box->count()-1);
    }
  }
  if(rda->station()->haveCapability(RDStation::HaveOggenc)) {
    lib_format_box->insertItem(tr("OggVorbis"));
    if(settings->format()==RDSettings::OggVorbis) {
      lib_format_box->setCurrentItem(lib_format_box->count()-1);
    }
  }
  lib_channels_box->insertItem("1");
  lib_channels_box->insertItem("2");
  lib_channels_box->setCurrentItem(lib_settings->channels()-1);
  lib_samprate_box->insertItem("16000");
  lib_samprate_box->insertItem("22050");
  lib_samprate_box->insertItem("24000");
  lib_samprate_box->insertItem("32000");
  lib_samprate_box->insertItem("44100");
  lib_samprate_box->insertItem("48000");
  for(int i=0;i<lib_samprate_box->count();i++) {
    if(lib_samprate_box->text(i).toUInt()==lib_settings->sampleRate()) {
      lib_samprate_box->setCurrentItem(i);
    }
  }
  ShowBitRates(lib_settings->format(),lib_settings->sampleRate(),
	       lib_settings->bitRate(),lib_settings->quality());
}
void RDExportSettingsDialog::samprateData(const QString &str)
{
  ShowBitRates(GetFormat(lib_format_box->currentText()),str.toInt(),
	       lib_bitrate_box->currentText().replace("kbps","").toInt(),
	       lib_quality_spin->value());
}
Exemplo n.º 6
0
EditRDLogedit::EditRDLogedit(RDStation *station,
			     QWidget *parent,const char *name)
  : QDialog(parent,name,true)
{
  //
  // Fix the Window Size
  //
  setMinimumWidth(sizeHint().width());
  setMaximumWidth(sizeHint().width());
  setMinimumHeight(sizeHint().height());
  setMaximumHeight(sizeHint().height());

  lib_lib=new RDLogeditConf(station->name());

  //
  // Create Fonts
  //
  QFont small_font=QFont("Helvetica",12,QFont::Bold);
  small_font.setPixelSize(12);
  QFont big_font=QFont("Helvetica",14,QFont::Bold);
  big_font.setPixelSize(14);

  //
  // Dialog Name
  //
  setCaption(tr("RDLogedit config for ")+station->name());

  //
  // Input Configuration
  //
  lib_input_card=new RDCardSelector(this,"lib_input_card");
  lib_input_card->setGeometry(10,29,120,117);
  QLabel *label=new QLabel(lib_input_card,tr("INPUT"),this,"lib_input_label");
  label->setGeometry(10,10,110,19);
  label->setFont(big_font);
  label->setAlignment(AlignCenter);

  //
  // Output Configuration
  //
  lib_output_card=new RDCardSelector(this,"lib_output_card");
  lib_output_card->setGeometry(170,29,120,87);
  label=new QLabel(lib_output_card,tr("OUTPUT"),this,"lib_output_label");
  label->setGeometry(170,10,110,19);
  label->setFont(big_font);
  label->setAlignment(AlignCenter);

  //
  // Settings
  //
  QLabel *setting_label=new QLabel(tr("Voice Tracker Settings"),this,"setting_label");
  setting_label->setGeometry(70,79,sizeHint().width()-80,19);
  setting_label->setFont(big_font);
  setting_label->setAlignment(AlignLeft|ShowPrefix);

  //
  // Maximum Record Length
  //
  lib_maxlength_time=new QTimeEdit(this,"lib_maxlength_time");
  lib_maxlength_time->setGeometry(160,100,85,19);
  QLabel *lib_maxlength_label=new QLabel(lib_maxlength_time,
					 tr("&Max Record Time:"),this,
					 "lib_maxlength_label");
  lib_maxlength_label->setGeometry(25,101,130,19);
  lib_maxlength_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);

  //
  // Autotrim Level
  //
  lib_threshold_spin=new QSpinBox(this,"lib_threshold_spin");
  lib_threshold_spin->setGeometry(160,124,50,19);
  lib_threshold_spin->setMinValue(-99);
  lib_threshold_spin->setMaxValue(0);
  label=new QLabel(lib_threshold_spin,tr("&AutoTrim Threshold:"),this,
		   "lib_threshold_spin_label");
  label->setGeometry(25,124,130,19);
  label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  label=new QLabel(tr("dbFS"),this,"lib_threshold_spin_unit");
  label->setGeometry(215,124,120,19);
  label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);

  //
  // Normalization Level
  //
  lib_normalization_spin=new QSpinBox(this,"lib_normalization_spin");
  lib_normalization_spin->setGeometry(160,148,50,19);
  lib_normalization_spin->setMinValue(-99);
  lib_normalization_spin->setMaxValue(0);
  label=new QLabel(lib_normalization_spin,tr("&Normalization Level:"),
		   this,"lib_normalization_spin_label");
  label->setGeometry(25,148,130,19);
  label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  label=new QLabel(tr("dbFS"),this,"lib_normalization_spin_unit");
  label->setGeometry(215,148,120,19);
  label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);

  //
  // Audio Margin
  //
  lib_preroll_spin=new QSpinBox(this,"lib_preroll_spin");
  lib_preroll_spin->setGeometry(160,172,60,19);
  lib_preroll_spin->setMinValue(0);
  lib_preroll_spin->setMaxValue(10000);
  lib_preroll_spin->setLineStep(100);
  QLabel *lib_preroll_spin_label=new QLabel(lib_preroll_spin,
					    tr("&Audio Margin:"),this,
					    "lib_preroll_spin_label");
  lib_preroll_spin_label->setGeometry(25,172,130,19);
  lib_preroll_spin_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  QLabel *lib_preroll_spin_unit=new QLabel(tr("milliseconds"),this,
					   "lib_preroll_spin_unit");
  lib_preroll_spin_unit->setGeometry(225,172,120,19);
  lib_preroll_spin_unit->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);

  //
  // Format
  //
  lib_format_box=new QComboBox(this,"lib_name_edit");
  lib_format_box->setGeometry(160,196,150,19);
  connect(lib_format_box,SIGNAL(activated(int)),this,SLOT(formatData(int)));
  QLabel *lib_format_label=new QLabel(lib_format_box,tr("&Format:"),this,
				      "lib_format_label");
  lib_format_label->setGeometry(25,196,130,19);
  lib_format_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);

  //
  // Sample Rate
  //
  lib_samprate_box=new QComboBox(this,"lib_name_edit");
  lib_samprate_box->setGeometry(160,220,100,19);
  QLabel *lib_samprate_label=new QLabel(lib_samprate_box,tr("&Sample Rate:"),
					this,"lib_samprate_label");
  lib_samprate_label->setGeometry(20,220,130,19);
  lib_samprate_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);

  //
  // Bitrate
  //
  lib_bitrate_box=new QComboBox(this,"lib_name_edit");
  lib_bitrate_box->setGeometry(160,244,130,19);
  QLabel *lib_bitrate_label=new QLabel(lib_bitrate_box,tr("&Bitrate:"),this,
				       "lib_bitrate_label");
  lib_bitrate_label->setGeometry(25,244,130,19);
  lib_bitrate_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);

  //
  // Validator
  //
  QIntValidator *validator=new QIntValidator(this,"validator");
  validator->setRange(1,999999);

  //
  // Play Start Cart
  //
  lib_startcart_edit=new QLineEdit(this,"lib_name_edit");
  lib_startcart_edit->setGeometry(160,268,70,19);
  lib_startcart_edit->setValidator(validator);
  QLabel *lib_startcart_label=
    new QLabel(lib_startcart_edit,tr("Play &Start Cart:"),this,
	       "lib_startcart_label");
  lib_startcart_label->setGeometry(25,268,130,19);
  lib_startcart_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  QPushButton *button=new QPushButton(this,"start_select_button");
  button->setGeometry(240,266,55,23);
  button->setText(tr("Select"));
  connect(button,SIGNAL(clicked()),this,SLOT(selectStartData()));

  //
  // Play End Cart
  //
  lib_endcart_edit=new QLineEdit(this,"lib_name_edit");
  lib_endcart_edit->setGeometry(160,292,70,19);
  lib_endcart_edit->setValidator(validator);
  QLabel *lib_endcart_label=
    new QLabel(lib_endcart_edit,tr("Play &End Cart:"),this,
	       "lib_endcart_label");
  lib_endcart_label->setGeometry(25,292,130,19);
  lib_endcart_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  button=new QPushButton(this,"end_select_button");
  button->setGeometry(240,290,55,23);
  button->setText(tr("Select"));
  connect(button,SIGNAL(clicked()),this,SLOT(selectEndData()));

  //
  // Record Start Cart
  //
  lib_recstartcart_edit=new QLineEdit(this,"lib_name_edit");
  lib_recstartcart_edit->setGeometry(160,316,70,19);
  lib_recstartcart_edit->setValidator(validator);
  QLabel *lib_recstartcart_label=
    new QLabel(lib_recstartcart_edit,tr("&Record Start Cart:"),this,
	       "lib_recstartcart_label");
  lib_recstartcart_label->setGeometry(25,316,130,19);
  lib_recstartcart_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  button=new QPushButton(this,"start_select_button");
  button->setGeometry(240,314,55,23);
  button->setText(tr("Select"));
  connect(button,SIGNAL(clicked()),this,SLOT(selectRecordStartData()));

  //
  // Record End Cart
  //
  lib_recendcart_edit=new QLineEdit(this,"lib_name_edit");
  lib_recendcart_edit->setGeometry(160,340,70,19);
  lib_recendcart_edit->setValidator(validator);
  QLabel *lib_recendcart_label=
    new QLabel(lib_recendcart_edit,tr("Re&cord End Cart:"),this,
	       "lib_recendcart_label");
  lib_recendcart_label->setGeometry(25,340,130,19);
  lib_recendcart_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  button=new QPushButton(this,"end_select_button");
  button->setGeometry(240,338,55,23);
  button->setText(tr("Select"));
  connect(button,SIGNAL(clicked()),this,SLOT(selectRecordEndData()));

  //
  // Default Channels
  //
  lib_channels_box=new QComboBox(this,"lib_name_edit");
  lib_channels_box->setGeometry(160,364,60,19);
  QLabel *lib_channels_label=new QLabel(lib_channels_box,tr("&Channels:"),this,
				       "lib_channels_label");
  lib_channels_label->setGeometry(25,364,130,19);
  lib_channels_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);

  //
  // Default Transition Type
  //
  lib_default_transtype_box=new QComboBox(this,"lib_name_edit");
  lib_default_transtype_box->setGeometry(160,388,100,19);
  QLabel *lib_default_transtype_label=
    new QLabel(lib_default_transtype_box,tr("Default Transition:"),
	       this,"lib_default_transtype_label");
  lib_default_transtype_label->setGeometry(20,388,130,19);
  lib_default_transtype_label->
    setAlignment(AlignRight|AlignVCenter|ShowPrefix);
  lib_default_transtype_box->insertItem(tr("Play"));
  lib_default_transtype_box->insertItem(tr("Segue"));
  lib_default_transtype_box->insertItem(tr("Stop"));

  //
  //  Ok Button
  //
  QPushButton *ok_button=new QPushButton(this,"ok_button");
  ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
  ok_button->setDefault(true);
  ok_button->setFont(small_font);
  ok_button->setText(tr("&OK"));
  connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));

  //
  //  Cancel Button
  //
  QPushButton *cancel_button=new QPushButton(this,"cancel_button");
  cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
			     80,50);
  cancel_button->setFont(small_font);
  cancel_button->setText(tr("&Cancel"));
  connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));

  //
  // Populate Fields
  //
  if(station->scanned()) {
    lib_input_card->setMaxCards(station->cards());
    lib_output_card->setMaxCards(station->cards());
    for(int i=0;i<lib_input_card->maxCards();i++) {
      lib_input_card->setMaxPorts(i,station->cardInputs(i));
      lib_output_card->setMaxPorts(i,station->cardOutputs(i));
    }
  }
  else {
    QMessageBox::information(this,tr("No Audio Configuration Data"),
			    tr("Channel assignments will not be available for this host, as audio resource data\nhas not yet been generated.  Please start the Rivendell daemons on this host\n(by executing, as user 'root',  the command \"/etc/init.d/rivendell start\")\nin order to populate the audio resources database."));
    lib_input_card->setDisabled(true);
    lib_output_card->setDisabled(true);
  }
  lib_input_card->setCard(lib_lib->inputCard());
  lib_input_card->setPort(lib_lib->inputPort());
  lib_output_card->setCard(lib_lib->outputCard());
  lib_output_card->setPort(lib_lib->outputPort());
  lib_maxlength_time->setTime(QTime().addMSecs(lib_lib->maxLength()));
  lib_threshold_spin->setValue(lib_lib->trimThreshold()/100);
  lib_normalization_spin->setValue(lib_lib->ripperLevel()/100);
  unsigned cart=lib_lib->startCart();
  if(cart>0) {
    lib_startcart_edit->setText(QString().sprintf("%06u",cart));
  }
  if((cart=lib_lib->endCart())>0) {
    lib_endcart_edit->setText(QString().sprintf("%06u",cart));
  }  
  cart=lib_lib->recStartCart();
  if(cart>0) {
    lib_recstartcart_edit->setText(QString().sprintf("%06u",cart));
  }
  if((cart=lib_lib->recEndCart())>0) {
    lib_recendcart_edit->setText(QString().sprintf("%06u",cart));
  }  
  lib_preroll_spin->setValue(lib_lib->tailPreroll());
  lib_format_box->insertItem(tr("PCM16"));
  lib_format_box->insertItem(tr("MPEG Layer 2"));
  lib_format_box->setCurrentItem(lib_lib->format());
  lib_channels_box->insertItem("1");
  lib_channels_box->insertItem("2");
  lib_channels_box->setCurrentItem(lib_lib->defaultChannels()-1);
  lib_samprate_box->insertItem("32000");
  lib_samprate_box->insertItem("44100");
  lib_samprate_box->insertItem("48000");
  switch(lib_lib->sampleRate()) {
      case 32000:
	lib_samprate_box->setCurrentItem(0);
	break;

      case 44100:
	lib_samprate_box->setCurrentItem(1);
	break;

      case 48000:
	lib_samprate_box->setCurrentItem(2);
	break;
  }
  ShowBitRates(lib_lib->format(),lib_lib->bitrate());
  lib_default_transtype_box->setCurrentItem(lib_lib->defaultTransType());
}
Exemplo n.º 7
0
void EditRDLogedit::formatData(int index)
{
  ShowBitRates(index,lib_lib->bitrate());
}