52 setWindowTitle( tr(
"Mixer Settings" ) );
54 setMinimumSize( width(), height() );
62 panLawComboBox->addItem( tr(
"------ Linear pan parameter ------"), QVariant( -10000 ) );
63 qobject_cast< QStandardItemModel * >( panLawComboBox->model() )->item( 0 )->setEnabled(
false );
67 panLawComboBox->addItem( tr(
"Constant k-Norm (Custom dB compensation)"),
69 panLawComboBox->insertSeparator(100);
72 panLawComboBox->addItem( tr(
"------ Polar pan parameter ------"), QVariant( -10000 ) );
73 qobject_cast< QStandardItemModel * >( panLawComboBox->model() )->item( 6 )->setEnabled(
false );
77 panLawComboBox->addItem( tr(
"Constant k-Norm (Custom dB compensation)"),
79 panLawComboBox->insertSeparator(100);
82 panLawComboBox->addItem( tr(
"------ Ratio pan parameter ------"), QVariant( -10000 ) );
83 qobject_cast< QStandardItemModel * >( panLawComboBox->model() )->item( 12 )->setEnabled(
false );
87 panLawComboBox->addItem( tr(
"Constant k-Norm (Custom dB compensation)"),
89 panLawComboBox->insertSeparator(100);
92 panLawComboBox->addItem( tr(
"------ Quadratic pan parameter ------"), QVariant( -10000 ) );
93 qobject_cast< QStandardItemModel * >( panLawComboBox->model() )->item( 18 )->setEnabled(
false );
97 panLawComboBox->addItem( tr(
"Constant k-Norm (Custom dB compensation)"),
100 panLawComboBox->setCurrentIndex( panLawComboBox->findData( pSong->getPanLawType() ) );
102 panLawComboBox->setToolTip( tr(
"Relationship between the sound's apparent image position and the pan knob control"
105 connect(panLawComboBox, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
panLawChanged() ));
110 QValidator *validator =
new QDoubleValidator( -10000., 0., 20,
this );
111 dBCompensationLineEdit->setValidator( validator );
112 dBCompensationLineEdit->setText( QString(
"%1" ).arg( -6.0206 / pSong->getPanLawKNorm() ) );
115 setFixedSize( width(), height() );
139 pSong->setPanLawType( ( panLawComboBox->currentData() ).toInt( &bOk ) );
142 float fdBCenterCompensation = ( dBCompensationLineEdit->text() ).replace(
",",
"." ).toFloat( &bOk );
144 QMessageBox::information(
this,
"Hydrogen", tr(
"dB Center Compensation rejected" ) );
146 }
else if ( fdBCenterCompensation > -0.01 ) {
150 QMessageBox::information(
this,
"Hydrogen", tr(
"dB Center Compensation must be less than -0.01" ) );
156 pSong->setPanLawKNorm( - 6.0206 / fdBCenterCompensation );