Audacity  3.0.3
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
ExportMP3.cpp File Reference
#include "ExportMP3.h"
#include <wx/app.h>
#include <wx/defs.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/dynlib.h>
#include <wx/ffile.h>
#include <wx/intl.h>
#include <wx/log.h>
#include <wx/mimetype.h>
#include <wx/radiobut.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/timer.h>
#include <wx/utils.h>
#include <wx/window.h>
#include "FileNames.h"
#include "float_cast.h"
#include "../Mix.h"
#include "Prefs.h"
#include "ProjectRate.h"
#include "../ProjectSettings.h"
#include "../ProjectWindow.h"
#include "../SelectFile.h"
#include "../ShuttleGui.h"
#include "../Tags.h"
#include "../Track.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/ProgressDialog.h"
#include "wxFileNameWrapper.h"
#include "Export.h"
#include <lame/lame.h>
Include dependency graph for ExportMP3.cpp:

Go to the source code of this file.

Classes

class  ExportMP3Options
 
class  FindDialog
 
class  MP3Exporter
 Class used to export MP3 files. More...
 
class  ExportMP3
 

Namespaces

 anonymous_namespace{ExportMP3.cpp}
 

Macros

#define ID_SET   7000
 
#define ID_VBR   7001
 
#define ID_ABR   7002
 
#define ID_CBR   7003
 
#define ID_QUALITY   7004
 
#define ID_MONO   7005
 
#define ID_BROWSE   5000
 
#define ID_DLOAD   5001
 

Typedefs

typedef lame_global_flagslame_init_t(void)
 
typedef int lame_init_params_t(lame_global_flags *)
 
typedef const char * get_lame_version_t(void)
 
typedef int CDECL lame_encode_buffer_ieee_float_t(lame_t gfp, const float pcm_l[], const float pcm_r[], const int nsamples, unsigned char *mp3buf, const int mp3buf_size)
 
typedef int CDECL lame_encode_buffer_interleaved_ieee_float_t(lame_t gfp, const float pcm[], const int nsamples, unsigned char *mp3buf, const int mp3buf_size)
 
typedef int lame_encode_flush_t(lame_global_flags *gf, unsigned char *mp3buf, int size)
 
typedef int lame_close_t(lame_global_flags *)
 
typedef int lame_set_in_samplerate_t(lame_global_flags *, int)
 
typedef int lame_set_out_samplerate_t(lame_global_flags *, int)
 
typedef int lame_set_num_channels_t(lame_global_flags *, int)
 
typedef int lame_set_quality_t(lame_global_flags *, int)
 
typedef int lame_set_brate_t(lame_global_flags *, int)
 
typedef int lame_set_VBR_t(lame_global_flags *, vbr_mode)
 
typedef int lame_set_VBR_q_t(lame_global_flags *, int)
 
typedef int lame_set_VBR_min_bitrate_kbps_t(lame_global_flags *, int)
 
typedef int lame_set_mode_t(lame_global_flags *, MPEG_mode)
 
typedef int lame_set_preset_t(lame_global_flags *, int)
 
typedef int lame_set_error_protection_t(lame_global_flags *, int)
 
typedef int lame_set_disable_reservoir_t(lame_global_flags *, int)
 
typedef int lame_set_bWriteVbrTag_t(lame_global_flags *, int)
 
typedef size_t lame_get_lametag_frame_t(const lame_global_flags *, unsigned char *buffer, size_t size)
 
typedef void lame_mp3_tags_fid_t(lame_global_flags *, FILE *)
 

Enumerations

enum  MP3ChannelMode : unsigned { CHANNEL_JOINT = 0, CHANNEL_STEREO = 1, CHANNEL_MONO = 2 }
 
enum  : int {
  IndicatorSmallWidth = 9, IndicatorMediumWidth = 13, IndicatorOffset = 1, TopMargin = 1,
  BottomMargin = 2, LeftMargin = 1, RightMargin = 1, MIDI_MINIMAL_LATENCY_MS = 1,
  ID_QUIT_AUDACITY = 10000, ID_DISCARD_SELECTED, ID_RECOVER_SELECTED, ID_SKIP,
  ID_FILE_LIST, AddButtonID = 10000, RemoveButtonID, RenameButtonID,
  RestoreButtonID, ImportButtonID, ExportButtonID, SaveButtonID,
  DefaultsButtonID, InsertButtonID, EditButtonID, DeleteButtonID,
  UpButtonID, DownButtonID, ApplyToProjectButtonID = ApplyToProjectID, ApplyToFilesButtonID = ApplyToFilesID,
  RunID = 1000, BSaveID, ClearID, StaticTextID,
  BlockSizeID, DataSizeID, NumEditsID, RandSeedID,
  AU_SAMPLE_FORMAT_16 = 3, AU_SAMPLE_FORMAT_24 = 4, AU_SAMPLE_FORMAT_FLOAT = 6, kCommands,
  kMenus, kPreferences, kTracks, kClips,
  kEnvelopes, kLabels, kBoxes, nTypes,
  kJson, kLisp, kBrief, nFormats,
  FileListID = 6000, CopySelectedFilesButtonID, CopyNamesToClipboardID, FutureActionChoiceID,
  ID_Amp = 10000, ID_Peak, ID_Clip, ID_Bass = 10000,
  ID_Treble, ID_Gain, ID_Link, ID_PercentChange = 10000,
  ID_Multiplier, ID_FromVinyl, ID_ToVinyl, ID_ToLength,
  ID_Thresh = 10000, ID_Width, ID_Threshold = 10000, ID_NoiseFloor,
  ID_Ratio, ID_Attack, ID_Decay, ID_BUTTON_USECURRENTF = 10001,
  ID_BUTTON_USECURRENTB, ID_BUTTON_EXPORT, ID_BUTTON_RESET, ID_FOREGROUNDSTART_T,
  ID_FOREGROUNDEND_T, ID_BACKGROUNDSTART_T, ID_BACKGROUNDEND_T, ID_FOREGROUNDDB_TEXT,
  ID_BACKGROUNDDB_TEXT, ID_RESULTS_TEXT, ID_RESULTSDB_TEXT, ID_Sequence,
  ID_Amplitude, ID_Duration, ID_DutyCycle, ID_Length = 10000,
  ID_dBMax, ID_dBMin, ID_Clear, ID_Invert,
  ID_Mode, ID_Draw, ID_Graphic, ID_Interp,
  ID_Linear, ID_Grid, ID_Curve, ID_Manage,
  ID_Delete, ID_Slider, ID_Duration = 20000, ID_Toggles = 21000,
  ID_Sliders = 22000, ID_Texts = 23000, ID_Duration = 10000, ID_Triggers = 11000,
  ID_Toggles = 12000, ID_Sliders = 13000, ID_Choices = 14000, ID_Texts = 15000,
  ID_TIMER = 20000, ID_BUTTON_GETPROFILE = 10001, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_RESIDUE,
  ID_GAIN_SLIDER, ID_GAIN_TEXT, ID_NEW_SENSITIVITY_SLIDER, ID_NEW_SENSITIVITY_TEXT,
  ID_FREQ_SLIDER, ID_FREQ_TEXT, END_OF_BASIC_SLIDERS, END_OF_SLIDERS = END_OF_BASIC_SLIDERS,
  FIRST_SLIDER = ID_GAIN_SLIDER, ID_BUTTON_GETPROFILE = 10001, ID_BUTTON_LEAVENOISE, ID_RADIOBUTTON_KEEPSIGNAL,
  ID_RADIOBUTTON_KEEPNOISE, ID_SENSITIVITY_SLIDER, ID_GAIN_SLIDER, ID_FREQ_SLIDER,
  ID_TIME_SLIDER, ID_SENSITIVITY_TEXT, ID_GAIN_TEXT, ID_FREQ_TEXT,
  ID_TIME_TEXT, ID_Editor = 10000, ID_Load, ID_Save,
  ID_Slider = 11000, ID_Choice = 13000, ID_FILE = 15000, ID_Stages = 10000,
  ID_DryWet, ID_Freq, ID_Phase, ID_Depth,
  ID_Feedback, ID_OutGain, ID_RoomSize = 10000, ID_PreDelay,
  ID_Reverberance, ID_HfDamping, ID_ToneLow, ID_ToneHigh,
  ID_WetGain, ID_DryGain, ID_StereoWidth, ID_WetOnly,
  SBSMSOutBlockSize = 512, ID_FilterPanel = 10000, ID_dBMax, ID_dBMin,
  ID_Type, ID_SubType, ID_Order, ID_Ripple,
  ID_Cutoff, ID_StopbandRipple, ID_RatePercentChangeStart = 10000, ID_RatePercentChangeEnd,
  ID_PitchHalfStepsStart, ID_PitchHalfStepsEnd, ID_PitchPercentChangeStart, ID_PitchPercentChangeEnd,
  ID_Program = 10000, ID_Sliders = 11000, ID_Choices = 12000, ID_Texts = 13000,
  ID_Toggles = 14000, ID_Duration = 20000, ID_Sliders = 21000, ID_Freq = 10000,
  ID_Phase, ID_Depth, ID_Res, ID_FreqOfs,
  ID_OutGain, ID_MIXERPANEL = 10001, ID_SLIDER_CHANNEL, QUALITY_2 = 2,
  PRESET_INSANE = 0, PRESET_EXTREME = 1, PRESET_STANDARD = 2, PRESET_MEDIUM = 3,
  FormatID = 10001, OptionsID, DirID, CreateID,
  ChooseID, LabelID, FirstID, FirstFileNameID,
  TrackID, ByNameAndNumberID, ByNameID, ByNumberID,
  PrefixID, OverwriteID, FirstID = 7000, FreqZoomSliderID,
  FreqPanScrollerID, FreqExportButtonID, FreqAlgChoiceID, FreqSizeChoiceID,
  FreqFuncChoiceID, FreqAxisChoiceID, ReplotButtonID, GridOnOffID,
  ID_AVAIL = 1000, ID_FILESIZE, ID_TOTAL, ID_LEVELS,
  ID_DISCARD, ID_DISCARD_CLIPBOARD, ID_COMPACT, ChoiceID = 9000,
  PlayID, DetectID, ID_INSERTA = 11000, ID_INSERTB,
  ID_REMOVE, ID_IMPORT, ID_EXPORT, LoggerID_Save = wxID_HIGHEST + 1,
  LoggerID_Clear, LoggerID_Close, kID_RadioButton_BouncingBall = 10101, kID_RadioButton_Highlight,
  ID_BITMAPBUTTON_MUSICAL_INSTRUMENT = 13000, ID_SLIDER_PAN, ID_SLIDER_GAIN, ID_TOGGLEBUTTON_MUTE,
  ID_TOGGLEBUTTON_SOLO, kModuleDisabled = 0, kModuleEnabled = 1, kModuleAsk = 2,
  kModuleFailed = 3, kModuleNew = 4, STATE_Enabled, STATE_Disabled,
  STATE_New, STATE_COUNT, HostID = 10000, PlayID,
  RecordID, ChannelsID, ToolColumn, ActionColumn,
  ButtonsColumn, CommentColumn, UseCustomTrackNameID = 1000, ID_WINDOW_SIZE = 10001,
  ID_DEFAULTS, ID_DEFAULTS = 10001, ID_SCALE, ID_RANGE,
  FSCKstatus_CLOSE_REQ = 0x1, FSCKstatus_CHANGED = 0x2, FSCKstatus_SAVE_AUP = 0x4, SNAP_OFF,
  SNAP_NEAREST, SNAP_PRIOR, FirstID = 1000, HSBarID,
  VSBarID, NextID, FFT_SinCosBRTable, FFT_SinCosTableVBR16,
  FFT_SinCosTableBR16, FFT_FastMathBR16, FFT_FastMathBR24, IdMainWindowSmall = 19200,
  IdMainWindowLarge, IdDirectory, IdDirChoose, IdOneSec,
  IdTenSec, IdOneMin, IdFiveMin, IdOneHour,
  IdShortTracks, IdMedTracks, IdTallTracks, IdDelayCheckBox,
  IdCaptureFirst, IdCaptureEffects = IdCaptureFirst, IdCaptureScriptables, IdCapturePreferences,
  IdCaptureToolbars, IdAllDelayedEvents, IdCaptureWindowContents =IdAllDelayedEvents, IdCaptureFullWindow,
  IdCaptureWindowPlus, IdCaptureFullScreen, IdCaptureSelectionBar, IdCaptureSpectralSelection,
  IdCaptureTimer, IdCaptureTools, IdCaptureTransport, IdCaptureMixer,
  IdCaptureMeter, IdCapturePlayMeter, IdCaptureRecordMeter, IdCaptureEdit,
  IdCaptureDevice, IdCaptureTranscription, IdCaptureScrub, IdCaptureTrackPanel,
  IdCaptureRuler, IdCaptureTracks, IdCaptureFirstTrack, IdCaptureSecondTrack,
  IdCaptureLast = IdCaptureSecondTrack, IdLastDelayedEvent, IdToggleBackgroundBlue, IdToggleBackgroundWhite,
  eOkButton = 0x0001, eCancelButton = 0x0002, eYesButton = 0x0004, eNoButton = 0x0008,
  eHelpButton = 0x0010, ePreviewButton = 0x0020, eDebugButton = 0x0040, eSettingsButton = 0x0080,
  ePreviewDryButton = 0x0100, eApplyButton = 0x0200, eCloseButton = 0x0400, DontShowID =1000,
  ID_DATEPICKER_START = 10000, ID_TIMETEXT_START, ID_DATEPICKER_END, ID_TIMETEXT_END,
  ID_TIMETEXT_DURATION, ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_AUTOEXPORTPATH_BUTTON,
  ID_AUTOEXPORTPATH_TEXT, ID_AUTOSAVE_CHECKBOX, ID_AUTOEXPORT_CHECKBOX, POST_TIMER_RECORD_STOPPED = -3,
  POST_TIMER_RECORD_CANCEL_WAIT, POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_NOTHING = 0, POST_TIMER_RECORD_CLOSE,
  ETBCutID, ETBCopyID, ETBPasteID, ETBTrimID,
  ETBSilenceID, ETBUndoID, ETBRedoID, ETBZoomInID,
  ETBZoomOutID, ETBZoomSelID, ETBZoomFitID, ETBNumButtons,
  STBScrubID, STBSeekID, STBRulerID, STBNumButtons,
  STBFirstButton = STBScrubID, SelectionBarFirstID = 2700, RateID, SnapToID,
  OnMenuID, ChoiceID, StartTimeID, LengthTimeID,
  CenterTimeID, EndTimeID, AudioTimeID, TimeBarFirstID = 2800,
  AudioPositionID, ToolBarFloatMargin = 1, NoDockID = 0, TopDockID,
  BotDockID, DockCount = 2, TTB_PlaySpeed, TTB_PlaySpeedSlider,
  TTBNumButtons, @0::kTimerInterval = 50, kAffordancesAreaHeight = 18, kTopInset = 4,
  kTopMargin = kTopInset + kBorderThickness, kBottomMargin = kShadowThickness + kBorderThickness, kTrackSeparatorThickness = kBottomMargin + kTopMargin, kChannelSeparatorThickness = 1,
  OnSetFontID = 30000, OnCutSelectedTextID = 1, OnCopySelectedTextID, OnPasteSelectedTextID,
  OnDeleteSelectedLabelID, OnEditSelectedLabelID, OnUpOctaveID = 30000, OnDownOctaveID,
  OnZoomFitVerticalID = 20000, OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID,
  OnZoomHalfWaveID, OnZoomInVerticalID, OnZoomOutVerticalID, OnZoomMaxID,
  OnUpOctaveID, OnDownOctaveID, reserveDisplays = 100, OnRate8ID = 30000,
  OnRate11ID, OnRate16ID, OnRate22ID, OnRate44ID,
  OnRate48ID, OnRate88ID, OnRate96ID, OnRate176ID,
  OnRate192ID, OnRate352ID, OnRate384ID, OnRateOtherID,
  On16BitID, On24BitID, OnFloatID, OnMultiViewID,
  OnSetDisplayId, lastDisplayId = (OnSetDisplayId + reserveDisplays - 1), OnChannelLeftID, OnChannelRightID,
  OnChannelMonoID, OnMergeStereoID, OnSwapChannelsID, OnSplitStereoID,
  OnSplitStereoMonoID, ChannelMenuID, FirstAttachedItemId, OnZoomFitVerticalID = 20000,
  OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID,
  OnZoomInVerticalID, OnZoomOutVerticalID, OnFirstWaveformScaleID, OnLastWaveformScaleID = OnFirstWaveformScaleID + 9,
  OnFirstSpectrumScaleID, OnLastSpectrumScaleID = OnFirstSpectrumScaleID + 19, OnTimeTrackLinID = 30000, OnTimeTrackLogID,
  OnTimeTrackLogIntID, OnSetTimeTrackRangeID, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10,
  OnSetNameID = 2000, OnMoveUpID, OnMoveDownID, OnMoveTopID,
  OnMoveBottomID, SCRUBBING_PIXEL_TOLERANCE = 10, kOneSecondCountdown = 1000 / ScrubPollInterval_ms, SELECTION_RESIZE_REGION = 3,
  FREQ_SNAP_DISTANCE = 10, ID_TIMER = wxID_HIGHEST + 1, DontShowID = wxID_HIGHEST + 1, kToggleButtonID = 5000,
  kTimerID, OnMeterUpdateID = 6000, OnMonitorID, OnPreferencesID,
  MAX_HFFT = 10, kVerticalPadding = 7, kBorderThickness = 1, kShadowThickness = 1,
  kLeftInset = 4, kRightInset = kLeftInset, kLeftMargin = kLeftInset + kBorderThickness, kRightMargin = kRightInset + kShadowThickness + kBorderThickness,
  kTrackInfoWidth = 100 - kLeftMargin, ID_AUTOLOAD = 20000, ID_AUTOWRAP, ID_FONT,
  ID_SPLITV, ID_SPLITH, ID_TOGGLECODE, ID_TOGGLEOUTPUT,
  ID_SMALLICONS, ID_LARGEICONS, ID_MATCH, ID_TOP,
  ID_UP, ID_PREVIOUS, ID_NEXT, ID_GO,
  ID_STOP, ID_SCRIPT, ID_OUTPUT
}
 

Functions

TranslatableString n_kbps (int n)
 
int anonymous_namespace{ExportMP3.cpp}::ValidateValue (int nValues, int value, int defaultValue)
 
int anonymous_namespace{ExportMP3.cpp}::ValidateValue (const std::vector< int > &values, int value, int defaultValue)
 
int anonymous_namespace{ExportMP3.cpp}::ValidateIndex (const std::vector< int > &values, int value, int defaultIndex)
 
TranslatableString GetMP3Version (wxWindow *parent, bool prompt)
 

Variables

static const TranslatableStrings fixRateNames
 
static const std::vector< int > fixRateValues
 
static const TranslatableStrings varRateNames
 
static const TranslatableStrings setRateNames
 
static const TranslatableStrings setRateNamesShort
 
static const std::vector< int > sampRates
 
EnumSetting< MP3RateModeMP3RateModeSetting
 
static EnumSetting< MP3ChannelModeMP3ChannelModeSetting
 
static Exporter::RegisteredExportPlugin sRegisteredPlugin
 

Macro Definition Documentation

◆ ID_ABR

#define ID_ABR   7002

Definition at line 221 of file ExportMP3.cpp.

◆ ID_BROWSE

#define ID_BROWSE   5000

Definition at line 581 of file ExportMP3.cpp.

◆ ID_CBR

#define ID_CBR   7003

Definition at line 222 of file ExportMP3.cpp.

◆ ID_DLOAD

#define ID_DLOAD   5001

Definition at line 582 of file ExportMP3.cpp.

◆ ID_MONO

#define ID_MONO   7005

Definition at line 224 of file ExportMP3.cpp.

◆ ID_QUALITY

#define ID_QUALITY   7004

Definition at line 223 of file ExportMP3.cpp.

◆ ID_SET

#define ID_SET   7000

Definition at line 219 of file ExportMP3.cpp.

◆ ID_VBR

#define ID_VBR   7001

Definition at line 220 of file ExportMP3.cpp.

Typedef Documentation

◆ get_lame_version_t

typedef const char* get_lame_version_t(void)

Definition at line 719 of file ExportMP3.cpp.

◆ lame_close_t

typedef int lame_close_t(lame_global_flags *)

Definition at line 741 of file ExportMP3.cpp.

◆ lame_encode_buffer_ieee_float_t

typedef int CDECL lame_encode_buffer_ieee_float_t(lame_t gfp, const float pcm_l[], const float pcm_r[], const int nsamples, unsigned char *mp3buf, const int mp3buf_size)

Definition at line 721 of file ExportMP3.cpp.

◆ lame_encode_buffer_interleaved_ieee_float_t

typedef int CDECL lame_encode_buffer_interleaved_ieee_float_t(lame_t gfp, const float pcm[], const int nsamples, unsigned char *mp3buf, const int mp3buf_size)

Definition at line 729 of file ExportMP3.cpp.

◆ lame_encode_flush_t

typedef int lame_encode_flush_t(lame_global_flags *gf, unsigned char *mp3buf, int size)

Definition at line 736 of file ExportMP3.cpp.

◆ lame_get_lametag_frame_t

typedef size_t lame_get_lametag_frame_t(const lame_global_flags *, unsigned char *buffer, size_t size)

Definition at line 756 of file ExportMP3.cpp.

◆ lame_init_params_t

typedef int lame_init_params_t(lame_global_flags *)

Definition at line 718 of file ExportMP3.cpp.

◆ lame_init_t

typedef lame_global_flags* lame_init_t(void)

Definition at line 717 of file ExportMP3.cpp.

◆ lame_mp3_tags_fid_t

typedef void lame_mp3_tags_fid_t(lame_global_flags *, FILE *)

Definition at line 757 of file ExportMP3.cpp.

◆ lame_set_brate_t

typedef int lame_set_brate_t(lame_global_flags *, int)

Definition at line 747 of file ExportMP3.cpp.

◆ lame_set_bWriteVbrTag_t

typedef int lame_set_bWriteVbrTag_t(lame_global_flags *, int)

Definition at line 755 of file ExportMP3.cpp.

◆ lame_set_disable_reservoir_t

typedef int lame_set_disable_reservoir_t(lame_global_flags *, int)

Definition at line 754 of file ExportMP3.cpp.

◆ lame_set_error_protection_t

typedef int lame_set_error_protection_t(lame_global_flags *, int)

Definition at line 753 of file ExportMP3.cpp.

◆ lame_set_in_samplerate_t

typedef int lame_set_in_samplerate_t(lame_global_flags *, int)

Definition at line 743 of file ExportMP3.cpp.

◆ lame_set_mode_t

typedef int lame_set_mode_t(lame_global_flags *, MPEG_mode)

Definition at line 751 of file ExportMP3.cpp.

◆ lame_set_num_channels_t

typedef int lame_set_num_channels_t(lame_global_flags *, int)

Definition at line 745 of file ExportMP3.cpp.

◆ lame_set_out_samplerate_t

typedef int lame_set_out_samplerate_t(lame_global_flags *, int)

Definition at line 744 of file ExportMP3.cpp.

◆ lame_set_preset_t

typedef int lame_set_preset_t(lame_global_flags *, int)

Definition at line 752 of file ExportMP3.cpp.

◆ lame_set_quality_t

typedef int lame_set_quality_t(lame_global_flags *, int)

Definition at line 746 of file ExportMP3.cpp.

◆ lame_set_VBR_min_bitrate_kbps_t

typedef int lame_set_VBR_min_bitrate_kbps_t(lame_global_flags *, int)

Definition at line 750 of file ExportMP3.cpp.

◆ lame_set_VBR_q_t

typedef int lame_set_VBR_q_t(lame_global_flags *, int)

Definition at line 749 of file ExportMP3.cpp.

◆ lame_set_VBR_t

typedef int lame_set_VBR_t(lame_global_flags *, vbr_mode)

Definition at line 748 of file ExportMP3.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : int
Enumerator
IndicatorSmallWidth 
IndicatorMediumWidth 
IndicatorOffset 
TopMargin 
BottomMargin 
LeftMargin 
RightMargin 
MIDI_MINIMAL_LATENCY_MS 
ID_QUIT_AUDACITY 
ID_DISCARD_SELECTED 
ID_RECOVER_SELECTED 
ID_SKIP 
ID_FILE_LIST 
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 
RunID 
BSaveID 
ClearID 
StaticTextID 
BlockSizeID 
DataSizeID 
NumEditsID 
RandSeedID 
AU_SAMPLE_FORMAT_16 
AU_SAMPLE_FORMAT_24 
AU_SAMPLE_FORMAT_FLOAT 
kCommands 
kMenus 
kPreferences 
kTracks 
kClips 
kEnvelopes 
kLabels 
kBoxes 
nTypes 
kJson 
kLisp 
kBrief 
nFormats 
FileListID 
CopySelectedFilesButtonID 
CopyNamesToClipboardID 
FutureActionChoiceID 
ID_Amp 
ID_Peak 
ID_Clip 
ID_Bass 
ID_Treble 
ID_Gain 
ID_Link 
ID_PercentChange 
ID_Multiplier 
ID_FromVinyl 
ID_ToVinyl 
ID_ToLength 
ID_Thresh 
ID_Width 
ID_Threshold 
ID_NoiseFloor 
ID_Ratio 
ID_Attack 
ID_Decay 
ID_BUTTON_USECURRENTF 
ID_BUTTON_USECURRENTB 
ID_BUTTON_EXPORT 
ID_BUTTON_RESET 
ID_FOREGROUNDSTART_T 
ID_FOREGROUNDEND_T 
ID_BACKGROUNDSTART_T 
ID_BACKGROUNDEND_T 
ID_FOREGROUNDDB_TEXT 
ID_BACKGROUNDDB_TEXT 
ID_RESULTS_TEXT 
ID_RESULTSDB_TEXT 
ID_Sequence 
ID_Amplitude 
ID_Duration 
ID_DutyCycle 
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
ID_Duration 
ID_Toggles 
ID_Sliders 
ID_Texts 
ID_Duration 
ID_Triggers 
ID_Toggles 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_TIMER 
ID_BUTTON_GETPROFILE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_RESIDUE 
ID_GAIN_SLIDER 
ID_GAIN_TEXT 
ID_NEW_SENSITIVITY_SLIDER 
ID_NEW_SENSITIVITY_TEXT 
ID_FREQ_SLIDER 
ID_FREQ_TEXT 
END_OF_BASIC_SLIDERS 
END_OF_SLIDERS 
FIRST_SLIDER 
ID_BUTTON_GETPROFILE 
ID_BUTTON_LEAVENOISE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_KEEPNOISE 
ID_SENSITIVITY_SLIDER 
ID_GAIN_SLIDER 
ID_FREQ_SLIDER 
ID_TIME_SLIDER 
ID_SENSITIVITY_TEXT 
ID_GAIN_TEXT 
ID_FREQ_TEXT 
ID_TIME_TEXT 
ID_Editor 
ID_Load 
ID_Save 
ID_Slider 
ID_Choice 
ID_FILE 
ID_Stages 
ID_DryWet 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Feedback 
ID_OutGain 
ID_RoomSize 
ID_PreDelay 
ID_Reverberance 
ID_HfDamping 
ID_ToneLow 
ID_ToneHigh 
ID_WetGain 
ID_DryGain 
ID_StereoWidth 
ID_WetOnly 
SBSMSOutBlockSize 
ID_FilterPanel 
ID_dBMax 
ID_dBMin 
ID_Type 
ID_SubType 
ID_Order 
ID_Ripple 
ID_Cutoff 
ID_StopbandRipple 
ID_RatePercentChangeStart 
ID_RatePercentChangeEnd 
ID_PitchHalfStepsStart 
ID_PitchHalfStepsEnd 
ID_PitchPercentChangeStart 
ID_PitchPercentChangeEnd 
ID_Program 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_Toggles 
ID_Duration 
ID_Sliders 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Res 
ID_FreqOfs 
ID_OutGain 
ID_MIXERPANEL 
ID_SLIDER_CHANNEL 
QUALITY_2 
PRESET_INSANE 
PRESET_EXTREME 
PRESET_STANDARD 
PRESET_MEDIUM 
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 
FirstID 
FreqZoomSliderID 
FreqPanScrollerID 
FreqExportButtonID 
FreqAlgChoiceID 
FreqSizeChoiceID 
FreqFuncChoiceID 
FreqAxisChoiceID 
ReplotButtonID 
GridOnOffID 
ID_AVAIL 
ID_FILESIZE 
ID_TOTAL 
ID_LEVELS 
ID_DISCARD 
ID_DISCARD_CLIPBOARD 
ID_COMPACT 
ChoiceID 
PlayID 
DetectID 
ID_INSERTA 
ID_INSERTB 
ID_REMOVE 
ID_IMPORT 
ID_EXPORT 
LoggerID_Save 
LoggerID_Clear 
LoggerID_Close 
kID_RadioButton_BouncingBall 
kID_RadioButton_Highlight 
ID_BITMAPBUTTON_MUSICAL_INSTRUMENT 
ID_SLIDER_PAN 
ID_SLIDER_GAIN 
ID_TOGGLEBUTTON_MUTE 
ID_TOGGLEBUTTON_SOLO 
kModuleDisabled 
kModuleEnabled 
kModuleAsk 
kModuleFailed 
kModuleNew 
STATE_Enabled 
STATE_Disabled 
STATE_New 
STATE_COUNT 
HostID 
PlayID 
RecordID 
ChannelsID 
ToolColumn 
ActionColumn 
ButtonsColumn 
CommentColumn 
UseCustomTrackNameID 
ID_WINDOW_SIZE 
ID_DEFAULTS 
ID_DEFAULTS 
ID_SCALE 
ID_RANGE 
FSCKstatus_CLOSE_REQ 
FSCKstatus_CHANGED 
FSCKstatus_SAVE_AUP 
SNAP_OFF 
SNAP_NEAREST 
SNAP_PRIOR 
FirstID 
HSBarID 
VSBarID 
NextID 
FFT_SinCosBRTable 
FFT_SinCosTableVBR16 
FFT_SinCosTableBR16 
FFT_FastMathBR16 
FFT_FastMathBR24 
IdMainWindowSmall 
IdMainWindowLarge 
IdDirectory 
IdDirChoose 
IdOneSec 
IdTenSec 
IdOneMin 
IdFiveMin 
IdOneHour 
IdShortTracks 
IdMedTracks 
IdTallTracks 
IdDelayCheckBox 
IdCaptureFirst 
IdCaptureEffects 
IdCaptureScriptables 
IdCapturePreferences 
IdCaptureToolbars 
IdAllDelayedEvents 
IdCaptureWindowContents 
IdCaptureFullWindow 
IdCaptureWindowPlus 
IdCaptureFullScreen 
IdCaptureSelectionBar 
IdCaptureSpectralSelection 
IdCaptureTimer 
IdCaptureTools 
IdCaptureTransport 
IdCaptureMixer 
IdCaptureMeter 
IdCapturePlayMeter 
IdCaptureRecordMeter 
IdCaptureEdit 
IdCaptureDevice 
IdCaptureTranscription 
IdCaptureScrub 
IdCaptureTrackPanel 
IdCaptureRuler 
IdCaptureTracks 
IdCaptureFirstTrack 
IdCaptureSecondTrack 
IdCaptureLast 
IdLastDelayedEvent 
IdToggleBackgroundBlue 
IdToggleBackgroundWhite 
eOkButton 
eCancelButton 
eYesButton 
eNoButton 
eHelpButton 
ePreviewButton 
eDebugButton 
eSettingsButton 
ePreviewDryButton 
eApplyButton 
eCloseButton 
DontShowID 
ID_DATEPICKER_START 
ID_TIMETEXT_START 
ID_DATEPICKER_END 
ID_TIMETEXT_END 
ID_TIMETEXT_DURATION 
ID_AUTOSAVEPATH_BUTTON 
ID_AUTOSAVEPATH_TEXT 
ID_AUTOEXPORTPATH_BUTTON 
ID_AUTOEXPORTPATH_TEXT 
ID_AUTOSAVE_CHECKBOX 
ID_AUTOEXPORT_CHECKBOX 
POST_TIMER_RECORD_STOPPED 
POST_TIMER_RECORD_CANCEL_WAIT 
POST_TIMER_RECORD_CANCEL 
POST_TIMER_RECORD_NOTHING 
POST_TIMER_RECORD_CLOSE 
ETBCutID 
ETBCopyID 
ETBPasteID 
ETBTrimID 
ETBSilenceID 
ETBUndoID 
ETBRedoID 
ETBZoomInID 
ETBZoomOutID 
ETBZoomSelID 
ETBZoomFitID 
ETBNumButtons 
STBScrubID 
STBSeekID 
STBRulerID 
STBNumButtons 
STBFirstButton 
SelectionBarFirstID 
RateID 
SnapToID 
OnMenuID 
ChoiceID 
StartTimeID 
LengthTimeID 
CenterTimeID 
EndTimeID 
AudioTimeID 
TimeBarFirstID 
AudioPositionID 
ToolBarFloatMargin 
NoDockID 
TopDockID 
BotDockID 
DockCount 
TTB_PlaySpeed 
TTB_PlaySpeedSlider 
TTBNumButtons 
kTimerInterval 
kAffordancesAreaHeight 
kTopInset 
kTopMargin 
kBottomMargin 
kTrackSeparatorThickness 
kChannelSeparatorThickness 
OnSetFontID 
OnCutSelectedTextID 
OnCopySelectedTextID 
OnPasteSelectedTextID 
OnDeleteSelectedLabelID 
OnEditSelectedLabelID 
OnUpOctaveID 
OnDownOctaveID 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnZoomMaxID 
OnUpOctaveID 
OnDownOctaveID 
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnFirstWaveformScaleID 
OnLastWaveformScaleID 
OnFirstSpectrumScaleID 
OnLastSpectrumScaleID 
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
OnSetNameID 
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 
SCRUBBING_PIXEL_TOLERANCE 
kOneSecondCountdown 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
ID_TIMER 
DontShowID 
kToggleButtonID 
kTimerID 
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
MAX_HFFT 
kVerticalPadding 

Width of padding below each channel group

kBorderThickness 
kShadowThickness 
kLeftInset 
kRightInset 
kLeftMargin 
kRightMargin 
kTrackInfoWidth 
ID_AUTOLOAD 
ID_AUTOWRAP 
ID_FONT 
ID_SPLITV 
ID_SPLITH 
ID_TOGGLECODE 
ID_TOGGLEOUTPUT 
ID_SMALLICONS 
ID_LARGEICONS 
ID_MATCH 
ID_TOP 
ID_UP 
ID_PREVIOUS 
ID_NEXT 
ID_GO 
ID_STOP 
ID_SCRIPT 
ID_OUTPUT 

Definition at line 116 of file ExportMP3.cpp.

116  : int {
117  QUALITY_2 = 2,
118 
119  //ROUTINE_FAST = 0,
120  //ROUTINE_STANDARD = 1,
121 
122  PRESET_INSANE = 0,
123  PRESET_EXTREME = 1,
124  PRESET_STANDARD = 2,
125  PRESET_MEDIUM = 3,
126 };

◆ MP3ChannelMode

enum MP3ChannelMode : unsigned
Enumerator
CHANNEL_JOINT 
CHANNEL_STEREO 
CHANNEL_MONO 

Definition at line 110 of file ExportMP3.cpp.

110  : unsigned {
111  CHANNEL_JOINT = 0,
112  CHANNEL_STEREO = 1,
113  CHANNEL_MONO = 2,
114 };

Function Documentation

◆ GetMP3Version()

TranslatableString GetMP3Version ( wxWindow *  parent,
bool  prompt 
)

Definition at line 2234 of file ExportMP3.cpp.

2235 {
2236  MP3Exporter exporter;
2237  auto versionString = XO("MP3 export library not found");
2238 
2239 #ifndef DISABLE_DYNAMIC_LOADING_LAME
2240  if (prompt) {
2241  exporter.FindLibrary(parent);
2242  }
2243 
2244  if (exporter.LoadLibrary(parent, prompt ? MP3Exporter::Yes : MP3Exporter::No)) {
2245 #endif // DISABLE_DYNAMIC_LOADING_LAME
2246  versionString = Verbatim( exporter.GetLibraryVersion() );
2247 #ifdef MP3_EXPORT_BUILT_IN
2248  versionString.Join( XO("(Built-in)"), " " );
2249 #endif
2250 
2251 #ifndef DISABLE_DYNAMIC_LOADING_LAME
2252  }
2253 #endif // DISABLE_DYNAMIC_LOADING_LAME
2254 
2255  return versionString;
2256 }

References MP3Exporter::FindLibrary(), MP3Exporter::GetLibraryVersion(), MP3Exporter::LoadLibrary(), MP3Exporter::No, Verbatim(), XO, and MP3Exporter::Yes.

Referenced by LibraryPrefs::SetMP3VersionText().

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

◆ n_kbps()

TranslatableString n_kbps ( int  n)
inline

Definition at line 129 of file ExportMP3.cpp.

129 { return XO("%d kbps").Format( n ); }

References XO.

Variable Documentation

◆ fixRateNames

const TranslatableStrings fixRateNames
static
Initial value:
{
n_kbps(320),
n_kbps(256),
n_kbps(224),
n_kbps(192),
n_kbps(160),
n_kbps(144),
n_kbps(128),
n_kbps(112),
n_kbps(96),
n_kbps(80),
n_kbps(64),
n_kbps(56),
n_kbps(48),
n_kbps(40),
n_kbps(32),
n_kbps(24),
n_kbps(16),
n_kbps(8),
}

Definition at line 131 of file ExportMP3.cpp.

Referenced by ExportMP3Options::OnABR(), ExportMP3Options::OnCBR(), and ExportMP3Options::PopulateOrExchange().

◆ fixRateValues

const std::vector<int> fixRateValues
static
Initial value:
{
320,
256,
224,
192,
160,
144,
128,
112,
96,
80,
64,
56,
48,
40,
32,
24,
16,
8,
}

Definition at line 152 of file ExportMP3.cpp.

Referenced by ExportMP3::Export(), ExportMP3Options::OnABR(), ExportMP3Options::OnCBR(), ExportMP3Options::OnQuality(), and ExportMP3Options::PopulateOrExchange().

◆ MP3ChannelModeSetting

EnumSetting< MP3ChannelMode > MP3ChannelModeSetting
static
Initial value:
{
wxT("/FileFormats/MP3ChannelModeChoice"),
{
EnumValueSymbol{ wxT("JOINT"), XXO("Joint Stereo") },
EnumValueSymbol{ wxT("STEREO"), XXO("Stereo") },
},
0,
{
},
wxT("/FileFormats/MP3ChannelMode"),
}

Definition at line 313 of file ExportMP3.cpp.

Referenced by ExportMP3::Export(), and ExportMP3Options::PopulateOrExchange().

◆ MP3RateModeSetting

EnumSetting< MP3RateMode > MP3RateModeSetting
Initial value:
{
wxT("/FileFormats/MP3RateModeChoice"),
{
{ wxT("SET"), XXO("Preset") },
{ wxT("VBR"), XXO("Variable") },
{ wxT("ABR"), XXO("Average") },
{ wxT("CBR"), XXO("Constant") },
},
0,
{
},
wxT("/FileFormats/MP3RateMode"),
}

Definition at line 296 of file ExportMP3.cpp.

Referenced by ExportMP3::Export(), and ExportMP3Options::PopulateOrExchange().

◆ sampRates

const std::vector< int > sampRates
static
Initial value:
{
8000,
11025,
12000,
16000,
22050,
24000,
32000,
44100,
48000,
}

Definition at line 207 of file ExportMP3.cpp.

Referenced by ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ExportFFmpeg::CheckSampleRate(), and ExportMP3::Export().

◆ setRateNames

const TranslatableStrings setRateNames
static
Initial value:
{
XO("Insane, 320 kbps"),
XO("Extreme, 220-260 kbps"),
XO("Standard, 170-210 kbps"),
XO("Medium, 145-185 kbps"),
}

Definition at line 191 of file ExportMP3.cpp.

Referenced by ExportMP3::Export(), ExportMP3Options::OnSET(), and ExportMP3Options::PopulateOrExchange().

◆ setRateNamesShort

const TranslatableStrings setRateNamesShort
static
Initial value:
{
XO("Insane"),
XO("Extreme"),
XO("Standard"),
XO("Medium"),
}

Definition at line 199 of file ExportMP3.cpp.

Referenced by ExportMP3::Export().

◆ sRegisteredPlugin

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

Definition at line 2226 of file ExportMP3.cpp.

◆ varRateNames

const TranslatableStrings varRateNames
static
Initial value:
{
XO("220-260 kbps (Best Quality)"),
XO("200-250 kbps"),
XO("170-210 kbps"),
XO("155-195 kbps"),
XO("145-185 kbps"),
XO("110-150 kbps"),
XO("95-135 kbps"),
XO("80-120 kbps"),
XO("65-105 kbps"),
XO("45-85 kbps (Smaller files)"),
}

Definition at line 173 of file ExportMP3.cpp.

Referenced by ExportMP3::Export(), ExportMP3Options::OnVBR(), and ExportMP3Options::PopulateOrExchange().

MP3Exporter::LoadLibrary
bool LoadLibrary(wxWindow *parent, AskUser askuser)
Definition: ExportMP3.cpp:997
XO
#define XO(s)
Definition: Internat.h:31
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
MP3Exporter
Class used to export MP3 files.
Definition: ExportMP3.cpp:801
MODE_CBR
@ MODE_CBR
Definition: ExportMP3.h:22
XXO
#define XXO(s)
Definition: Internat.h:44
PRESET_STANDARD
@ PRESET_STANDARD
Definition: ExportMP3.cpp:124
CHANNEL_MONO
@ CHANNEL_MONO
Definition: ExportMP3.cpp:113
MODE_VBR
@ MODE_VBR
Definition: ExportMP3.h:20
PRESET_EXTREME
@ PRESET_EXTREME
Definition: ExportMP3.cpp:123
MP3Exporter::FindLibrary
bool FindLibrary(wxWindow *parent)
Definition: ExportMP3.cpp:962
CHANNEL_STEREO
@ CHANNEL_STEREO
Definition: ExportMP3.cpp:112
MODE_ABR
@ MODE_ABR
Definition: ExportMP3.h:21
QUALITY_2
@ QUALITY_2
Definition: ExportMP3.cpp:117
n_kbps
TranslatableString n_kbps(int n)
Definition: ExportMP3.cpp:129
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
PRESET_INSANE
@ PRESET_INSANE
Definition: ExportMP3.cpp:122
MP3Exporter::GetLibraryVersion
wxString GetLibraryVersion()
Definition: ExportMP3.cpp:1276
MP3Exporter::Yes
@ Yes
Definition: ExportMP3.cpp:807
MODE_SET
@ MODE_SET
Definition: ExportMP3.h:19
CHANNEL_JOINT
@ CHANNEL_JOINT
Definition: ExportMP3.cpp:111
PRESET_MEDIUM
@ PRESET_MEDIUM
Definition: ExportMP3.cpp:125
MP3Exporter::No
@ No
Definition: ExportMP3.cpp:805