Audacity 3.2.0
Classes | Enumerations | Functions | Variables
anonymous_namespace{ExportPCM.cpp} Namespace Reference

Classes

class  ExportOptionsSFEditor
 
class  ExportOptionsSFTypedEditor
 

Enumerations

enum  { FMT_AIFF , FMT_WAV , FMT_OTHER }
 
enum  : int { OptionIDSFType = 0 }
 

Functions

int LoadOtherFormat (const audacity::BasicSettings &config, int def)
 
void SaveOtherFormat (audacity::BasicSettings &config, int val)
 
int LoadEncoding (const audacity::BasicSettings &config, int type, int def)
 
void SaveEncoding (audacity::BasicSettings &config, int type, int val)
 
void GetEncodings (int type, std::vector< ExportValue > &values, TranslatableStrings &names)
 

Variables

struct {
   int   anonymous_namespace{ExportPCM.cpp}::format
 
   const wxChar *   anonymous_namespace{ExportPCM.cpp}::name
 
   const TranslatableString   anonymous_namespace{ExportPCM.cpp}::desc
 
kFormats []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FMT_AIFF 
FMT_WAV 
FMT_OTHER 

Definition at line 61 of file ExportPCM.cpp.

62{
63#if defined(__WXMAC__)
65#endif
66 FMT_WAV,
68};
@ FMT_OTHER

◆ anonymous enum

anonymous enum : int
Enumerator
OptionIDSFType 

Definition at line 116 of file ExportPCM.cpp.

Function Documentation

◆ GetEncodings()

void anonymous_namespace{ExportPCM.cpp}::GetEncodings ( int  type,
std::vector< ExportValue > &  values,
TranslatableStrings names 
)

Definition at line 92 of file ExportPCM.cpp.

93{
94 // Setup for queries
95 SF_INFO info = {};
96 info.samplerate = 44100;
97 info.channels = 1;
98 info.sections = 1;
99
100 for (int i = 0, num = sf_num_encodings(); i < num; ++i)
101 {
102 int sub = sf_encoding_index_to_subtype(i);
103
104 // Since we're traversing the subtypes linearly, we have to
105 // make sure it can be paired with our current type.
106 info.format = type | sub;
107 if (sf_format_check(&info))
108 {
109 // Store subtype and name
110 values.emplace_back(sub);
112 }
113 }
114}
const wxChar * values
unsigned int sf_encoding_index_to_subtype(int i)
Definition: FileFormats.cpp:90
wxString sf_encoding_index_name(int i)
Get the string name of the data encoding of the requested format.
Definition: FileFormats.cpp:79
int sf_num_encodings()
Get the number of data encodings libsndfile supports (in any container or none.
Definition: FileFormats.cpp:70
static TranslatableStrings names
Definition: TagsEditor.cpp:153
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.

References names, sf_encoding_index_name(), sf_encoding_index_to_subtype(), sf_num_encodings(), values, and Verbatim().

Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::ExportOptionsSFEditor(), and anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFTypedEditor::ExportOptionsSFTypedEditor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadEncoding()

int anonymous_namespace{ExportPCM.cpp}::LoadEncoding ( const audacity::BasicSettings config,
int  type,
int  def 
)

Definition at line 80 of file ExportPCM.cpp.

81{
82 return config.Read(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
83 sf_header_shortname(type), type), def);
84}
wxT("CloseDown"))
wxString sf_header_shortname(int format)
Get an abbreviated form of the string name of the specified format.
virtual bool Read(const wxString &key, bool *value) const =0

References audacity::BasicSettings::Read(), sf_header_shortname(), and wxT().

Referenced by ExportPCM::GetFormatInfo(), anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFTypedEditor::Load(), and anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::Load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadOtherFormat()

int anonymous_namespace{ExportPCM.cpp}::LoadOtherFormat ( const audacity::BasicSettings config,
int  def 
)

Definition at line 70 of file ExportPCM.cpp.

71{
72 return config.Read(wxString("/FileFormats/ExportFormat_SF1"), def);
73}

References audacity::BasicSettings::Read().

Referenced by ExportPCM::GetFormatInfo(), and anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::Load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveEncoding()

void anonymous_namespace{ExportPCM.cpp}::SaveEncoding ( audacity::BasicSettings config,
int  type,
int  val 
)

Definition at line 86 of file ExportPCM.cpp.

87{
88 config.Write(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
89 sf_header_shortname(type), type), val);
90}
virtual bool Write(const wxString &key, bool value)=0

References sf_header_shortname(), audacity::BasicSettings::Write(), and wxT().

Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFTypedEditor::Store(), and anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::Store().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveOtherFormat()

void anonymous_namespace{ExportPCM.cpp}::SaveOtherFormat ( audacity::BasicSettings config,
int  val 
)

Definition at line 75 of file ExportPCM.cpp.

76{
77 config.Write(wxT("/FileFormats/ExportFormat_SF1"), val);
78}

References audacity::BasicSettings::Write(), and wxT().

Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::Store().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ desc

const TranslatableString anonymous_namespace{ExportPCM.cpp}::desc

◆ format

int anonymous_namespace{ExportPCM.cpp}::format

Definition at line 49 of file ExportPCM.cpp.

Referenced by AboutDialog::AddCredit(), AUPImportFileHandle::AddFile(), AUPImportFileHandle::AddSamples(), AdjustFormatIndex(), SampleBuffer::Allocate(), WaveChannel::Append(), Sequence::Append(), WaveTrack::Append(), WaveClip::Append(), Sequence::AppendBlock(), WaveChannel::AppendBuffer(), WaveClip::AppendLegacyNewBlock(), Sequence::AppendNewBlock(), WaveClip::AppendToChannel(), AudacityToPortAudioSampleFormat(), anonymous_namespace{Registry.cpp}::BadPath(), BarStepCase(), BeatsCase(), TimerRecordExportDialog::Bind(), ImportUtils::ChooseFormat(), RingBuffer::Clear(), ClearSamples(), FormatClassifier::ConvertSamples(), Sequence::ConvertToSampleFormat(), WaveClip::ConvertToSampleFormat(), WaveTrack::ConvertToSampleFormat(), Sequence::Copy(), WaveTrack::Create(), WaveTrackFactory::Create(), WaveTrackFactory::CreateMany(), ExportFFmpeg::CreateOptionsEditor(), ExportPCM::CreateOptionsEditor(), CreateParsedNumericConverterFormatter(), ExportFFmpeg::CreateProcessor(), ExportPCM::CreateProcessor(), CrossFader::CrossFadeMix(), cutCopyOptions(), Sequence::Delete(), CommandManager::DescribeCommandsAndShortcuts(), Sequence::DoAppend(), WaveTrackFactory::DoCreate(), LabelTrackView::DoEditLabels(), anonymous_namespace{FileMenus.cpp}::DoExport(), StretchingSequence::DoGet(), WaveChannel::DoGet(), WaveTrack::DoGet(), TranslatableString::DoSubstitute(), AudioIO::DrainRecordBuffers(), ExportFFmpegOptions::EnableDisableControls(), anonymous_namespace{Sequence.cpp}::ensureSampleBufferSize(), FileException::ErrorMessage(), LabelTrack::Export(), LabelStruct::Export(), ExportAudioDialog::ExportAudioDialog(), ExportOptionsHandler::ExportOptionsHandler(), ExportFFmpegOptions::FetchCompatibleCodecList(), FFmpegFunctions::FillOuptutFormatsList(), FindDependencies(), ExportPluginRegistry::FindFormat(), FormatClassifier::FormatClassifier(), LabelTrack::FormatForFileName(), Sequence::Get(), RingBuffer::Get(), Importer::GetFileTypes(), ExportPCM::GetFormatInfo(), WaveTrack::GetOne(), anonymous_namespace{WaveTrack.cpp}::GetRenderedCopy(), FormatClassifier::GetResultFormatLibSndfile(), GetSampleFormatStr(), CrossFader::GetSamples(), WaveClipChannel::GetSamples(), WaveClip::GetSamples(), Guess16Bit(), GuessFloatFormats(), GuessIntFormats(), WaveClip::HandleXMLChild(), FormatMenuTable::IdOfFormat(), LabelTrack::Import(), LabelStruct::Import(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::Importer(), ImportRaw(), Internat::Init(), ExportFilePanel::Init(), Sequence::InsertSilence(), RulerUpdater::TickSizes::LabelString(), MixAndRender(), Mixer::Mixer(), NumericEditor::NumericEditor(), LabelDialog::OnExport(), anonymous_namespace{FileMenus.cpp}::OnExportLabels(), LabelDialog::OnImport(), anonymous_namespace{FileMenus.cpp}::OnImportLabels(), ScrubbingOverlay::OnTimer(), SelectionBar::OnUpdate(), Sequence::Paste(), ExportUtils::PerformInteractiveExport(), TimeToolBar::Populate(), NyquistEffect::ProcessOne(), RingBuffer::Put(), RawAudioGuess(), Sequence::Read(), MultiFormatReader::ReadSamples(), FormatClassifier::ReadSignal(), SnapManager::Reinit(), RemoveDependencies(), GrowableSampleBuffer::Resize(), ReverseSamples(), Ruler::Ruler(), RulerPanel::RulerPanel(), FFmpegPresets::SavePreset(), WaveChannel::Set(), ProjectNumericFormats::SetAudioTimeFormat(), ProjectSelectionManager::SetAudioTimeFormat(), TimeToolBar::SetAudioTimeFormat(), NumericEditor::SetFormat(), TimeFormat::SetLabelString(), WaveTrack::SetLegacyFormat(), ExportTaskBuilder::SetPlugin(), anonymous_namespace{WaveTrack.cpp}::WaveTrackData::SetSampleFormat(), Sequence::SetSamples(), WaveClipChannel::SetSamples(), WaveClip::SetSamples(), ProjectNumericFormats::SetSelectionFormat(), ProjectSelectionManager::SetSelectionFormat(), SelectionBar::SetSelectionFormat(), sf_header_extension(), sf_header_index_name(), sf_header_mactype(), sf_header_name(), sf_header_shortname(), sf_subtype_bytes_per_sample(), sf_subtype_is_integer(), sf_subtype_more_than_16_bits(), sf_subtype_to_effective_format(), anonymous_namespace{Sequence.cpp}::ShareOrCopySampleBlock(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::Text(), RulerUpdater::TickSizes::TickSizes(), TimeCase(), TimeStepCase(), Internat::ToDisplayString(), NumberFormatter::ToString(), SelectionBar::UpdateTimeControlsFormat(), WaveClip::WaveClip(), and WaveTrack::WaveTrack().

◆ 

struct anonymous_namespace{ExportPCM.cpp} { ... } anonymous_namespace{ExportPCM.cpp}::kFormats[]
Initial value:
=
{
{SF_FORMAT_AIFF | SF_FORMAT_PCM_16, wxT("AIFF"), XO("AIFF (Apple/SGI)")},
{SF_FORMAT_WAV | SF_FORMAT_PCM_16, wxT("WAV"), XO("WAV (Microsoft)")},
}
XO("Cut/Copy/Paste")

Referenced by ExportPCM::CreateOptionsEditor(), ExportPCM::GetFormatCount(), and ExportPCM::GetFormatInfo().

◆ name

const wxChar* anonymous_namespace{ExportPCM.cpp}::name

Definition at line 50 of file ExportPCM.cpp.

Referenced by PCMExportProcessor::AddID3Chunk().