mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
This should fix bug #1111
In addition it adds an option to open the full FFmpeg options dialog.
This commit is contained in:
parent
4cd7757cf4
commit
617e0713df
@ -297,7 +297,6 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
Exporter::Exporter()
|
Exporter::Exporter()
|
||||||
{
|
{
|
||||||
mActivePage = NULL;
|
|
||||||
mMixerSpec = NULL;
|
mMixerSpec = NULL;
|
||||||
|
|
||||||
SetFileDialogTitle( _("Export Audio") );
|
SetFileDialogTitle( _("Export Audio") );
|
||||||
@ -871,37 +870,22 @@ void Exporter::CreateUserPaneCallback(wxWindow *parent, wxUIntPtr userdata)
|
|||||||
|
|
||||||
void Exporter::CreateUserPane(wxWindow *parent)
|
void Exporter::CreateUserPane(wxWindow *parent)
|
||||||
{
|
{
|
||||||
mUserPaneParent = parent;
|
|
||||||
|
|
||||||
ShuttleGui S(parent, eIsCreatingFromPrefs);
|
ShuttleGui S(parent, eIsCreatingFromPrefs);
|
||||||
|
|
||||||
wxSize maxsz;
|
|
||||||
wxSize pageMax;
|
|
||||||
|
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
S.StartHorizontalLay(wxEXPAND);
|
S.StartHorizontalLay(wxEXPAND);
|
||||||
{
|
{
|
||||||
S.StartStatic(_("Format Options"), 1);
|
S.StartStatic(_("Format Options"), 1);
|
||||||
{
|
{
|
||||||
|
mBook = new wxSimplebook(parent);
|
||||||
|
S.AddWindow(mBook, wxEXPAND);
|
||||||
|
|
||||||
for (size_t i = 0; i < mPlugins.GetCount(); i++)
|
for (size_t i = 0; i < mPlugins.GetCount(); i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < mPlugins[i]->GetFormatCount(); j++)
|
for (int j = 0; j < mPlugins[i]->GetFormatCount(); j++)
|
||||||
{
|
{
|
||||||
wxWindow *page = mPlugins[i]->OptionsCreate(parent, j);
|
mBook->AddPage(mPlugins[i]->OptionsCreate(mBook, j), wxEmptyString);
|
||||||
mPages.Add(page);
|
|
||||||
S.Prop(1).AddWindow(page, wxEXPAND|wxALL);
|
|
||||||
|
|
||||||
parent->Layout();
|
|
||||||
wxSize sz = parent->GetBestSize();
|
|
||||||
maxsz.x = wxMax(maxsz.x, sz.x);
|
|
||||||
maxsz.y = wxMax(maxsz.y, sz.y);
|
|
||||||
|
|
||||||
sz = page->GetBestSize();
|
|
||||||
pageMax.x = wxMax(pageMax.x, sz.x);
|
|
||||||
pageMax.y = wxMax(pageMax.y, sz.y);
|
|
||||||
|
|
||||||
S.GetSizer()->Hide(page);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -911,14 +895,6 @@ void Exporter::CreateUserPane(wxWindow *parent)
|
|||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
parent->SetMinSize(maxsz);
|
|
||||||
parent->SetSize(maxsz);
|
|
||||||
|
|
||||||
for (size_t i = 0, cnt = mPages.GetCount(); i < cnt; i++)
|
|
||||||
{
|
|
||||||
mPages[i]->SetSize(pageMax);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,20 +902,12 @@ void Exporter::OnFilterChanged(wxFileCtrlEvent & evt)
|
|||||||
{
|
{
|
||||||
int index = evt.GetFilterIndex();
|
int index = evt.GetFilterIndex();
|
||||||
|
|
||||||
if (index < 0 || index >= (int) mPages.GetCount())
|
if (index < 0 || index >= (int) mBook->GetPageCount())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mActivePage)
|
mBook->ChangeSelection(index);
|
||||||
{
|
|
||||||
mActivePage->Hide();
|
|
||||||
mActivePage = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
mActivePage = mPages[index];
|
|
||||||
mActivePage->Show();
|
|
||||||
mUserPaneParent->Layout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
|
#include <wx/simplebook.h>
|
||||||
#include "../Tags.h"
|
#include "../Tags.h"
|
||||||
#include "../SampleFormat.h"
|
#include "../SampleFormat.h"
|
||||||
|
|
||||||
@ -194,9 +195,7 @@ private:
|
|||||||
int mChannels;
|
int mChannels;
|
||||||
bool mSelectedOnly;
|
bool mSelectedOnly;
|
||||||
|
|
||||||
wxWindow *mUserPaneParent;
|
wxSimplebook *mBook;
|
||||||
WindowPtrArray mPages;
|
|
||||||
wxWindow *mActivePage;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE();
|
DECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
@ -46,6 +46,8 @@ public:
|
|||||||
virtual ~ExportCLOptions();
|
virtual ~ExportCLOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
void OnBrowse(wxCommandEvent & event);
|
void OnBrowse(wxCommandEvent & event);
|
||||||
|
|
||||||
@ -79,24 +81,16 @@ ExportCLOptions::ExportCLOptions(wxWindow *parent, int WXUNUSED(format))
|
|||||||
false);
|
false);
|
||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
|
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
|
|
||||||
parent->Layout();
|
parent->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportCLOptions::~ExportCLOptions()
|
ExportCLOptions::~ExportCLOptions()
|
||||||
{
|
{
|
||||||
wxString cmd = mCmd->GetValue();
|
TransferDataFromWindow();
|
||||||
|
|
||||||
gPrefs->Write(wxT("/FileFormats/ExternalProgramExportCommand"), cmd);
|
|
||||||
gPrefs->Flush();
|
|
||||||
|
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
|
||||||
PopulateOrExchange(S);
|
|
||||||
|
|
||||||
mHistory.AddFileToHistory(cmd, false);
|
|
||||||
mHistory.Save(*gPrefs, wxT("/FileFormats/ExternalProgramHistory"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -136,9 +130,31 @@ void ExportCLOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.AddTitle(_("Data will be piped to standard in. \"%f\" uses the file name in the export window."));
|
S.AddTitle(_("Data will be piped to standard in. \"%f\" uses the file name in the export window."));
|
||||||
}
|
}
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
}
|
||||||
|
|
||||||
// Layout();
|
///
|
||||||
// Fit();
|
///
|
||||||
|
bool ExportCLOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportCLOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
wxString cmd = mCmd->GetValue();
|
||||||
|
|
||||||
|
mHistory.AddFileToHistory(cmd, false);
|
||||||
|
mHistory.Save(*gPrefs, wxT("/FileFormats/ExternalProgramHistory"));
|
||||||
|
|
||||||
|
gPrefs->Write(wxT("/FileFormats/ExternalProgramExportCommand"), cmd);
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -1002,12 +1002,7 @@ wxWindow *ExportFFmpeg::OptionsCreate(wxWindow *parent, int format)
|
|||||||
}
|
}
|
||||||
else if (mSubFormat == FMT_OTHER)
|
else if (mSubFormat == FMT_OTHER)
|
||||||
{
|
{
|
||||||
return ExportPlugin::OptionsCreate(parent, format);
|
return new ExportFFmpegCustomOptions(parent, format);
|
||||||
#if 0
|
|
||||||
ExportFFmpegOptions od(parent);
|
|
||||||
od.ShowModal();
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExportPlugin::OptionsCreate(parent, format);
|
return ExportPlugin::OptionsCreate(parent, format);
|
||||||
|
@ -152,12 +152,13 @@ ExportFFmpegAC3Options::ExportFFmpegAC3Options(wxWindow *parent, int WXUNUSED(fo
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFFmpegAC3Options::~ExportFFmpegAC3Options()
|
ExportFFmpegAC3Options::~ExportFFmpegAC3Options()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -180,6 +181,25 @@ void ExportFFmpegAC3Options::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAC3Options::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAC3Options::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportFFmpegAACOptions Class
|
// ExportFFmpegAACOptions Class
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -189,12 +209,13 @@ ExportFFmpegAACOptions::ExportFFmpegAACOptions(wxWindow *parent, int WXUNUSED(fo
|
|||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFFmpegAACOptions::~ExportFFmpegAACOptions()
|
ExportFFmpegAACOptions::~ExportFFmpegAACOptions()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -218,6 +239,25 @@ void ExportFFmpegAACOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAACOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAACOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportFFmpegAMRNBOptions Class
|
// ExportFFmpegAMRNBOptions Class
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -238,12 +278,13 @@ ExportFFmpegAMRNBOptions::ExportFFmpegAMRNBOptions(wxWindow *parent, int WXUNUSE
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFFmpegAMRNBOptions::~ExportFFmpegAMRNBOptions()
|
ExportFFmpegAMRNBOptions::~ExportFFmpegAMRNBOptions()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -266,6 +307,25 @@ void ExportFFmpegAMRNBOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAMRNBOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegAMRNBOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportFFmpegWMAOptions Class
|
// ExportFFmpegWMAOptions Class
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -288,12 +348,13 @@ ExportFFmpegWMAOptions::ExportFFmpegWMAOptions(wxWindow *parent, int WXUNUSED(fo
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFFmpegWMAOptions::~ExportFFmpegWMAOptions()
|
ExportFFmpegWMAOptions::~ExportFFmpegWMAOptions()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -316,6 +377,86 @@ void ExportFFmpegWMAOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegWMAOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegWMAOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// ExportFFmpegCustomOptions Class
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define OpenID 9000
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(ExportFFmpegCustomOptions, wxPanel)
|
||||||
|
EVT_BUTTON(OpenID, ExportFFmpegCustomOptions::OnOpen)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
ExportFFmpegCustomOptions::ExportFFmpegCustomOptions(wxWindow *parent, int WXUNUSED(format))
|
||||||
|
: wxPanel(parent, wxID_ANY)
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
ExportFFmpegCustomOptions::~ExportFFmpegCustomOptions()
|
||||||
|
{
|
||||||
|
TransferDataFromWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
void ExportFFmpegCustomOptions::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
{
|
||||||
|
S.StartHorizontalLay(wxCENTER);
|
||||||
|
{
|
||||||
|
S.StartHorizontalLay(wxCENTER, 0);
|
||||||
|
{
|
||||||
|
S.Id(OpenID).AddButton(_("Open custom FFmpeg format options"));
|
||||||
|
}
|
||||||
|
S.EndHorizontalLay();
|
||||||
|
}
|
||||||
|
S.EndHorizontalLay();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegCustomOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFFmpegCustomOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
void ExportFFmpegCustomOptions::OnOpen(wxCommandEvent & WXUNUSED(evt))
|
||||||
|
{
|
||||||
|
ExportFFmpegOptions od(wxGetTopLevelParent(this));
|
||||||
|
od.ShowModal();
|
||||||
|
}
|
||||||
|
|
||||||
FFmpegPreset::FFmpegPreset(wxString &name)
|
FFmpegPreset::FFmpegPreset(wxString &name)
|
||||||
{
|
{
|
||||||
mPresetName = name;
|
mPresetName = name;
|
||||||
|
@ -63,7 +63,11 @@ public:
|
|||||||
|
|
||||||
ExportFFmpegAC3Options(wxWindow *parent, int format);
|
ExportFFmpegAC3Options(wxWindow *parent, int format);
|
||||||
virtual ~ExportFFmpegAC3Options();
|
virtual ~ExportFFmpegAC3Options();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
/// Bit Rates supported by AC3 encoder
|
/// Bit Rates supported by AC3 encoder
|
||||||
static const int iAC3BitRates[];
|
static const int iAC3BitRates[];
|
||||||
/// Sample Rates supported by AC3 encoder (must end with zero-element)
|
/// Sample Rates supported by AC3 encoder (must end with zero-element)
|
||||||
@ -85,7 +89,10 @@ public:
|
|||||||
|
|
||||||
ExportFFmpegAACOptions(wxWindow *parent, int format);
|
ExportFFmpegAACOptions(wxWindow *parent, int format);
|
||||||
virtual ~ExportFFmpegAACOptions();
|
virtual ~ExportFFmpegAACOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -98,7 +105,10 @@ public:
|
|||||||
|
|
||||||
ExportFFmpegAMRNBOptions(wxWindow *parent, int format);
|
ExportFFmpegAMRNBOptions(wxWindow *parent, int format);
|
||||||
virtual ~ExportFFmpegAMRNBOptions();
|
virtual ~ExportFFmpegAMRNBOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
static int iAMRNBBitRate[];
|
static int iAMRNBBitRate[];
|
||||||
|
|
||||||
@ -117,7 +127,10 @@ public:
|
|||||||
|
|
||||||
ExportFFmpegWMAOptions(wxWindow *parent, int format);
|
ExportFFmpegWMAOptions(wxWindow *parent, int format);
|
||||||
~ExportFFmpegWMAOptions();
|
~ExportFFmpegWMAOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
static const int iWMASampleRates[];
|
static const int iWMASampleRates[];
|
||||||
static const int iWMABitRate[];
|
static const int iWMABitRate[];
|
||||||
@ -131,6 +144,24 @@ private:
|
|||||||
int mBitRateFromChoice;
|
int mBitRateFromChoice;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ExportFFmpegCustomOptions : public wxPanel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
ExportFFmpegCustomOptions(wxWindow *parent, int format);
|
||||||
|
~ExportFFmpegCustomOptions();
|
||||||
|
|
||||||
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
|
void OnOpen(wxCommandEvent & evt);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE();
|
||||||
|
};
|
||||||
|
|
||||||
/// Entry for the Applicability table
|
/// Entry for the Applicability table
|
||||||
struct ApplicableFor
|
struct ApplicableFor
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,11 @@ class ExportFLACOptions : public wxPanel
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
ExportFLACOptions(wxWindow *parent, int format);
|
ExportFLACOptions(wxWindow *parent, int format);
|
||||||
|
virtual ~ExportFLACOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -62,6 +66,15 @@ ExportFLACOptions::ExportFLACOptions(wxWindow *parent, int WXUNUSED(format))
|
|||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
ExportFLACOptions::~ExportFLACOptions()
|
||||||
|
{
|
||||||
|
TransferDataFromWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -103,6 +116,25 @@ void ExportFLACOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFLACOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportFLACOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportFLAC Class
|
// ExportFLAC Class
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -86,8 +86,11 @@ class ExportMP2Options : public wxPanel
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ExportMP2Options(wxWindow *parent, int format);
|
ExportMP2Options(wxWindow *parent, int format);
|
||||||
|
virtual ~ExportMP2Options();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxArrayString mBitRateNames;
|
wxArrayString mBitRateNames;
|
||||||
@ -107,6 +110,15 @@ ExportMP2Options::ExportMP2Options(wxWindow *parent, int WXUNUSED(format))
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
ExportMP2Options::~ExportMP2Options()
|
||||||
|
{
|
||||||
|
TransferDataFromWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -129,6 +141,25 @@ void ExportMP2Options::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportMP2Options::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportMP2Options::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportMP2
|
// ExportMP2
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -267,6 +267,9 @@ public:
|
|||||||
virtual ~ExportMP3Options();
|
virtual ~ExportMP3Options();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
void OnSET(wxCommandEvent& evt);
|
void OnSET(wxCommandEvent& evt);
|
||||||
void OnVBR(wxCommandEvent& evt);
|
void OnVBR(wxCommandEvent& evt);
|
||||||
void OnABR(wxCommandEvent& evt);
|
void OnABR(wxCommandEvent& evt);
|
||||||
@ -312,25 +315,15 @@ ExportMP3Options::ExportMP3Options(wxWindow *parent, int WXUNUSED(format))
|
|||||||
{
|
{
|
||||||
InitMP3_Statics();
|
InitMP3_Statics();
|
||||||
|
|
||||||
mSetRate = gPrefs->Read(wxT("/FileFormats/MP3SetRate"), PRESET_STANDARD);
|
|
||||||
mVbrRate = gPrefs->Read(wxT("/FileFormats/MP3VbrRate"), QUALITY_4);
|
|
||||||
mAbrRate = gPrefs->Read(wxT("/FileFormats/MP3AbrRate"), 128);
|
|
||||||
mCbrRate = gPrefs->Read(wxT("/FileFormats/MP3CbrRate"), 128);
|
|
||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportMP3Options::~ExportMP3Options()
|
ExportMP3Options::~ExportMP3Options()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3SetRate"), mSetRate);
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3VbrRate"), mVbrRate);
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3AbrRate"), mAbrRate);
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3CbrRate"), mCbrRate);
|
|
||||||
gPrefs->Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -425,6 +418,32 @@ void ExportMP3Options::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportMP3Options::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
mSetRate = gPrefs->Read(wxT("/FileFormats/MP3SetRate"), PRESET_STANDARD);
|
||||||
|
mVbrRate = gPrefs->Read(wxT("/FileFormats/MP3VbrRate"), QUALITY_4);
|
||||||
|
mAbrRate = gPrefs->Read(wxT("/FileFormats/MP3AbrRate"), 128);
|
||||||
|
mCbrRate = gPrefs->Read(wxT("/FileFormats/MP3CbrRate"), 128);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ExportMP3Options::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Write(wxT("/FileFormats/MP3SetRate"), mSetRate);
|
||||||
|
gPrefs->Write(wxT("/FileFormats/MP3VbrRate"), mVbrRate);
|
||||||
|
gPrefs->Write(wxT("/FileFormats/MP3AbrRate"), mAbrRate);
|
||||||
|
gPrefs->Write(wxT("/FileFormats/MP3CbrRate"), mCbrRate);
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
void ExportMP3Options::OnSET(wxCommandEvent& WXUNUSED(event))
|
void ExportMP3Options::OnSET(wxCommandEvent& WXUNUSED(event))
|
||||||
|
@ -79,7 +79,7 @@ enum {
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(ExportMultiple, wxDialog)
|
BEGIN_EVENT_TABLE(ExportMultiple, wxDialog)
|
||||||
EVT_CHOICE(FormatID, ExportMultiple::OnFormat)
|
EVT_CHOICE(FormatID, ExportMultiple::OnFormat)
|
||||||
EVT_BUTTON(OptionsID, ExportMultiple::OnOptions)
|
// EVT_BUTTON(OptionsID, ExportMultiple::OnOptions)
|
||||||
EVT_BUTTON(CreateID, ExportMultiple::OnCreate)
|
EVT_BUTTON(CreateID, ExportMultiple::OnCreate)
|
||||||
EVT_BUTTON(ChooseID, ExportMultiple::OnChoose)
|
EVT_BUTTON(ChooseID, ExportMultiple::OnChoose)
|
||||||
EVT_BUTTON(wxID_OK, ExportMultiple::OnExport)
|
EVT_BUTTON(wxID_OK, ExportMultiple::OnExport)
|
||||||
@ -115,6 +115,8 @@ ExportMultiple::ExportMultiple(AudacityProject *project)
|
|||||||
|
|
||||||
this->CountTracksAndLabels();
|
this->CountTracksAndLabels();
|
||||||
|
|
||||||
|
mBook = NULL;
|
||||||
|
|
||||||
// create array of characters not allowed in file names
|
// create array of characters not allowed in file names
|
||||||
wxString forbid = wxFileName::GetForbiddenChars();
|
wxString forbid = wxFileName::GetForbiddenChars();
|
||||||
for(unsigned int i=0; i < forbid.Length(); i++)
|
for(unsigned int i=0; i < forbid.Length(); i++)
|
||||||
@ -244,8 +246,21 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
|
|||||||
|
|
||||||
|
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
|
S.StartHorizontalLay(wxEXPAND, true);
|
||||||
|
{
|
||||||
|
S.SetBorder(5);
|
||||||
|
S.StartStatic(_("Export files to:"), true);
|
||||||
|
{
|
||||||
S.StartMultiColumn(4, true);
|
S.StartMultiColumn(4, true);
|
||||||
{
|
{
|
||||||
|
mDir = S.Id(DirID)
|
||||||
|
.TieTextBox(_("Folder:"),
|
||||||
|
wxT("/Export/MultiplePath"),
|
||||||
|
gPrefs->Read(wxT("/Export/Path"), ::wxGetCwd()),
|
||||||
|
64);
|
||||||
|
S.Id(ChooseID).AddButton(_("Choose..."));
|
||||||
|
S.Id(CreateID).AddButton(_("Create"));
|
||||||
|
|
||||||
wxArrayString formats;
|
wxArrayString formats;
|
||||||
|
|
||||||
for (size_t i = 0; i < mPlugins.GetCount(); i++) {
|
for (size_t i = 0; i < mPlugins.GetCount(); i++) {
|
||||||
@ -256,69 +271,84 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mFormat = S.Id(FormatID)
|
mFormat = S.Id(FormatID)
|
||||||
.TieChoice(_("Export format:"),
|
.TieChoice(_("Format:"),
|
||||||
wxT("/Export/MultipleFormat"),
|
wxT("/Export/MultipleFormat"),
|
||||||
mPlugins[mPluginIndex]->GetFormat(mSubFormatIndex),
|
mPlugins[mPluginIndex]->GetFormat(mSubFormatIndex),
|
||||||
formats,
|
formats,
|
||||||
formats);
|
formats);
|
||||||
S.Id(OptionsID).AddButton(_("Options..."));
|
S.AddVariableText(wxT(""), false);
|
||||||
S.AddVariableText(wxT(""), false);
|
S.AddVariableText(wxT(""), false);
|
||||||
|
|
||||||
mDir = S.Id(DirID)
|
S.AddPrompt(_("Options:"));
|
||||||
.TieTextBox(_("Export location:"),
|
if (!mBook)
|
||||||
wxT("/Export/MultiplePath"),
|
{
|
||||||
gPrefs->Read(wxT("/Export/Path"), ::wxGetCwd()),
|
mBook = new wxSimplebook(S.GetParent(), OptionsID, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC);
|
||||||
64);
|
for (size_t i = 0; i < mPlugins.GetCount(); i++)
|
||||||
S.Id(ChooseID).AddButton(_("Choose..."));
|
{
|
||||||
S.Id(CreateID).AddButton(_("Create"));
|
for (int j = 0; j < mPlugins[i]->GetFormatCount(); j++)
|
||||||
|
{
|
||||||
|
mBook->AddPage(mPlugins[i]->OptionsCreate(mBook, j), wxEmptyString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mBook->ChangeSelection(mFormat->GetSelection());
|
||||||
|
}
|
||||||
|
S.AddWindow(mBook);
|
||||||
|
S.AddVariableText(wxT(""), false);
|
||||||
|
S.AddVariableText(wxT(""), false);
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
}
|
||||||
|
S.EndStatic();
|
||||||
|
}
|
||||||
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
S.StartHorizontalLay(wxEXPAND, true);
|
S.StartHorizontalLay(wxEXPAND, false);
|
||||||
{
|
{
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
S.StartStatic(_("Split files based on:"), true);
|
S.StartStatic(_("Split files based on:"), 1);
|
||||||
{
|
{
|
||||||
// Row 1
|
// Row 1
|
||||||
S.SetBorder(1);
|
S.SetBorder(1);
|
||||||
mLabel = S.Id(LabelID).AddRadioButton(wxString(_("Labels")));
|
mTrack = S.Id(TrackID)
|
||||||
|
.AddRadioButton(wxString(_("Tracks")));
|
||||||
|
mTrack->SetName(_("Tracks"));
|
||||||
|
|
||||||
|
// Row 2
|
||||||
|
S.SetBorder(1);
|
||||||
|
mLabel = S.Id(LabelID).AddRadioButtonToGroup(wxString(_("Labels")));
|
||||||
mLabel->SetName(_("Labels"));
|
mLabel->SetName(_("Labels"));
|
||||||
S.SetBorder(3);
|
S.SetBorder(3);
|
||||||
|
|
||||||
S.StartMultiColumn(2, false);
|
S.StartMultiColumn(2, wxEXPAND);
|
||||||
S.SetStretchyCol(1);
|
S.SetStretchyCol(1);
|
||||||
{
|
{
|
||||||
// Row 2 (indented)
|
// Row 3 (indented)
|
||||||
S.AddVariableText(wxT(" "), false);
|
S.AddVariableText(wxT(" "), false);
|
||||||
mFirst = S.Id(FirstID)
|
mFirst = S.Id(FirstID)
|
||||||
.AddCheckBox(_("Include audio before first label"), wxT("false"));
|
.AddCheckBox(_("Include audio before first label"), wxT("false"));
|
||||||
|
|
||||||
// Row 3
|
// Row 4
|
||||||
S.AddVariableText(wxT(""), false);
|
S.AddVariableText(wxT(""), false);
|
||||||
S.StartHorizontalLay(wxEXPAND, false);
|
S.StartMultiColumn(2, wxEXPAND);
|
||||||
|
S.SetStretchyCol(1);
|
||||||
{
|
{
|
||||||
mFirstFileLabel = S.AddVariableText(_("First file name:"), true);
|
mFirstFileLabel = S.AddVariableText(_("First file name:"), false);
|
||||||
mFirstFileName = S.Id(FirstFileNameID)
|
mFirstFileName = S.Id(FirstFileNameID)
|
||||||
.TieTextBox(wxT(""),
|
.Prop(1).TieTextBox(wxT(""),
|
||||||
name,
|
name,
|
||||||
30);
|
30);
|
||||||
mFirstFileName->SetName(_("First file name"));
|
mFirstFileName->SetName(_("First file name"));
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
// Row 4
|
|
||||||
S.SetBorder(1);
|
|
||||||
mTrack = S.Id(TrackID)
|
|
||||||
.AddRadioButtonToGroup(wxString(_("Tracks")));
|
|
||||||
mTrack->SetName(_("Tracks"));
|
|
||||||
S.SetBorder(3);
|
S.SetBorder(3);
|
||||||
}
|
}
|
||||||
S.EndStatic();
|
S.EndStatic();
|
||||||
|
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
S.StartStatic(_("Name files:"), false);
|
S.StartStatic(_("Name files:"), 1);
|
||||||
{
|
{
|
||||||
S.SetBorder(2);
|
S.SetBorder(2);
|
||||||
S.StartRadioButtonGroup(wxT("/Export/TrackNameWithOrWithoutNumbers"), wxT("labelTrack"));
|
S.StartRadioButtonGroup(wxT("/Export/TrackNameWithOrWithoutNumbers"), wxT("labelTrack"));
|
||||||
@ -334,16 +364,19 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
|
|||||||
}
|
}
|
||||||
S.EndRadioButtonGroup();
|
S.EndRadioButtonGroup();
|
||||||
|
|
||||||
S.StartHorizontalLay(wxEXPAND, false);
|
S.StartMultiColumn(3, wxEXPAND);
|
||||||
|
S.SetStretchyCol(2);
|
||||||
{
|
{
|
||||||
mPrefixLabel = S.AddVariableText(_("File name prefix:"), true);
|
// Row 3 (indented)
|
||||||
|
S.AddVariableText(wxT(" "), false);
|
||||||
|
mPrefixLabel = S.AddVariableText(_("File name prefix:"), false);
|
||||||
mPrefix = S.Id(PrefixID)
|
mPrefix = S.Id(PrefixID)
|
||||||
.TieTextBox(wxT(""),
|
.TieTextBox(wxT(""),
|
||||||
name,
|
name,
|
||||||
30);
|
30);
|
||||||
mPrefix->SetName(_("File name prefix"));
|
mPrefix->SetName(_("File name prefix"));
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
S.EndStatic();
|
S.EndStatic();
|
||||||
}
|
}
|
||||||
@ -400,6 +433,8 @@ void ExportMultiple::EnableControls()
|
|||||||
|
|
||||||
void ExportMultiple::OnFormat(wxCommandEvent& WXUNUSED(event))
|
void ExportMultiple::OnFormat(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
mBook->ChangeSelection(mFormat->GetSelection());
|
||||||
|
|
||||||
EnableControls();
|
EnableControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,18 +542,17 @@ void ExportMultiple::OnExport(wxCommandEvent& WXUNUSED(event))
|
|||||||
mFilterIndex = mFormat->GetSelection();
|
mFilterIndex = mFormat->GetSelection();
|
||||||
if (mFilterIndex != wxNOT_FOUND)
|
if (mFilterIndex != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
size_t c = 0;
|
for (size_t c = 0, i = 0; i < mPlugins.GetCount(); i++)
|
||||||
for (size_t i = 0; i < mPlugins.GetCount(); i++)
|
|
||||||
{
|
{
|
||||||
for (int j = 0; j < mPlugins[i]->GetFormatCount(); j++)
|
for (int j = 0; j < mPlugins[i]->GetFormatCount(); j++, c++)
|
||||||
{
|
{
|
||||||
if ((size_t)mFilterIndex == c)
|
if ((size_t)mFilterIndex == c)
|
||||||
{ // this is the selected format. Store the plug-in and sub-format
|
{ // this is the selected format. Store the plug-in and sub-format
|
||||||
// needed to acheive it.
|
// needed to acheive it.
|
||||||
mPluginIndex = i;
|
mPluginIndex = i;
|
||||||
mSubFormatIndex = j;
|
mSubFormatIndex = j;
|
||||||
|
mBook->GetPage(mFilterIndex)->TransferDataFromWindow();
|
||||||
}
|
}
|
||||||
c++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -955,6 +989,7 @@ wxString ExportMultiple::MakeFileName(wxString input)
|
|||||||
} // phew - end of file name sanitisation procedure
|
} // phew - end of file name sanitisation procedure
|
||||||
return newname;
|
return newname;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SuccessDialog::OnKeyDown(wxListEvent& event)
|
void SuccessDialog::OnKeyDown(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if (event.GetKeyCode() == WXK_RETURN)
|
if (event.GetKeyCode() == WXK_RETURN)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/dynarray.h> // sadly we are using wx dynamic arrays
|
#include <wx/dynarray.h> // sadly we are using wx dynamic arrays
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
|
#include <wx/simplebook.h>
|
||||||
|
|
||||||
#include "Export.h"
|
#include "Export.h"
|
||||||
#include "../Tags.h" // we need to know about the Tags class for metadata
|
#include "../Tags.h" // we need to know about the Tags class for metadata
|
||||||
@ -162,6 +163,8 @@ private:
|
|||||||
wxButton *mCancel;
|
wxButton *mCancel;
|
||||||
wxButton *mExport;
|
wxButton *mExport;
|
||||||
|
|
||||||
|
wxSimplebook *mBook;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,10 @@ public:
|
|||||||
|
|
||||||
ExportOGGOptions(wxWindow *parent, int format);
|
ExportOGGOptions(wxWindow *parent, int format);
|
||||||
virtual ~ExportOGGOptions();
|
virtual ~ExportOGGOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -64,15 +67,13 @@ ExportOGGOptions::ExportOGGOptions(wxWindow *parent, int WXUNUSED(format))
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportOGGOptions::~ExportOGGOptions()
|
ExportOGGOptions::~ExportOGGOptions()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsSavingToPrefs);
|
TransferDataFromWindow();
|
||||||
PopulateOrExchange(S);
|
|
||||||
|
|
||||||
gPrefs->Write(wxT("/FileFormats/OggExportQuality"),mOggQualityUnscaled * 10);
|
|
||||||
gPrefs->Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -96,6 +97,26 @@ void ExportOGGOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportOGGOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportOGGOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
gPrefs->Write(wxT("/FileFormats/OggExportQuality"),mOggQualityUnscaled * 10);
|
||||||
|
gPrefs->Flush();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// ExportOGG
|
// ExportOGG
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -98,7 +98,11 @@ public:
|
|||||||
|
|
||||||
ExportPCMOptions(wxWindow *parent, int format);
|
ExportPCMOptions(wxWindow *parent, int format);
|
||||||
virtual ~ExportPCMOptions();
|
virtual ~ExportPCMOptions();
|
||||||
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
void PopulateOrExchange(ShuttleGui & S);
|
||||||
|
bool TransferDataToWindow();
|
||||||
|
bool TransferDataFromWindow();
|
||||||
|
|
||||||
void OnHeaderChoice(wxCommandEvent & evt);
|
void OnHeaderChoice(wxCommandEvent & evt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -151,7 +155,6 @@ ExportPCMOptions::ExportPCMOptions(wxWindow *parent, int selformat)
|
|||||||
bool valid = ValidatePair(fmt);
|
bool valid = ValidatePair(fmt);
|
||||||
if (valid)
|
if (valid)
|
||||||
{
|
{
|
||||||
|
|
||||||
mEncodingNames.Add(sf_encoding_index_name(i));
|
mEncodingNames.Add(sf_encoding_index_name(i));
|
||||||
mEncodingFormats.Add(enc);
|
mEncodingFormats.Add(enc);
|
||||||
if ((format & SF_FORMAT_SUBMASK) == (int)sf_encoding_index_to_subtype(i))
|
if ((format & SF_FORMAT_SUBMASK) == (int)sf_encoding_index_to_subtype(i))
|
||||||
@ -163,11 +166,13 @@ ExportPCMOptions::ExportPCMOptions(wxWindow *parent, int selformat)
|
|||||||
|
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportPCMOptions::~ExportPCMOptions()
|
ExportPCMOptions::~ExportPCMOptions()
|
||||||
{
|
{
|
||||||
WriteExportFormatPref(GetFormat());
|
TransferDataFromWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportPCMOptions::PopulateOrExchange(ShuttleGui & S)
|
void ExportPCMOptions::PopulateOrExchange(ShuttleGui & S)
|
||||||
@ -197,6 +202,25 @@ void ExportPCMOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportPCMOptions::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
bool ExportPCMOptions::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
ShuttleGui S(this, eIsSavingToPrefs);
|
||||||
|
PopulateOrExchange(S);
|
||||||
|
|
||||||
|
WriteExportFormatPref(GetFormat());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
void ExportPCMOptions::OnHeaderChoice(wxCommandEvent & WXUNUSED(evt))
|
||||||
{
|
{
|
||||||
int format = sf_header_index_to_type(mHeaderChoice->GetSelection());
|
int format = sf_header_index_to_type(mHeaderChoice->GetSelection());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user