Audacity 3.2.0
|
#include <ExportFilePanel.h>
Public Member Functions | |
ExportFilePanel (AudacityProject &project, bool monoStereoMode=false, wxWindow *parent=nullptr, wxWindowID winid=wxID_ANY) | |
~ExportFilePanel () override | |
void | PopulateOrExchange (ShuttleGui &S) |
void | Init (const wxFileName &filename, int sampleRate, const wxString &format=wxEmptyString, int channels=0, const ExportProcessor::Parameters ¶meters={}, const MixerOptions::Downmix *mixerSpec=nullptr) |
Initializes panel with export settings provided as arguments. Call is required. More... | |
void | SetInitialFocus () |
void | SetCustomMappingEnabled (bool enabled) |
wxString | GetPath () const |
wxString | GetFullName () |
const ExportPlugin * | GetPlugin () const |
int | GetFormat () const |
int | GetSampleRate () const |
std::optional< ExportProcessor::Parameters > | GetParameters () const |
int | GetChannels () const |
MixerOptions::Downmix * | GetMixerSpec () const |
Public Member Functions inherited from wxPanelWrapper | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Private Member Functions | |
void | ValidateAndFixExt () |
void | OnFullNameFocusKill (wxFocusEvent &event) |
void | OnFormatChange (wxCommandEvent &event) |
void | OnSampleRateChange (wxCommandEvent &event) |
void | OnFolderBrowse (wxCommandEvent &event) |
void | OnChannelsChange (wxCommandEvent &event) |
void | OnChannelsConfigure (wxCommandEvent &event) |
void | ChangeFormat (int index) |
void | OnOptionsHandlerEvent (const ExportOptionsHandlerEvent &e) |
void | UpdateSampleRateList () |
void | UpdateMaxChannels (unsigned maxChannels) |
Private Attributes | |
AudacityProject & | mProject |
bool | mMonoStereoMode {false} |
wxChoice * | mFormat {} |
wxChoice * | mRates {} |
wxWindow * | mAudioOptionsPanel {} |
wxTextCtrl * | mFolder {} |
wxTextCtrl * | mFullName {} |
wxRadioButton * | mMono {} |
wxRadioButton * | mStereo {} |
wxRadioButton * | mCustomMapping {} |
wxButton * | mCustomizeChannels {} |
int | mSampleRate {} |
const ExportPlugin * | mSelectedPlugin {} |
int | mSelectedFormatIndex {} |
std::unique_ptr< ExportOptionsHandler > | mOptionsHandler |
std::unique_ptr< MixerOptions::Downmix > | mMixerSpec |
Observer::Subscription | mOptionsChangeSubscription |
Static Private Attributes | |
static constexpr auto | MaxExportChannels = 32u |
Definition at line 27 of file ExportFilePanel.h.
ExportFilePanel::ExportFilePanel | ( | AudacityProject & | project, |
bool | monoStereoMode = false , |
||
wxWindow * | parent = nullptr , |
||
wxWindowID | winid = wxID_ANY |
||
) |
Definition at line 132 of file ExportFilePanel.cpp.
References eIsCreating, and S.
|
overridedefault |
|
private |
Definition at line 496 of file ExportFilePanel.cpp.
References eIsCreating, ExportPluginRegistry::Get(), mAudioOptionsPanel, mOptionsChangeSubscription, mOptionsHandler, mSelectedFormatIndex, mSelectedPlugin, OnOptionsHandlerEvent(), Observer::Subscription::Reset(), S, UpdateMaxChannels(), UpdateSampleRateList(), and ValidateAndFixExt().
Referenced by Init(), OnFolderBrowse(), and OnFormatChange().
int ExportFilePanel::GetChannels | ( | ) | const |
Definition at line 352 of file ExportFilePanel.cpp.
References mCustomMapping, and mMono.
Referenced by ExportAudioDialog::OnExport(), TimerRecordExportDialog::OnOK(), ExportAudioDialog::UpdateLabelExportSettings(), and ExportAudioDialog::UpdateTrackExportSettings().
int ExportFilePanel::GetFormat | ( | ) | const |
Definition at line 335 of file ExportFilePanel.cpp.
References mSelectedFormatIndex.
Referenced by ExportAudioDialog::OnExport(), ExportAudioDialog::OnFormatChange(), TimerRecordExportDialog::OnFormatChanged(), TimerRecordExportDialog::OnOK(), and ExportAudioDialog::UpdateExportSettings().
wxString ExportFilePanel::GetFullName | ( | ) |
Definition at line 324 of file ExportFilePanel.cpp.
References mFullName, and ValidateAndFixExt().
Referenced by ExportAudioDialog::OnExport(), TimerRecordExportDialog::OnOK(), ExportAudioDialog::UpdateLabelExportSettings(), and ExportAudioDialog::UpdateTrackExportSettings().
MixerOptions::Downmix * ExportFilePanel::GetMixerSpec | ( | ) | const |
Definition at line 359 of file ExportFilePanel.cpp.
References mMixerSpec.
Referenced by ExportAudioDialog::OnExport().
std::optional< ExportProcessor::Parameters > ExportFilePanel::GetParameters | ( | ) | const |
Definition at line 345 of file ExportFilePanel.cpp.
References mOptionsHandler.
Referenced by ExportAudioDialog::OnExport(), and TimerRecordExportDialog::OnOK().
wxString ExportFilePanel::GetPath | ( | ) | const |
Definition at line 319 of file ExportFilePanel.cpp.
References mFolder.
Referenced by ExportAudioDialog::OnExport(), TimerRecordExportDialog::OnOK(), ExportAudioDialog::UpdateLabelExportSettings(), and ExportAudioDialog::UpdateTrackExportSettings().
const ExportPlugin * ExportFilePanel::GetPlugin | ( | ) | const |
Definition at line 330 of file ExportFilePanel.cpp.
References mSelectedPlugin.
Referenced by ExportAudioDialog::OnExport(), ExportAudioDialog::OnFormatChange(), TimerRecordExportDialog::OnFormatChanged(), TimerRecordExportDialog::OnOK(), and ExportAudioDialog::UpdateExportSettings().
int ExportFilePanel::GetSampleRate | ( | ) | const |
Definition at line 340 of file ExportFilePanel.cpp.
References mSampleRate.
Referenced by ExportAudioDialog::OnExport(), and TimerRecordExportDialog::OnOK().
void ExportFilePanel::Init | ( | const wxFileName & | filename, |
int | sampleRate, | ||
const wxString & | format = wxEmptyString , |
||
int | channels = 0 , |
||
const ExportProcessor::Parameters & | parameters = {} , |
||
const MixerOptions::Downmix * | mixerSpec = nullptr |
||
) |
Initializes panel with export settings provided as arguments. Call is required.
filename | Default output filename |
sampleRate | Export sample rate > 0 |
format | Export format string identifier (see FormatInfo::format) |
channels | Pass 0(default) to choose automatically depending on project tracks |
parameters | Pass empty(default) array to initialize with plugin defaults |
mixerSpec | Try use custom channel mapping, channels argument will be igonred |
Definition at line 228 of file ExportFilePanel.cpp.
References ChangeFormat(), ExportUtils::FindExportWaveTracks(), anonymous_namespace{ExportPCM.cpp}::format, ExportPluginRegistry::Get(), TrackList::Get(), mCustomizeChannels, mCustomMapping, mFolder, mFormat, mFullName, mMixerSpec, mMono, mMonoStereoMode, mOptionsHandler, mProject, mSampleRate, mStereo, and anonymous_namespace{ClipSegmentTest.cpp}::sampleRate.
Referenced by TimerRecordExportDialog::Bind().
|
private |
Definition at line 472 of file ExportFilePanel.cpp.
References anonymous_namespace{ExportFilePanel.cpp}::AudioMixModeCustomID, and mCustomizeChannels.
|
private |
Definition at line 478 of file ExportFilePanel.cpp.
References TrackList::Any(), TrackList::Get(), mMixerSpec, mProject, and XO().
|
private |
Definition at line 442 of file ExportFilePanel.cpp.
References _, ChangeFormat(), FileNames::FormatWildcard(), ExportPluginRegistry::Get(), mFolder, mFormat, and mFullName.
|
private |
Definition at line 419 of file ExportFilePanel.cpp.
References ChangeFormat().
|
private |
Definition at line 409 of file ExportFilePanel.cpp.
References ValidateAndFixExt().
Referenced by PopulateOrExchange().
|
private |
Definition at line 539 of file ExportFilePanel.cpp.
References ExportOptionsHandlerEvent::FormatInfoChange, ExportPlugin::GetFormatInfo(), mSelectedFormatIndex, mSelectedPlugin, ExportOptionsHandlerEvent::SampleRateListChange, ExportOptionsHandlerEvent::type, UpdateMaxChannels(), UpdateSampleRateList(), and ValidateAndFixExt().
Referenced by ChangeFormat().
|
private |
Definition at line 425 of file ExportFilePanel.cpp.
References mSampleRate, and UpdateSampleRateList().
void ExportFilePanel::PopulateOrExchange | ( | ShuttleGui & | S | ) |
Definition at line 146 of file ExportFilePanel.cpp.
References anonymous_namespace{ExportFilePanel.cpp}::AudioChannelsConfigureID, anonymous_namespace{ExportFilePanel.cpp}::AudioMixModeCustomID, anonymous_namespace{ExportFilePanel.cpp}::AudioMixModeMonoID, anonymous_namespace{ExportFilePanel.cpp}::AudioMixModeStereoID, eIsCreating, anonymous_namespace{ExportFilePanel.cpp}::FolderBrowseID, anonymous_namespace{ExportFilePanel.cpp}::FormatID, ExportPluginRegistry::Get(), mAudioOptionsPanel, mCustomizeChannels, mCustomMapping, mFolder, mFormat, mFullName, mMono, mMonoStereoMode, mRates, mStereo, OnFullNameFocusKill(), S, safenew, anonymous_namespace{ExportFilePanel.cpp}::SampleRateID, and XO().
void ExportFilePanel::SetCustomMappingEnabled | ( | bool | enabled | ) |
Definition at line 303 of file ExportFilePanel.cpp.
References mCustomizeChannels, mCustomMapping, mMono, mMonoStereoMode, and mStereo.
Referenced by ExportAudioDialog::OnExportRangeChange().
void ExportFilePanel::SetInitialFocus | ( | ) |
Definition at line 297 of file ExportFilePanel.cpp.
References mFullName.
Referenced by ExportAudioDialog::Show().
|
private |
Definition at line 556 of file ExportFilePanel.cpp.
References TrackList::Any(), TrackList::Get(), MaxExportChannels, mMixerSpec, mMono, mMonoStereoMode, mProject, and mStereo.
Referenced by ChangeFormat(), and OnOptionsHandlerEvent().
|
private |
Definition at line 583 of file ExportFilePanel.cpp.
References _, anonymous_namespace{ExportFilePanel.cpp}::DefaultRates, mOptionsHandler, mRates, mSampleRate, and XO().
Referenced by ChangeFormat(), OnOptionsHandlerEvent(), and OnSampleRateChange().
|
private |
Definition at line 364 of file ExportFilePanel.cpp.
References ExportPlugin::GetFormatInfo(), mFullName, mSelectedFormatIndex, and mSelectedPlugin.
Referenced by ChangeFormat(), GetFullName(), OnFullNameFocusKill(), and OnOptionsHandlerEvent().
|
private |
Definition at line 99 of file ExportFilePanel.h.
Referenced by ChangeFormat(), and PopulateOrExchange().
|
staticconstexprprivate |
Definition at line 29 of file ExportFilePanel.h.
Referenced by UpdateMaxChannels().
|
private |
Definition at line 107 of file ExportFilePanel.h.
Referenced by Init(), OnChannelsChange(), PopulateOrExchange(), and SetCustomMappingEnabled().
|
private |
Definition at line 106 of file ExportFilePanel.h.
Referenced by GetChannels(), Init(), PopulateOrExchange(), and SetCustomMappingEnabled().
|
private |
Definition at line 101 of file ExportFilePanel.h.
Referenced by GetPath(), Init(), OnFolderBrowse(), and PopulateOrExchange().
|
private |
Definition at line 97 of file ExportFilePanel.h.
Referenced by Init(), OnFolderBrowse(), and PopulateOrExchange().
|
private |
Definition at line 102 of file ExportFilePanel.h.
Referenced by GetFullName(), Init(), OnFolderBrowse(), PopulateOrExchange(), SetInitialFocus(), and ValidateAndFixExt().
|
private |
Definition at line 114 of file ExportFilePanel.h.
Referenced by GetMixerSpec(), Init(), OnChannelsConfigure(), and UpdateMaxChannels().
|
private |
Definition at line 104 of file ExportFilePanel.h.
Referenced by GetChannels(), Init(), PopulateOrExchange(), SetCustomMappingEnabled(), and UpdateMaxChannels().
|
private |
Definition at line 95 of file ExportFilePanel.h.
Referenced by Init(), PopulateOrExchange(), SetCustomMappingEnabled(), and UpdateMaxChannels().
|
private |
Definition at line 116 of file ExportFilePanel.h.
Referenced by ChangeFormat().
|
private |
Definition at line 113 of file ExportFilePanel.h.
Referenced by ChangeFormat(), GetParameters(), Init(), and UpdateSampleRateList().
|
private |
Definition at line 93 of file ExportFilePanel.h.
Referenced by Init(), OnChannelsConfigure(), and UpdateMaxChannels().
|
private |
Definition at line 98 of file ExportFilePanel.h.
Referenced by PopulateOrExchange(), and UpdateSampleRateList().
|
private |
Definition at line 109 of file ExportFilePanel.h.
Referenced by GetSampleRate(), Init(), OnSampleRateChange(), and UpdateSampleRateList().
|
private |
Definition at line 111 of file ExportFilePanel.h.
Referenced by ChangeFormat(), GetFormat(), OnOptionsHandlerEvent(), and ValidateAndFixExt().
|
private |
Definition at line 110 of file ExportFilePanel.h.
Referenced by ChangeFormat(), GetPlugin(), OnOptionsHandlerEvent(), and ValidateAndFixExt().
|
private |
Definition at line 105 of file ExportFilePanel.h.
Referenced by Init(), PopulateOrExchange(), SetCustomMappingEnabled(), and UpdateMaxChannels().