Audacity 3.2.0
Classes | Macros | Enumerations | Functions | Variables
ExportPCM.cpp File Reference
#include <wx/defs.h>
#include <wx/app.h>
#include <wx/choice.h>
#include <wx/dynlib.h>
#include <wx/filename.h>
#include <wx/intl.h>
#include <wx/timer.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/window.h>
#include "sndfile.h"
#include "Dither.h"
#include "../FileFormats.h"
#include "Mix.h"
#include "Prefs.h"
#include "ProjectRate.h"
#include "../ShuttleGui.h"
#include "../Tags.h"
#include "Track.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/ProgressDialog.h"
#include "../widgets/wxWidgetsWindowPlacement.h"
#include "wxFileNameWrapper.h"
#include "Export.h"
Include dependency graph for ExportPCM.cpp:

Go to the source code of this file.

Classes

class  ExportPCMOptions
 
class  ExportPCM
 

Macros

#define ID_HEADER_CHOICE   7102
 
#define ID_ENCODING_CHOICE   7103
 

Enumerations

enum  { FMT_AIFF , FMT_WAV , FMT_OTHER }
 

Functions

static int LoadOtherFormat (int def=0)
 
static void SaveOtherFormat (int val)
 
static int LoadEncoding (int type)
 
static void SaveEncoding (int type, int val)
 

Variables

struct {
   int   format
 
   const wxChar *   name
 
   const TranslatableString   desc
 
kFormats []
 
static Exporter::RegisteredExportPlugin sRegisteredPlugin
 

Macro Definition Documentation

◆ ID_ENCODING_CHOICE

#define ID_ENCODING_CHOICE   7103

Definition at line 111 of file ExportPCM.cpp.

◆ ID_HEADER_CHOICE

#define ID_HEADER_CHOICE   7102

Definition at line 110 of file ExportPCM.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FMT_AIFF 
FMT_WAV 
FMT_OTHER 

Definition at line 68 of file ExportPCM.cpp.

69{
70#if defined(__WXMAC__)
72#endif
73 FMT_WAV,
75};
@ FMT_AIFF
Definition: ExportPCM.cpp:71
@ FMT_WAV
Definition: ExportPCM.cpp:73
@ FMT_OTHER
Definition: ExportPCM.cpp:74

Function Documentation

◆ LoadEncoding()

static int LoadEncoding ( int  type)
static

Definition at line 93 of file ExportPCM.cpp.

94{
95 return gPrefs->Read(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
96 sf_header_shortname(type), type), (long int) 0);
97}
wxT("CloseDown"))
wxString sf_header_shortname(int format)
Get an abbreviated form of the string name of the specified format.
FileConfig * gPrefs
Definition: Prefs.cpp:71

References gPrefs, sf_header_shortname(), and wxT().

Referenced by ExportPCM::Export(), ExportPCMOptions::GetEncodings(), and ExportPCM::GetMaxChannels().

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

◆ LoadOtherFormat()

static int LoadOtherFormat ( int  def = 0)
static

Definition at line 81 of file ExportPCM.cpp.

82{
83 return gPrefs->Read(wxT("/FileFormats/ExportFormat_SF1"),
84 kFormats[0].format & SF_FORMAT_TYPEMASK);
85}
int format
Definition: ExportPCM.cpp:56
struct @47 kFormats[]

References format, gPrefs, kFormats, and wxT().

Referenced by ExportPCM::Export(), ExportPCM::GetExtension(), ExportPCM::GetFormat(), ExportPCM::GetMaxChannels(), and ExportPCMOptions::GetTypes().

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

◆ SaveEncoding()

static void SaveEncoding ( int  type,
int  val 
)
static

Definition at line 99 of file ExportPCM.cpp.

100{
101 gPrefs->Write(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
102 sf_header_shortname(type), type), val);
103 gPrefs->Flush();
104}
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143

References FileConfig::Flush(), gPrefs, sf_header_shortname(), and wxT().

Referenced by ExportPCMOptions::OnEncodingChoice(), and ExportPCMOptions::~ExportPCMOptions().

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

◆ SaveOtherFormat()

static void SaveOtherFormat ( int  val)
static

Definition at line 87 of file ExportPCM.cpp.

88{
89 gPrefs->Write(wxT("/FileFormats/ExportFormat_SF1"), val);
90 gPrefs->Flush();
91}

References FileConfig::Flush(), gPrefs, and wxT().

Referenced by ExportPCMOptions::OnHeaderChoice(), and ExportPCMOptions::~ExportPCMOptions().

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

Variable Documentation

◆ desc

const TranslatableString desc

◆ format

int format

Definition at line 56 of file ExportPCM.cpp.

Referenced by AboutDialog::AddCredit(), AUPImportFileHandle::AddFile(), AUPImportFileHandle::AddSamples(), AdjustFormatIndex(), SampleBuffer::Allocate(), Sequence::Append(), WaveClip::Append(), WaveTrack::Append(), Sequence::AppendBlock(), Sequence::AppendNewBlock(), WaveClip::AppendNewBlock(), ProjectSelectionManager::AS_SetSelectionFormat(), AudacityToPortAudioSampleFormat(), anonymous_namespace{Registry.cpp}::BadPath(), ImportFileHandle::ChooseFormat(), RingBuffer::Clear(), ClearSamples(), FormatClassifier::ConvertSamples(), Sequence::ConvertToSampleFormat(), WaveClip::ConvertToSampleFormat(), WaveTrack::ConvertToSampleFormat(), WaveTrackFactory::Create(), CrossFader::CrossFadeMix(), cutCopyOptions(), CommandManager::DescribeCommandsAndShortcuts(), Sequence::DoAppend(), LabelTrackView::DoEditLabels(), anonymous_namespace{FileMenus.cpp}::DoExport(), TranslatableString::DoSubstitute(), AudioIO::DrainRecordBuffers(), ExportFFmpegOptions::EnableDisableControls(), anonymous_namespace{Sequence.cpp}::ensureSampleBufferSize(), FileException::ErrorMessage(), ExportFLAC::Export(), ExportPCM::Export(), ExportWavPack::Export(), ExportPCM::ExportPCM(), ExportFFmpegOptions::FetchCompatibleCodecList(), FFmpegFunctions::FillOuptutFormatsList(), FindDependencies(), NumericTextCtrl::Options::Format(), FormatClassifier::FormatClassifier(), Sequence::Get(), WaveTrack::Get(), RingBuffer::Get(), Importer::GetFileTypes(), SampleTrackCache::GetFloats(), FormatClassifier::GetResultFormatLibSndfile(), GetSampleFormatStr(), CrossFader::GetSamples(), WaveClip::GetSamples(), anonymous_namespace{SelectMenus.cpp}::GridMove(), Guess16Bit(), GuessFloatFormats(), GuessIntFormats(), FormatMenuTable::IdOfFormat(), ImportRaw(), Internat::Init(), Ruler::TickSizes::LabelString(), LoadOtherFormat(), MixAndRender(), Mixer::Mixer(), NumericEditor::NumericEditor(), ScrubbingOverlay::OnTimer(), SelectionBar::OnUpdate(), ExportCL::OptionsCreate(), ExportFFmpeg::OptionsCreate(), ExportFLAC::OptionsCreate(), ExportMP3::OptionsCreate(), ExportOGG::OptionsCreate(), ExportPCM::OptionsCreate(), ExportWavPack::OptionsCreate(), NumericConverter::ParseFormatString(), TimeToolBar::Populate(), ExportMultipleDialog::PopulateOrExchange(), NyquistEffect::ProcessOne(), RingBuffer::Put(), anonymous_namespace{Compressor.cpp}::RatioLabelFormat(), anonymous_namespace{Compressor.cpp}::RatioTextFormat(), RawAudioGuess(), Sequence::Read(), MultiFormatReader::ReadSamples(), FormatClassifier::ReadSignal(), SnapManager::Reinit(), RemoveDependencies(), GrowableSampleBuffer::Resize(), ReverseSamples(), RulerPanel::RulerPanel(), FFmpegPresets::SavePreset(), WaveTrack::Set(), ProjectSettings::SetAudioTimeFormat(), TimeToolBar::SetAudioTimeFormat(), NumericEditor::SetFormat(), ExportPlugin::SetFormat(), Ruler::SetFormat(), Sequence::SetSamples(), WaveClip::SetSamples(), ProjectSettings::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{WaveTrackControls.cpp}::Status2DrawFunction(), anonymous_namespace{NoiseReduction.cpp}::ControlInfo::Text(), Ruler::TickSizes::TickSizes(), Internat::ToDisplayString(), NumberFormatter::ToString(), ProjectSelectionManager::TT_SetAudioTimeFormat(), WaveClip::WaveClip(), and WaveTrack::WaveTrack().

◆ 

struct { ... } 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)")},
}
#define XO(s)
Definition: Internat.h:31

Referenced by ExportPCM::ExportPCM(), ExportPCMOptions::ExportPCMOptions(), ExportPCM::GetMaxChannels(), and LoadOtherFormat().

◆ name

const wxChar* name

Definition at line 57 of file ExportPCM.cpp.

Referenced by ExportPCM::AddID3Chunk(), and ExportPCM::ExportPCM().

◆ sRegisteredPlugin

Exporter::RegisteredExportPlugin sRegisteredPlugin
static
Initial value:
{ "PCM",
[]{ return std::make_unique< ExportPCM >(); }
}

Definition at line 1101 of file ExportPCM.cpp.