Пример #1
0
void ExportFFmpegWMAOptions::PopulateOrExchange(ShuttleGui & S)
{
   S.StartHorizontalLay(wxEXPAND, 0);
   {
      S.StartStatic(_("WMA Export Setup"), 0);
      {
         S.StartTwoColumn();
         {
            S.TieChoice(_("Bit Rate:"), wxT("/FileFormats/WMABitRate"), 
               180189, mBitRateNames, mBitRateLabels);
         }
         S.EndTwoColumn();
      }
      S.EndStatic();
   }
   S.EndHorizontalLay();

   S.AddStandardButtons();

   Layout();
   Fit();
   SetMinSize(GetSize());
   Center();

   return;
}
Пример #2
0
void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S)
{
   S.SetBorder(2);

   S.StartStatic(_("Temporary files directory"));
   {
      S.StartMultiColumn(3, wxEXPAND);
      {
         S.SetStretchyCol(1);

         S.Id(TempDirID);
         mTempDir = S.TieTextBox(_("&Location:"),
                                 wxT("/Directories/TempDir"),
                                 wxT(""),
                                 30);
         S.Id(ChooseButtonID);
         S.AddButton(_("C&hoose..."));

         S.AddFixedText(_("Free Space:"));
         mFreeSpace = S.AddVariableText(wxT(""));
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

#ifdef DEPRECATED_AUDIO_CACHE
   // See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
   S.StartStatic(_("Audio cache"));
   {
      S.TieCheckBox(_("Play and/or record using &RAM (useful for slow drives)"),
                    wxT("/Directories/CacheBlockFiles"),
                    false);

      S.StartTwoColumn();
      {
         S.TieNumericTextBox(_("Mi&nimum Free Memory (MB):"),
                             wxT("/Directories/CacheLowMem"),
                             16,
                             9);
      }
      S.EndTwoColumn();

      S.AddVariableText(_("If the available system memory falls below this value, audio will no longer\nbe cached in memory and will be written to disk."))->Wrap(600);
   }
   S.EndStatic();
#endif // DEPRECATED_AUDIO_CACHE
}
Пример #3
0
void WaveformPrefs::PopulateOrExchange(ShuttleGui & S)
{
   mPopulating = true;

   S.SetBorder(2);

   // S.StartStatic(_("Track Settings"));
   {
      mDefaultsCheckbox = 0;
      if (mWt) {
         /* i18n-hint: use is a verb */
         mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted);
      }

      S.StartStatic(_("Display"));
      {
         S.StartTwoColumn();
         {
            mScaleChoice =
               S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")),
                  *(int*)&mTempSettings.scaleType,
                  &mScaleChoices);

            mRangeChoice =
               S.Id(ID_RANGE).TieChoice(_("Waveform dB &range") + wxString(wxT(":")),
               *(int*)&mTempSettings.dBRange,
               &mRangeChoices);
            S.SetSizeHints(mRangeChoices);
         }
         S.EndTwoColumn();
      }
      S.EndStatic();
   }
   // S.EndStatic();

   /*
   S.StartStatic(_("Global settings"));
   {
   }
   S.EndStatic();
   */

   EnableDisableRange();

   mPopulating = false;
}
Пример #4
0
void NormalizeDialog::PopulateOrExchange(ShuttleGui & S)
{
   wxTextValidator vld(wxFILTER_NUMERIC);

   S.StartHorizontalLay(wxCENTER, false);
   {
      S.AddTitle(_("by Dominic Mazzoni"));
   }
   S.EndHorizontalLay();

   S.StartHorizontalLay(wxCENTER, false);
   {
      // Add a little space
   }
   S.EndHorizontalLay();

   S.StartTwoColumn();
   {
      S.StartVerticalLay(false);
      {
         mDCCheckBox = S.Id(ID_DC_REMOVE).AddCheckBox(_("Remove any DC offset (center on 0.0 vertically)"),
                                     mDC ? wxT("true") : wxT("false"));
   
         mGainCheckBox = S.Id(ID_NORMALIZE_AMPLITUDE).AddCheckBox(_("Normalize maximum amplitude to:"),
                                       mGain ? wxT("true") : wxT("false"));
   
         S.StartHorizontalLay(wxALIGN_CENTER, false);
         {
            mLevelTextCtrl = S.Id(ID_LEVEL_TEXT).AddTextBox(wxT(""), wxT(""), 10);
            mLevelTextCtrl->SetValidator(vld);
            mLevelTextCtrl->SetName(_("Maximum amplitude dB"));
            mLeveldB = S.AddVariableText(_("dB"), false,
                                         wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
            mWarning = S.AddVariableText( wxT(""), false,
                                         wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
         }
         S.EndHorizontalLay();
         mStereoIndCheckBox = S.AddCheckBox(_("Normalize stereo channels independently"),
                                     mStereoInd ? wxT("true") : wxT("false"));
      }
      S.EndVerticalLay();
   }
   S.EndTwoColumn();
}
Пример #5
0
void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S)
{
   S.SetBorder(2);

   S.StartStatic(_("Temporary files directory"));
   {
      S.StartMultiColumn(3, wxEXPAND);
      {
         S.SetStretchyCol(1);

         S.Id(TempDirID);
         mTempDir = S.TieTextBox(_("Location:"),
                                 wxT("/Directories/TempDir"),
                                 wxT(""),
                                 30);
         S.Id(ChooseButtonID);
         S.AddButton(_("Choose..."));

         S.AddFixedText(_("Free Space:"));
         mFreeSpace = S.AddVariableText(wxT(""));
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

   S.StartStatic(_("Audio cache"));
   {
      S.TieCheckBox(_("Play and/or record using RAM (useful for slow drives)"),
                    wxT("/Directories/CacheBlockFiles"),
                    false);

      S.StartTwoColumn();
      {
         S.TieTextBox(_("Minimum Free Memory (MB):"),
                      wxT("/Directories/CacheLowMem"),
                      16,
                      9);
      }
      S.EndTwoColumn();

      S.AddVariableText(_("If the available system memory falls below this value, audio will no longer\nbe cached in memory and will be written to disk."))->Wrap(600);
   }
   S.EndStatic();
}
Пример #6
0
void WaveformPrefs::PopulateOrExchange(ShuttleGui & S)
{
    mPopulating = true;

    S.SetBorder(2);

    // S.StartStatic(_("Track Settings"));
    {
        mDefaultsCheckbox = 0;
        if (mWt) {
            /* i18n-hint: use is a verb */
            mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("Use Preferences"), mDefaulted);
        }

        S.StartStatic(_("Display"));
        {
            S.StartTwoColumn();
            {
                S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")),
                                         *(int*)&mTempSettings.scaleType,
                                         &mScaleChoices);
            }
            S.EndTwoColumn();
        }
        S.EndStatic();
    }
    // S.EndStatic();

    /*
    S.StartStatic(_("Global settings"));
    {
    }
    S.EndStatic();
    */

    S.StartMultiColumn(2, wxALIGN_RIGHT);
    {
        S.Id(ID_APPLY).AddButton(_("Appl&y"));
    }
    S.EndMultiColumn();

    mPopulating = false;
}
Пример #7
0
void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
{
   mPopulating = true;

   S.SetBorder(2);

   // S.StartStatic(_("Track Settings"));
   // {

   mDefaultsCheckbox = 0;
   if (mWt) {
      /* i18n-hint: use is a verb */
      mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("Use Preferences"), mDefaulted);
   }

   S.StartStatic(_("Scale"));
   {
      S.StartTwoColumn();
      {
         S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")),
            *(int*)&mTempSettings.scaleType,
            &mScaleChoices);

         mMinFreq =
            S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&nimum Frequency (Hz):"),
            mTempSettings.minFreq,
            12);

         mMaxFreq =
            S.Id(ID_MAXIMUM).TieNumericTextBox(_("Ma&ximum Frequency (Hz):"),
            mTempSettings.maxFreq,
            12);
      }
      S.EndTwoColumn();
   }
   S.EndStatic();

   S.StartStatic(_("Colors"));
   {
      S.StartTwoColumn();
      {
         mGain =
            S.Id(ID_GAIN).TieNumericTextBox(_("&Gain (dB):"),
            mTempSettings.gain,
            8);

         mRange =
            S.Id(ID_RANGE).TieNumericTextBox(_("&Range (dB):"),
            mTempSettings.range,
            8);

         mFrequencyGain =
            S.Id(ID_FREQUENCY_GAIN).TieNumericTextBox(_("Frequency g&ain (dB/dec):"),
            mTempSettings.frequencyGain,
            4);
      }

      S.Id(ID_GRAYSCALE).TieCheckBox(_("S&how the spectrum using grayscale colors"),
         mTempSettings.isGrayscale);

      S.EndTwoColumn();
   }
   S.EndStatic();

   S.StartStatic(_("Algorithm"));
   {
      S.StartMultiColumn(2);
      {
         mAlgorithmChoice =
            S.Id(ID_ALGORITHM).TieChoice(_("A&lgorithm") + wxString(wxT(":")),
            *(int*)&mTempSettings.algorithm,
            &mAlgorithmChoices);

         S.Id(ID_WINDOW_SIZE).TieChoice(_("Window &size:"),
            mTempSettings.windowSize,
            &mSizeChoices);
         S.SetSizeHints(mSizeChoices);

         S.Id(ID_WINDOW_TYPE).TieChoice(_("Window &type:"),
            mTempSettings.windowType,
            &mTypeChoices);
         S.SetSizeHints(mTypeChoices);

#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
         mZeroPaddingChoiceCtrl =
            S.Id(ID_PADDING_SIZE).TieChoice(_("&Zero padding factor") + wxString(wxT(":")),
            mTempSettings.zeroPaddingFactor,
            &mZeroPaddingChoices);
         S.SetSizeHints(mZeroPaddingChoices);
#endif
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

#ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH
   S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble Spectral Selection"),
      mTempSettings.spectralSelection);
#endif

#ifdef EXPERIMENTAL_FFT_Y_GRID
         S.TieCheckBox(_("Show a grid along the &Y-axis"),
            mTempSettings.fftYGrid);
#endif //EXPERIMENTAL_FFT_Y_GRID

#ifdef EXPERIMENTAL_FIND_NOTES
      /* i18n-hint: FFT stands for Fast Fourier Transform and probably shouldn't be translated*/
      S.StartStatic(_("FFT Find Notes"));
      {
         S.StartTwoColumn();
         {
            mFindNotesMinA =
               S.TieNumericTextBox(_("Minimum Amplitude (dB):"),
               mTempSettings.fftFindNotes,
               8);

            mFindNotesN =
               S.TieNumericTextBox(_("Max. Number of Notes (1..128):"),
               mTempSettings.findNotesMinA,
               8);
         }
         S.EndTwoColumn();

         S.TieCheckBox(_("&Find Notes"),
            mTempSettings.numberOfMaxima);

         S.TieCheckBox(_("&Quantize Notes"),
            mTempSettings.findNotesQuantize);
      }
      S.EndStatic();
#endif //EXPERIMENTAL_FIND_NOTES
   // S.EndStatic();

#ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH
   S.StartStatic(_("Global settings"));
   {
      S.TieCheckBox(_("Ena&ble spectral selection"),
         SpectrogramSettings::Globals::Get().spectralSelection);
   }
   S.EndStatic();
#endif

   EnableDisableSTFTOnlyControls();

   mPopulating = false;
}
Пример #8
0
void QualityPrefs::PopulateOrExchange( ShuttleGui & S )
{
   S.SetBorder( 2 );
   S.StartStatic(_("Sampling"),0 );
   {
      S.StartTwoColumn();
      S.AddPrompt( _("Default Sample Rate:") );
      DefineSampleRateControl( S ); // A tricky control.
      S.TieChoice(_("Default Sample Format:"),
         wxT("/SamplingRate/DefaultProjectSampleFormat"),
         floatSample, mmSampleFormatNames, mmSampleFormatLabels );

// JKC For the old style of layout, uncomment the next line.
// #define OLD_STYLE_LAYOUT
// Once we've chosen which layout to use we'll remove the 
// other one.  (June/2006).
#ifdef OLD_STYLE_LAYOUT
      S.TieChoice(_("Real-time sample rate converter:"),
         wxT("/Quality/LibresampleSampleRateConverter"),
         (int)0, mConverterNames, mConverterLabels),
      S.TieChoice(_("High-quality sample rate converter:"),
         wxT("/Quality/LibresampleHQSampleRateConverter"),
         (int)1, mConverterNames, mConverterLabels),
      S.TieChoice(_("Real-time dither:"),
         wxT("/Quality/DitherAlgorithm"),
         Dither::none, mmDitherNames, mmDitherLabels );  
      S.TieChoice(_("High-quality dither:"),
         wxT("/Quality/HQDitherAlgorithm"),
         Dither::shaped, mmDitherNames, mmDitherLabels );  
#endif
      S.EndTwoColumn();
   }
   S.EndStatic();

// The new style of layout has 
//   - columns for converter and dither.
//   - rows for Real-time and High-quality.
#ifndef OLD_STYLE_LAYOUT
   S.StartStatic( _("Conversion") );
   {
      // We use blank labels here and there to end up with
      // a three column layout.
      S.StartMultiColumn(3);
      S.AddFixedText(wxT(""));
      S.AddTitle(_("Sample Rate Converter" ));
      S.AddTitle(_("Dither"));
      S.TieChoice(_("Real-time:"),
         wxT("/Quality/LibresampleSampleRateConverter"),
         (int)0, mConverterNames, mConverterLabels),
      S.TieChoice(wxT(""),
         wxT("/Quality/DitherAlgorithm"),
         Dither::none, mmDitherNames, mmDitherLabels );  
      S.TieChoice(_("High-quality:"),
         wxT("/Quality/LibresampleHQSampleRateConverter"),
         (int)1, mConverterNames, mConverterLabels),
      S.TieChoice(wxT(""),
         wxT("/Quality/HQDitherAlgorithm"),
         Dither::shaped, mmDitherNames, mmDitherLabels );  
      S.EndMultiColumn();
   }
   S.EndStatic();
#endif
}
Пример #9
0
/// This PopulateOrExchange function is a good example of mixing the fully
/// automatic style of reading/writing from GUI to prefs with the partial form.
///
/// You'll notice that some of the Tie functions have Prefs identifiers in them
/// and others don't.
void LibraryPrefs::PopulateOrExchange(ShuttleGui & S)
{
   S.SetBorder(2);
   S.StartStatic(_("MP3 Export Library"));
   {
      S.StartTwoColumn();
      {
         S.AddVariableText(_("MP3 Library Version:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
         mMP3Version = S.AddVariableText(wxT("9.99"),
                                         true,
                                         wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
         S.AddVariableText(_("MP3 Library:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
         wxButton *locate_button = S.Id(ID_MP3_FIND_BUTTON).AddButton(_("&Locate..."),
                                            wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
         S.AddVariableText(_("LAME MP3 Library:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
         wxButton *download_button = S.Id(ID_MP3_DOWN_BUTTON).AddButton(_("&Download"),
                                            wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#ifdef DISABLE_DYNAMIC_LOADING_LAME
         locate_button->Enable(FALSE);
         download_button->Enable(FALSE);
#else
        (void)locate_button;
        (void)download_button;
#endif // DISABLE_DYNAMIC_LOADING_LAME
      }
      S.EndTwoColumn();
   }
   S.EndStatic();

   S.StartStatic(_("FFmpeg Import/Export Library"));
   {
      S.StartTwoColumn();
      {
         S.AddVariableText(_("FFmpeg Library Version:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
#if defined(USE_FFMPEG)
         mFFmpegVersion = S.AddVariableText(_("No compatible FFmpeg library was found"),
                                            true,
                                            wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#else
         mFFmpegVersion = S.AddVariableText(wxT("FFmpeg support is not compiled in"),
                                            true,
                                            wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#endif
         S.AddVariableText(_("FFmpeg Library:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
         S.Id(ID_FFMPEG_FIND_BUTTON);
         wxButton *bfnd = S.AddButton(_("Loca&te..."),
                                      wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
         S.AddVariableText(_("FFmpeg Library:"),
                           true,
                           wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
         S.Id(ID_FFMPEG_DOWN_BUTTON);
         wxButton *bdwn = S.AddButton(_("Dow&nload"),
                                      wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#if !defined(USE_FFMPEG) || defined(DISABLE_DYNAMIC_LOADING_FFMPEG)
         bdwn->Enable(FALSE);
         bfnd->Enable(FALSE);
#else
         // fix compilation warnings about unused variables
         bfnd, bdwn;
#endif
      }
      S.EndTwoColumn();
#ifdef EXPERIMENTAL_OD_FFMPEG
      wxCheckBox* checkbox = S.TieCheckBox(_("Allow &background on-demand loading"),
                    wxT("/Library/FFmpegOnDemand"),
                    false);
#if !defined(USE_FFMPEG)
      checkbox->Enable(FALSE);
#endif
#endif
   }
   S.EndStatic();
}
Пример #10
0
void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
{
   S.SetBorder(2);

   S.StartStatic(_("FFT Window"));
   {
      S.StartMultiColumn(2);
      {
         S.TieChoice(_("Window size") + wxString(wxT(":")),
                     wxT("/Spectrum/FFTSize"), 
                     256,
                     mSizeChoices,
                     mSizeCodes);
         S.SetSizeHints(mSizeChoices);

         S.TieChoice(_("Window type") + wxString(wxT(":")),
                     wxT("/Spectrum/WindowType"), 
                     3,
                     mTypeChoices,
                     mTypeCodes);
         S.SetSizeHints(mTypeChoices);
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
   wxArrayString wskipn;
   wxArrayInt wskipv;

   for (size_t i = 0; i < 7; i++) {
      wskipn.Add(wxString::Format(wxT("%d"), (1 << i) - 1));
      wskipv.Add((1 << i) - 1);
   }

   S.StartStatic(_("FFT Skip Points"));
   {
      S.StartMultiColumn(2);
      {
         S.TieChoice(_("Skip Points") + wxString(wxT(":")),
                     wxT("/Spectrum/FFTSkipPoints"),
                     0,
                     wskipn,
                     wskipv);
         S.SetSizeHints(wskipn);
      }
      S.EndMultiColumn();
   }
   S.EndStatic();
#endif //EXPERIMENTAL_FFT_SKIP_POINTS

   S.StartStatic(_("Display"));
   {
      S.StartTwoColumn();
      {
         mMinFreq =
            S.TieTextBox(_("Minimum Frequency (Hz):"),
                         wxT("/Spectrum/MinFreq"),
                         0,
                         12);

         mMaxFreq =
            S.TieTextBox(_("Maximum Frequency (Hz):"),
                         wxT("/Spectrum/MaxFreq"),
                         8000,
                         12);

         mGain =
            S.TieTextBox(_("Gain (dB):"),
                         wxT("/Spectrum/Gain"),
                         20,
                         8);

         mRange =
            S.TieTextBox(_("Range (dB):"),
                         wxT("/Spectrum/Range"),
                         80,
                         8);

         mFrequencyGain =
            S.TieTextBox(_("Frequency gain: (dB/dec)"),
                    wxT("/Spectrum/FrequencyGain"),
                    0,
                    4);
      }
      S.EndTwoColumn();

      S.TieCheckBox(_("Show the spectrum using &grayscale colors"),
                    wxT("/Spectrum/Grayscale"),
                    false);

#ifdef EXPERIMENTAL_FFT_Y_GRID
      S.TieCheckBox(_("Show a grid along the &Y-axis"),
                    wxT("/Spectrum/FFTYGrid"),
                    false);
#endif //EXPERIMENTAL_FFT_Y_GRID
   }
   S.EndStatic();

#ifdef EXPERIMENTAL_FIND_NOTES
   S.StartStatic(_("FFT Find Notes"));
   {
      S.StartTwoColumn();
      {
         mFindNotesMinA =
            S.TieTextBox(_("Minimum Amplitude (dB):"),
                         wxT("/Spectrum/FindNotesMinA"),
                         -30L,
                         8);

         mFindNotesN =
            S.TieTextBox(_("Max. Number of Notes (1..128):"),
                         wxT("/Spectrum/FindNotesN"),
                         5L,
                         8);
      }
      S.EndTwoColumn();

      S.TieCheckBox(_("&Find Notes"),
                    wxT("/Spectrum/FFTFindNotes"),
                    false);

      S.TieCheckBox(_("&Quantize Notes"),
                    wxT("/Spectrum/FindNotesQuantize"),
                    false);
   }
   S.EndStatic();
#endif //EXPERIMENTAL_FIND_NOTES
}
Пример #11
0
void SpectrumPrefs::PopulateOrExchange( ShuttleGui & S )
{
   wxArrayString windowTypeList;

   for(int i=0; i<NumWindowFuncs(); i++)
      windowTypeList.Add(WindowFuncName(i));

   S.SetBorder( 2 );
   S.StartHorizontalLay(wxEXPAND, 0 );
   S.StartStatic( _("FFT Size"), 0 );
   {
      S.StartRadioButtonGroup( wxT("/Spectrum/FFTSize"), 256 );
      S.TieRadioButton( _("8 - most wideband"),     8);
      S.TieRadioButton( wxT("16"),                  16);
      S.TieRadioButton( wxT("32"),                  32);
      S.TieRadioButton( wxT("64"),                  64);
      S.TieRadioButton( wxT("128"),                 128);
      S.TieRadioButton( _("256 - default"),         256);
      S.TieRadioButton( wxT("512"),                 512);
      S.TieRadioButton( wxT("1024"),                1024);
      S.TieRadioButton( wxT("2048"),                2048);
#ifdef EXPERIMENTAL_FIND_NOTES
      S.TieRadioButton( wxT("4096"),                4096);
      S.TieRadioButton( wxT("8192"),                8192);
      S.TieRadioButton( wxT("16384"),               16384);
      S.TieRadioButton( _("32768 - most narrowband"),32768);
#else
      S.TieRadioButton( _("4096 - most narrowband"),4096);
#endif //LOGARITHMIC_SPECTRUM
      S.EndRadioButtonGroup();

      // add choice for windowtype
      S.StartMultiColumn(2, wxCENTER);
      {
         S.TieChoice( _("Window type:"), windowType,  &windowTypeList);
         S.SetSizeHints(-1,-1);
      }
      S.EndMultiColumn();
   }
   S.EndStatic();

#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
   S.StartHorizontalLay(wxEXPAND, 0 );
   S.StartStatic( _("FFT Skip Points"), 0 );
   {
      S.StartRadioButtonGroup(wxT("/Spectrum/FFTSkipPoints"), 0);
      S.TieRadioButton(wxT("0"), 0);
      S.TieRadioButton(wxT("1"), 1);
      S.TieRadioButton(wxT("3"), 3);
      S.TieRadioButton(wxT("7"), 7);
      S.TieRadioButton(wxT("15"), 15);
      S.TieRadioButton(wxT("31"), 31);
      S.TieRadioButton(wxT("63"), 63);
      S.EndRadioButtonGroup();
   }
   S.EndStatic();
#endif //EXPERIMENTAL_FFT_SKIP_POINTS

   S.StartStatic( _("Display"),1 );
   {
      // JC: For layout of mixtures of controls I prefer checkboxes on the right,
      // with everything in two columns over what we have here.
      S.TieCheckBox( _("&Grayscale"), wxT("/Spectrum/Grayscale"), false);
      S.StartTwoColumn(); // 2 cols because we have a control with a separate label.
      S.Id(ID_MINFREQUENCY).TieTextBox(
         _("Minimum Frequency (Hz):"), // prompt
         minFreqStr, // String to exchange with
         12 // max number of characters (used to size the control).
         );
      S.Id(ID_MAXFREQUENCY).TieTextBox(
         _("Maximum Frequency (Hz):"), // prompt
         maxFreqStr, // String to exchange with
         12 // max number of characters (used to size the control).
         );
      S.EndTwoColumn();
#ifdef EXPERIMENTAL_FFT_Y_GRID
      S.TieCheckBox( _("&Y-Grid"), wxT("/Spectrum/FFTYGrid"), false);
#endif //EXPERIMENTAL_FFT_Y_GRID
#ifdef EXPERIMENTAL_FIND_NOTES
      S.TieCheckBox( _("&Find Notes"), wxT("/Spectrum/FFTFindNotes"), false);
      S.TieCheckBox( _("&Quantize Notes"), wxT("/Spectrum/FindNotesQuantize"), false);
      S.StartTwoColumn(); // 2 cols because we have a control with a separate label.
      S.Id(ID_FIND_NOTES_MIN_A).TieTextBox(
         _("Minimum Amplitude (dB):"), // prompt
         findNotesMinAStr, // String to exchange with
         8 // max number of characters (used to size the control).
         );
      S.Id(ID_FIND_NOTES_N).TieTextBox(
         _("Max. Number of Notes (1..128):"), // prompt
         findNotesNStr, // String to exchange with
         8 // max number of characters (used to size the control).
         );
      S.EndTwoColumn();
#endif //EXPERIMENTAL_FIND_NOTES
   }
   S.EndStatic();
   S.EndHorizontalLay();
}
Пример #12
0
void ExportFFmpegOptions::PopulateOrExchange(ShuttleGui & S)
{
   S.StartVerticalLay(1);
   S.StartMultiColumn(7, wxEXPAND);
   {
      S.SetStretchyCol(1);
      mPresetCombo = S.Id(FEPresetID).AddCombo(_("Preset:"), gPrefs->Read(wxT("/FileFormats/FFmpegPreset"),wxEmptyString), mPresetNames);
      mLoadPreset = S.Id(FELoadPresetID).AddButton(_("Load Preset"));
      mSavePreset = S.Id(FESavePresetID).AddButton(_("Save Preset"));
      mDeletePreset = S.Id(FEDeletePresetID).AddButton(_("Delete Preset"));
      mImportPresets = S.Id(FEImportPresetsID).AddButton(_("Import Presets"));
      mExportPresets = S.Id(FEExportPresetsID).AddButton(_("Export Presets"));
   }
   S.EndMultiColumn();
   S.StartTwoColumn();
   {
      S.Id(FEFormatLabelID).AddVariableText(_("Format:"));
      mFormatName = S.Id(FEFormatNameID).AddVariableText(wxT(""));
      S.Id(FECodecLabelID).AddVariableText(_("Codec:"));
      mCodecName = S.Id(FECodecNameID).AddVariableText(wxT(""));
   }
   S.EndTwoColumn();
   S.AddVariableText(_("Not all formats and codecs are compatible. Some parameters (such as bitrate and samplerate) combinations are not compatible with some codecs too."),false);
   S.StartMultiColumn(3,wxEXPAND);
   {
      S.AddVariableText(_("Format selector:"),true);
      S.AddVariableText(_("Codec selector:"),true);
      S.AddVariableText(wxEmptyString);
      S.Id(FEAllFormatsID).AddButton(_("Show All Formats"));
      S.Id(FEAllCodecsID).AddButton(_("Show All Codecs"));
      S.AddVariableText(wxEmptyString);
      mFormatList = S.Id(FEFormatID).AddListBox(&mFormatNames);
      mCodecList = S.Id(FECodecID).AddListBox(&mCodecNames);
      mFormatList->DeselectAll();
      mCodecList->DeselectAll();

      S.StartStatic(wxT("Options"),0);
      {
         S.StartMultiColumn(4,wxALIGN_LEFT);
         {
            mLanguageText = S.Id(FELanguageID).TieTextBox(_("Language:"), wxT("/FileFormats/FFmpegLanguage"), wxEmptyString, 0);
            mLanguageText->SetToolTip(_("ISO 639 3-letter language code\nOptional\nempty - automatic"));

            mTag = S.Id(FETagID).TieTextBox(_("Tag:"), wxT("/FileFormats/FFmpegTag"), wxEmptyString, 0);
            mTag->SetToolTip(_("Codec tag (FOURCC)\nOptional\nempty - automatic"));

            mBitrateSpin = S.Id(FEBitrateID).TieSpinCtrl(_("Bit Rate:"), wxT("/FileFormats/FFmpegBitRate"), 0,1000000,0);
            mBitrateSpin->SetToolTip(_("Bit Rate (bits/second) - influences the resulting file size and quality\nSome codecs may only accept specific values (128k, 192k, 256k etc)\n0 - automatic\nRecommended - 192000"));

            mQualitySpin = S.Id(FEQualityID).TieSpinCtrl(_("Quality:"), wxT("/FileFormats/FFmpegQuality"), 0,500,-1);
            mQualitySpin->SetToolTip(_("Overral quality, used differently by different codecs\nRequired for vorbis\n0 - automatic\n-1 - off (use bitrate instead)"));

            mSampleRateSpin = S.Id(FESampleRateID).TieSpinCtrl(_("Sample Rate:"), wxT("/FileFormats/FFmpegSampleRate"), 0,200000,0);
            mSampleRateSpin->SetToolTip(_("Sample rate (Hz)\n0 - don't change sample rate"));

            mCutoffSpin = S.Id(FECutoffID).TieSpinCtrl(_("Cutoff Bandwidth:"), wxT("/FileFormats/FFmpegCutOff"), 0,10000000,0);
            mCutoffSpin->SetToolTip(_("Audio cutoff bandwidth (Hz)\nOptional\n0 - automatic\n"));

            S.AddVariableText(wxT("Use Bit Reservoir"));
            S.Id(FEBitReservoirID).TieCheckBox(wxEmptyString, wxT("/FileFormats/FFmpegBitReservoir"), true);

            mProfileChoice = S.Id(FEProfileID).TieChoice(_("Profile:"), wxT("/FileFormats/FFmpegAACProfile"), 
               mProfileLabels[0], mProfileNames, mProfileLabels);
            mProfileChoice->SetToolTip(_("AAC Profile\nLow Complexity -default\nMost players won't play anything other than LC"));


         }
         S.EndMultiColumn();
         S.StartStatic(wxT("FLAC options"),0);
         {
            S.StartMultiColumn(4);
            {
               mCompressionLevelSpin = S.Id(FECompLevelID).TieSpinCtrl(_("Compression Level:"), wxT("/FileFormats/FFmpegCompLevel"), 0,10,-1);
               mCompressionLevelSpin->SetToolTip(_("Compression level\nRequired for FLAC\n-1 - automatic\nmin - 0 (fast encoding, large output file)\nmax - 10 (slow encoding, small output file)"));

               mFrameSizeSpin =  S.Id(FEFrameSizeID).TieSpinCtrl(_("Frame Size:"), wxT("/FileFormats/FFmpegFrameSize"), 0,65535,0);
               mFrameSizeSpin->SetToolTip(_("Frame size\nOptional\n0 - default\nmin - 16\nmax - 65535"));

               mLPCCoeffsPrecisionSpin = S.Id(FELPCCoeffsID).TieSpinCtrl(_("LPC coefficients precision"), wxT("/FileFormats/FFmpegLPCCoefPrec"), 0,15,0);
               mLPCCoeffsPrecisionSpin->SetToolTip(_("LPC coefficients precision\nOptional\n0 - default\nmin - 1\nmax - 15"));

               mMinPredictionOrderSpin = S.Id(FEMinPredID).TieSpinCtrl(_("Minimal prediction order"), wxT("/FileFormats/FFmpegMinPredOrder"), -1,32,-1);
               mMinPredictionOrderSpin->SetToolTip(_("Minimal prediction order\nOptional\n-1 - default\nmin - 0\nmax - 32 (with LPC) or 4 (without LPC)"));

               mMaxPredictionOrderSpin = S.Id(FEMaxPredID).TieSpinCtrl(_("Maximal prediction order"), wxT("/FileFormats/FFmpegMaxPredOrder"), -1,32,-1);
               mMaxPredictionOrderSpin->SetToolTip(_("Maximal prediction order\nOptional\n-1 - default\nmin - 0\nmax - 32 (with LPC) or 4 (without LPC)"));

               mPredictionOrderMethodChoice = S.Id(FEPredOrderID).TieChoice(_("Prediction Order Method:"), wxT("/FileFormats/FFmpegPredOrderMethod"), 
                  mPredictionOrderMethodLabels[4], mPredictionOrderMethodNames, mPredictionOrderMethodLabels);
               mProfileChoice->SetToolTip(_("Prediction Order Method\nEstimate - fastest, lower compression\nLog search - slowest, best compression\nFull search - default"));

               mMinPartitionOrderSpin = S.Id(FEMinPartOrderID).TieSpinCtrl(_("Minimal partition order"), wxT("/FileFormats/FFmpegMinPartOrder"), -1,8,-1);
               mMinPartitionOrderSpin->SetToolTip(_("Minimal partition order\nOptional\n-1 - default\nmin - 0\nmax - 8"));

               mMaxPartitionOrderSpin = S.Id(FEMaxPartOrderID).TieSpinCtrl(_("Maximal partition order"), wxT("/FileFormats/FFmpegMaxPredOrder"), -1,8,-1);
               mMaxPartitionOrderSpin->SetToolTip(_("Maximal partition order\nOptional\n-1 - default\nmin - 0\nmax - 8"));

               S.AddVariableText(wxT("Use LPC"));
               S.Id(FEUseLPCID).TieCheckBox(wxEmptyString, wxT("/FileFormats/FFmpegUseLPC"), true);
               
            }
            S.EndMultiColumn();
         }
         S.EndStatic();
         S.StartStatic(wxT("MPEG container options"),0);
         {
            S.StartMultiColumn(4);
            {
               mMuxRate = S.Id(FEMuxRateID).TieSpinCtrl(_("Mux Rate:"), wxT("/FileFormats/FFmpegMuxRate"), 0,10000000,0);
               mMuxRate->SetToolTip(_("Maximum bit rate of the multiplexed stream\nOptional\n0 - default"));

               mPacketSize = S.Id(FEPacketSizeID).TieSpinCtrl(_("Packet Size:"), wxT("/FileFormats/FFmpegPacketSize"), 0,10000000,0);
               mPacketSize->SetToolTip(_("Packet size\nOptional\n0 - default"));
            }
            S.EndMultiColumn();
         }
         S.EndStatic();
      }
      S.EndStatic();
   }
   S.EndTwoColumn();
   S.EndVerticalLay();

   S.AddStandardButtons();

   Layout();
   Fit();
   SetMinSize(GetSize());
   Center();

   return;
}