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/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 108 of file ExportPCM.cpp.

◆ ID_HEADER_CHOICE

#define ID_HEADER_CHOICE   7102

Definition at line 107 of file ExportPCM.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FMT_AIFF 
FMT_WAV 
FMT_OTHER 

Definition at line 65 of file ExportPCM.cpp.

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

Function Documentation

◆ LoadEncoding()

static int LoadEncoding ( int  type)
static

Definition at line 90 of file ExportPCM.cpp.

91{
92 return gPrefs->Read(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
93 sf_header_shortname(type), type), (long int) 0);
94}
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:70

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 78 of file ExportPCM.cpp.

79{
80 return gPrefs->Read(wxT("/FileFormats/ExportFormat_SF1"),
81 kFormats[0].format & SF_FORMAT_TYPEMASK);
82}
int format
Definition: ExportPCM.cpp:53
struct @43 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 96 of file ExportPCM.cpp.

97{
98 gPrefs->Write(wxString::Format(wxT("/FileFormats/ExportFormat_SF1_Type/%s_%x"),
99 sf_header_shortname(type), type), val);
100 gPrefs->Flush();
101}
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 84 of file ExportPCM.cpp.

85{
86 gPrefs->Write(wxT("/FileFormats/ExportFormat_SF1"), val);
87 gPrefs->Flush();
88}

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 53 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(), Sequence::Copy(), WaveTrackFactory::Create(), CrossFader::CrossFadeMix(), cutCopyOptions(), Sequence::Delete(), 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(), WaveClip::HandleXMLChild(), FormatMenuTable::IdOfFormat(), ImportRaw(), Internat::Init(), Sequence::InsertSilence(), 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(), Sequence::Paste(), 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(), WaveTrack::WaveTrack(), and WaveTrack::WidestEffectiveFormat().

◆ 

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)")},
}
XO("Cut/Copy/Paste")

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

◆ name

const wxChar* name

Definition at line 54 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 1098 of file ExportPCM.cpp.