More uses of AUDACITY_DLL_API...

... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
This commit is contained in:
Paul Licameli 2020-09-28 08:50:18 -04:00 committed by Paul Licameli
parent fbfccf1393
commit 406b23cae7
151 changed files with 428 additions and 310 deletions

View File

@ -30,4 +30,5 @@
#endif #endif
#include "Cursors32/SubViewsCursor.xpm" #include "Cursors32/SubViewsCursor.xpm"
AUDACITY_DLL_API
std::unique_ptr<wxCursor> MakeCursor(int WXUNUSED(CursorId), const char * const pXpm[36], int HotX, int HotY); std::unique_ptr<wxCursor> MakeCursor(int WXUNUSED(CursorId), const char * const pXpm[36], int HotX, int HotY);

View File

@ -51,7 +51,7 @@
class ModuleInterface; class ModuleInterface;
class PluginManagerInterface /* not final */ class AUDACITY_DLL_API PluginManagerInterface /* not final */
{ {
public: public:

View File

@ -287,7 +287,7 @@ using CommandIDs = std::vector<CommandID>;
// The msgid should be used only in unusual cases and the translation more often // The msgid should be used only in unusual cases and the translation more often
// //
// Implicit conversions to and from wxString are intentionally disabled // Implicit conversions to and from wxString are intentionally disabled
class TranslatableString { class AUDACITY_DLL_API TranslatableString {
enum class Request; enum class Request;
template< size_t N > struct PluralTemp; template< size_t N > struct PluralTemp;

View File

@ -22,7 +22,7 @@ class wxDC;
class wxGraphicsContext; class wxGraphicsContext;
class wxRect; class wxRect;
class AColor { class AUDACITY_DLL_API AColor {
public: public:
enum ColorGradientChoice { enum ColorGradientChoice {

View File

@ -29,7 +29,7 @@ struct AboutDialogCreditItem {
using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>; using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>;
class AboutDialog final : public wxDialogWrapper { class AUDACITY_DLL_API AboutDialog final : public wxDialogWrapper {
DECLARE_DYNAMIC_CLASS(AboutDialog) DECLARE_DYNAMIC_CLASS(AboutDialog)
public: public:

View File

@ -45,7 +45,8 @@ protected:
//! Abstract AudacityException subclass displays a message, specified by further subclass //! Abstract AudacityException subclass displays a message, specified by further subclass
/*! At most one message will be displayed for each pass through the main event idle loop, /*! At most one message will be displayed for each pass through the main event idle loop,
no matter how many exceptions were caught. */ no matter how many exceptions were caught. */
class MessageBoxException /* not final */ : public AudacityException class AUDACITY_DLL_API MessageBoxException /* not final */
: public AudacityException
{ {
//! Privatize the inherited function //! Privatize the inherited function
using AudacityException::DelayedHandlerAction; using AudacityException::DelayedHandlerAction;
@ -74,7 +75,8 @@ protected:
}; };
//! A MessageBoxException that shows a given, unvarying string. //! A MessageBoxException that shows a given, unvarying string.
class SimpleMessageBoxException /* not final */ : public MessageBoxException class AUDACITY_DLL_API SimpleMessageBoxException /* not final */
: public MessageBoxException
{ {
public: public:
explicit SimpleMessageBoxException( explicit SimpleMessageBoxException(

View File

@ -26,7 +26,7 @@
class wxFrame; class wxFrame;
class wxTextCtrl; class wxTextCtrl;
class AudacityLogger final : public wxEvtHandler, class AUDACITY_DLL_API AudacityLogger final : public wxEvtHandler,
public wxLog, public wxLog,
public PrefsListener public PrefsListener
{ {

View File

@ -14,6 +14,7 @@
class wxWindow; class wxWindow;
class AudacityProject; class AudacityProject;
AUDACITY_DLL_API
void RunBenchmark( wxWindow *parent, AudacityProject &project ); void RunBenchmark( wxWindow *parent, AudacityProject &project );
#endif // define __AUDACITY_BENCHMARK__ #endif // define __AUDACITY_BENCHMARK__

View File

@ -44,7 +44,7 @@ template< typename Object > using BarePtr = Object*;
*/ */
template< template<
template<typename> class Owner = UniquePtr template<typename> class Owner = UniquePtr
> struct Cloneable > struct AUDACITY_DLL_API Cloneable
{ {
using Base = Cloneable; using Base = Cloneable;
using PointerType = Owner< Base >; using PointerType = Owner< Base >;

View File

@ -23,7 +23,7 @@ class TrackList;
wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API, wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API,
EVT_CLIPBOARD_CHANGE, wxCommandEvent ); EVT_CLIPBOARD_CHANGE, wxCommandEvent );
class Clipboard final class AUDACITY_DLL_API Clipboard final
: public wxEvtHandler : public wxEvtHandler
{ {
public: public:

View File

@ -15,10 +15,17 @@ Paul Licameli split from Menus.cpp
#include "commands/CommandFlag.h" #include "commands/CommandFlag.h"
AUDACITY_DLL_API
bool EditableTracksSelectedPred( const AudacityProject &project ); bool EditableTracksSelectedPred( const AudacityProject &project );
AUDACITY_DLL_API
bool AudioIOBusyPred( const AudacityProject &project ); bool AudioIOBusyPred( const AudacityProject &project );
AUDACITY_DLL_API
bool TimeSelectedPred( const AudacityProject &project ); bool TimeSelectedPred( const AudacityProject &project );
extern const CommandFlagOptions &cutCopyOptions();
AUDACITY_DLL_API
const CommandFlagOptions &cutCopyOptions();
extern AUDACITY_DLL_API const ReservedCommandFlag extern AUDACITY_DLL_API const ReservedCommandFlag
&AudioIONotBusyFlag(), &AudioIONotBusyFlag(),

View File

@ -26,6 +26,7 @@
namespace CrashReport namespace CrashReport
{ {
AUDACITY_DLL_API
void Generate(wxDebugReport::Context ctx); void Generate(wxDebugReport::Context ctx);
} }
#endif #endif

View File

@ -131,7 +131,7 @@ private:
Commit() must not be called again after one successful call. Commit() must not be called again after one successful call.
An exception is thrown from the constructor if the transaction cannot open. An exception is thrown from the constructor if the transaction cannot open.
*/ */
class TransactionScope class AUDACITY_DLL_API TransactionScope
{ {
public: public:
TransactionScope(DBConnection &connection, const char *name); TransactionScope(DBConnection &connection, const char *name);

View File

@ -18,8 +18,6 @@
#ifndef __AUDACITY_DEVICEMANAGER__ #ifndef __AUDACITY_DEVICEMANAGER__
#define __AUDACITY_DEVICEMANAGER__ #define __AUDACITY_DEVICEMANAGER__
#include <chrono> #include <chrono>
#include <vector> #include <vector>
@ -45,9 +43,10 @@ typedef struct DeviceSourceMap {
wxString hostString; wxString hostString;
} DeviceSourceMap; } DeviceSourceMap;
AUDACITY_DLL_API
wxString MakeDeviceSourceString(const DeviceSourceMap *map); wxString MakeDeviceSourceString(const DeviceSourceMap *map);
class DeviceManager final class AUDACITY_DLL_API DeviceManager final
#if defined(EXPERIMENTAL_DEVICE_CHANGE_HANDLER) #if defined(EXPERIMENTAL_DEVICE_CHANGE_HANDLER)
#if defined(HAVE_DEVICE_CHANGE) #if defined(HAVE_DEVICE_CHANGE)
: public DeviceChangeHandler : public DeviceChangeHandler

View File

@ -25,7 +25,7 @@ public:
static DitherType FastDitherChoice(); static DitherType FastDitherChoice();
static DitherType BestDitherChoice(); static DitherType BestDitherChoice();
static EnumSetting< DitherType > FastSetting, BestSetting; static AUDACITY_DLL_API EnumSetting< DitherType > FastSetting, BestSetting;
/// Default constructor /// Default constructor
Dither(); Dither();

View File

@ -68,7 +68,7 @@ private:
typedef std::vector<EnvPoint> EnvArray; typedef std::vector<EnvPoint> EnvArray;
struct TrackPanelDrawingContext; struct TrackPanelDrawingContext;
class Envelope /* not final */ : public XMLTagHandler { class AUDACITY_DLL_API Envelope /* not final */ : public XMLTagHandler {
public: public:
// Envelope can define a piecewise linear function, or piecewise exponential. // Envelope can define a piecewise linear function, or piecewise exponential.
Envelope(bool exponential, double minValue, double maxValue, double defaultValue); Envelope(bool exponential, double minValue, double maxValue, double defaultValue);

View File

@ -19,7 +19,7 @@ class ZoomInfo;
// A class that holds state for the duration of dragging // A class that holds state for the duration of dragging
// of an envelope point. // of an envelope point.
class EnvelopeEditor class AUDACITY_DLL_API EnvelopeEditor
{ {
public: public:
static void DrawPoints( static void DrawPoints(

View File

@ -72,6 +72,7 @@ void PowerSpectrum(size_t NumSamples, const float *In, float *Out);
* NumSamples must be a power of two. * NumSamples must be a power of two.
*/ */
AUDACITY_DLL_API
void RealFFT(size_t NumSamples, void RealFFT(size_t NumSamples,
const float *RealIn, float *RealOut, float *ImagOut); const float *RealIn, float *RealOut, float *ImagOut);
@ -80,6 +81,7 @@ void RealFFT(size_t NumSamples,
* so the output is purely real. NumSamples must be a power of * so the output is purely real. NumSamples must be a power of
* two. * two.
*/ */
AUDACITY_DLL_API
void InverseRealFFT(size_t NumSamples, void InverseRealFFT(size_t NumSamples,
const float *RealIn, const float *ImagIn, float *RealOut); const float *RealIn, const float *ImagIn, float *RealOut);
@ -89,6 +91,7 @@ void InverseRealFFT(size_t NumSamples,
* inverse transform as well. * inverse transform as well.
*/ */
AUDACITY_DLL_API
void FFT(size_t NumSamples, void FFT(size_t NumSamples,
bool InverseTransform, bool InverseTransform,
const float *RealIn, const float *ImagIn, float *RealOut, float *ImagOut); const float *RealIn, const float *ImagIn, float *RealOut, float *ImagOut);
@ -117,6 +120,7 @@ enum eWindowFunctions
eWinFuncCount eWinFuncCount
}; };
AUDACITY_DLL_API
void WindowFunc(int whichFunction, size_t NumSamples, float *data); void WindowFunc(int whichFunction, size_t NumSamples, float *data);
/* /*
@ -125,6 +129,7 @@ void WindowFunc(int whichFunction, size_t NumSamples, float *data);
* otherwise about (NumSamples - 1) / 2 * otherwise about (NumSamples - 1) / 2
* All functions have 0 in data[0] except Rectangular, Hamming and Gaussians * All functions have 0 in data[0] except Rectangular, Hamming and Gaussians
*/ */
AUDACITY_DLL_API
void NewWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data); void NewWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data);
/* /*
@ -134,19 +139,20 @@ void NewWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float
* otherwise about (NumSamples - 1) / 2 * otherwise about (NumSamples - 1) / 2
* All functions have 0 in data[0] except Rectangular, Hamming and Gaussians * All functions have 0 in data[0] except Rectangular, Hamming and Gaussians
*/ */
AUDACITY_DLL_API
void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data); void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data);
/* /*
* Returns the name of the windowing function (for UI display) * Returns the name of the windowing function (for UI display)
*/ */
const TranslatableString WindowFuncName(int whichFunction); AUDACITY_DLL_API const TranslatableString WindowFuncName(int whichFunction);
/* /*
* Returns the number of windowing functions supported * Returns the number of windowing functions supported
*/ */
int NumWindowFuncs(); AUDACITY_DLL_API int NumWindowFuncs();
void DeinitFFT(); void DeinitFFT();

View File

@ -14,7 +14,8 @@
#include <wx/filename.h> // wxFileName member variable #include <wx/filename.h> // wxFileName member variable
//! Thrown for failure of file or database operations in deeply nested places //! Thrown for failure of file or database operations in deeply nested places
class FileException /* not final */ : public MessageBoxException class AUDACITY_DLL_API FileException /* not final */
: public MessageBoxException
{ {
public: public:
//! Identifies file operation that failed //! Identifies file operation that failed

View File

@ -30,6 +30,7 @@ class wxString;
/** @brief Get the number of container formats supported by libsndfile /** @brief Get the number of container formats supported by libsndfile
* *
* Uses SFC_GET_FORMAT_MAJOR_COUNT in sf_command interface */ * Uses SFC_GET_FORMAT_MAJOR_COUNT in sf_command interface */
AUDACITY_DLL_API
int sf_num_headers(); int sf_num_headers();
/** @brief Get the name of a container format from libsndfile /** @brief Get the name of a container format from libsndfile
@ -39,8 +40,10 @@ int sf_num_headers();
* @param format_num The libsndfile format number for the container format * @param format_num The libsndfile format number for the container format
* required * required
*/ */
AUDACITY_DLL_API
wxString sf_header_index_name(int format_num); wxString sf_header_index_name(int format_num);
AUDACITY_DLL_API
unsigned int sf_header_index_to_type(int format_num); unsigned int sf_header_index_to_type(int format_num);
// //
@ -48,11 +51,14 @@ unsigned int sf_header_index_to_type(int format_num);
// //
/** @brief Get the number of data encodings libsndfile supports (in any /** @brief Get the number of data encodings libsndfile supports (in any
* container or none */ * container or none */
AUDACITY_DLL_API
int sf_num_encodings(); int sf_num_encodings();
/** @brief Get the string name of the data encoding of the requested format /** @brief Get the string name of the data encoding of the requested format
* *
* uses SFC_GET_FORMAT_SUBTYPE */ * uses SFC_GET_FORMAT_SUBTYPE */
AUDACITY_DLL_API
wxString sf_encoding_index_name(int encoding_num); wxString sf_encoding_index_name(int encoding_num);
AUDACITY_DLL_API
unsigned int sf_encoding_index_to_subtype(int encoding_num); unsigned int sf_encoding_index_to_subtype(int encoding_num);
// //
@ -64,6 +70,7 @@ unsigned int sf_encoding_index_to_subtype(int encoding_num);
* then use SFC_GET_FORMAT_INFO to get the description * then use SFC_GET_FORMAT_INFO to get the description
* @param format the libsndfile format to get the name for (only the container * @param format the libsndfile format to get the name for (only the container
* part is used) */ * part is used) */
AUDACITY_DLL_API
wxString sf_header_name(int format); wxString sf_header_name(int format);
/** @brief Get an abbreviated form of the string name of the specified format /** @brief Get an abbreviated form of the string name of the specified format
* *
@ -71,6 +78,7 @@ wxString sf_header_name(int format);
* to get just the first word of the format name. * to get just the first word of the format name.
* @param format the libsndfile format to get the name for (only the container * @param format the libsndfile format to get the name for (only the container
* part is used) */ * part is used) */
AUDACITY_DLL_API
wxString sf_header_shortname(int format); wxString sf_header_shortname(int format);
/** @brief Get the most common file extension for the given format /** @brief Get the most common file extension for the given format
* *
@ -78,6 +86,7 @@ wxString sf_header_shortname(int format);
* format, then retrieve the most common extension using SFC_GET_FORMAT_INFO. * format, then retrieve the most common extension using SFC_GET_FORMAT_INFO.
* @param format the libsndfile format to get the name for (only the container * @param format the libsndfile format to get the name for (only the container
* part is used) */ * part is used) */
AUDACITY_DLL_API
wxString sf_header_extension(int format); wxString sf_header_extension(int format);
/** @brief Get the string name of the specified data encoding /** @brief Get the string name of the specified data encoding
* *
@ -98,13 +107,18 @@ SF_FORMAT_INFO *sf_simple_format(int i);
// other utility functions // other utility functions
// //
AUDACITY_DLL_API
bool sf_subtype_more_than_16_bits(unsigned int format); bool sf_subtype_more_than_16_bits(unsigned int format);
AUDACITY_DLL_API
bool sf_subtype_is_integer(unsigned int format); bool sf_subtype_is_integer(unsigned int format);
AUDACITY_DLL_API
int sf_subtype_bytes_per_sample(unsigned int format); int sf_subtype_bytes_per_sample(unsigned int format);
AUDACITY_DLL_API
//! Choose the narrowest value in the sampleFormat enumeration for a given libsndfile format //! Choose the narrowest value in the sampleFormat enumeration for a given libsndfile format
sampleFormat sf_subtype_to_effective_format(unsigned int format); sampleFormat sf_subtype_to_effective_format(unsigned int format);
AUDACITY_DLL_API
extern FileExtensions sf_get_all_extensions(); extern FileExtensions sf_get_all_extensions();
wxString sf_normalize_name(const char *name); wxString sf_normalize_name(const char *name);
@ -123,7 +137,7 @@ inline R SFCall(F fun, Args&&... args)
} }
//RAII for SNDFILE* //RAII for SNDFILE*
struct SFFileCloser { int operator () (SNDFILE*) const; }; struct AUDACITY_DLL_API SFFileCloser { int operator () (SNDFILE*) const; };
struct SFFile : public std::unique_ptr<SNDFILE, ::SFFileCloser> struct SFFile : public std::unique_ptr<SNDFILE, ::SFFileCloser>
{ {
SFFile() = default; SFFile() = default;

View File

@ -18,7 +18,7 @@ class wxOutputStream;
class wxFFileOutputStream; class wxFFileOutputStream;
class wxFileNameWrapper; class wxFileNameWrapper;
class FileIO class AUDACITY_DLL_API FileIO
{ {
public: public:
typedef enum FileIOMode typedef enum FileIOMode

View File

@ -69,7 +69,7 @@ namespace FileNames
}; };
// Frequently used types // Frequently used types
extern const FileType extern AUDACITY_DLL_API const FileType
AllFiles // * AllFiles // *
, AudacityProjects // *.aup3 , AudacityProjects // *.aup3
, DynamicLibraries // depends on the operating system , DynamicLibraries // depends on the operating system
@ -80,20 +80,21 @@ namespace FileNames
// Convert fileTypes into a single string as expected by wxWidgets file // Convert fileTypes into a single string as expected by wxWidgets file
// selection dialog // selection dialog
wxString FormatWildcard( const FileTypes &fileTypes ); AUDACITY_DLL_API wxString FormatWildcard( const FileTypes &fileTypes );
// This exists to compensate for bugs in wxCopyFile: // This exists to compensate for bugs in wxCopyFile:
bool DoCopyFile( AUDACITY_DLL_API bool DoCopyFile(
const FilePath& file1, const FilePath& file2, bool overwrite = true); const FilePath& file1, const FilePath& file2, bool overwrite = true);
// wxWidgets doesn't have a function to do this: make a hard file-system // wxWidgets doesn't have a function to do this: make a hard file-system
// link if possible. It might not be, as when the paths are on different // link if possible. It might not be, as when the paths are on different
// storage devices. // storage devices.
AUDACITY_DLL_API
bool HardLinkFile( const FilePath& file1, const FilePath& file2); bool HardLinkFile( const FilePath& file1, const FilePath& file2);
wxString MkDir(const wxString &Str); AUDACITY_DLL_API wxString MkDir(const wxString &Str);
bool IsMidi(const FilePath &fName); AUDACITY_DLL_API bool IsMidi(const FilePath &fName);
/** \brief A list of directories that should be searched for Audacity files /** \brief A list of directories that should be searched for Audacity files
* (plug-ins, help files, etc.). * (plug-ins, help files, etc.).
@ -103,52 +104,52 @@ namespace FileNames
* directories can be specified using the AUDACITY_PATH environment * directories can be specified using the AUDACITY_PATH environment
* variable. On Windows or Mac OS, this will include the directory * variable. On Windows or Mac OS, this will include the directory
* which contains the Audacity program. */ * which contains the Audacity program. */
const FilePaths &AudacityPathList(); AUDACITY_DLL_API const FilePaths &AudacityPathList();
void SetAudacityPathList( FilePaths list ); AUDACITY_DLL_API void SetAudacityPathList( FilePaths list );
// originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames. // originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames.
void MakeNameUnique( AUDACITY_DLL_API void MakeNameUnique(
FilePaths &otherNames, wxFileName &newName); FilePaths &otherNames, wxFileName &newName);
wxString LowerCaseAppNameInPath( const wxString & dirIn); AUDACITY_DLL_API wxString LowerCaseAppNameInPath( const wxString & dirIn);
/** \brief Audacity user data directory /** \brief Audacity user data directory
* *
* Where audacity keeps its settings and other user data squirreled away, * Where audacity keeps its settings and other user data squirreled away,
* by default ~/.audacity-data/ on Unix, Application Data/Audacity on * by default ~/.audacity-data/ on Unix, Application Data/Audacity on
* windows system */ * windows system */
FilePath DataDir(); AUDACITY_DLL_API FilePath DataDir();
FilePath ResourcesDir(); AUDACITY_DLL_API FilePath ResourcesDir();
FilePath HtmlHelpDir(); AUDACITY_DLL_API FilePath HtmlHelpDir();
FilePath HtmlHelpIndexFile(bool quick); AUDACITY_DLL_API FilePath HtmlHelpIndexFile(bool quick);
FilePath LegacyChainDir(); AUDACITY_DLL_API FilePath LegacyChainDir();
FilePath MacroDir(); AUDACITY_DLL_API FilePath MacroDir();
FilePath NRPDir(); AUDACITY_DLL_API FilePath NRPDir();
FilePath NRPFile(); AUDACITY_DLL_API FilePath NRPFile();
FilePath PluginRegistry(); AUDACITY_DLL_API FilePath PluginRegistry();
FilePath PluginSettings(); AUDACITY_DLL_API FilePath PluginSettings();
FilePath BaseDir(); AUDACITY_DLL_API FilePath BaseDir();
FilePath ModulesDir(); AUDACITY_DLL_API FilePath ModulesDir();
/** \brief The user plug-in directory (not a system one) /** \brief The user plug-in directory (not a system one)
* *
* This returns the string path to where the user may have put plug-ins * This returns the string path to where the user may have put plug-ins
* if they don't have system admin rights. Under default settings, it's * if they don't have system admin rights. Under default settings, it's
* <DataDir>/Plug-Ins/ */ * <DataDir>/Plug-Ins/ */
FilePath PlugInDir(); AUDACITY_DLL_API FilePath PlugInDir();
FilePath ThemeDir(); AUDACITY_DLL_API FilePath ThemeDir();
FilePath ThemeComponentsDir(); AUDACITY_DLL_API FilePath ThemeComponentsDir();
FilePath ThemeCachePng(); AUDACITY_DLL_API FilePath ThemeCachePng();
FilePath ThemeCacheAsCee(); AUDACITY_DLL_API FilePath ThemeCacheAsCee();
FilePath ThemeComponent(const wxString &Str); AUDACITY_DLL_API FilePath ThemeComponent(const wxString &Str);
FilePath ThemeCacheHtm(); AUDACITY_DLL_API FilePath ThemeCacheHtm();
FilePath ThemeImageDefsAsCee(); AUDACITY_DLL_API FilePath ThemeImageDefsAsCee();
// Obtain name of loaded module that contains address // Obtain name of loaded module that contains address
FilePath PathFromAddr(void *addr); AUDACITY_DLL_API FilePath PathFromAddr(void *addr);
bool IsPathAvailable( const FilePath & Path); AUDACITY_DLL_API bool IsPathAvailable( const FilePath & Path);
wxFileNameWrapper DefaultToDocumentsFolder AUDACITY_DLL_API wxFileNameWrapper DefaultToDocumentsFolder
(const wxString &preference); (const wxString &preference);
// If not None, determines a preference key (for the default path string) to // If not None, determines a preference key (for the default path string) to
@ -176,10 +177,10 @@ namespace FileNames
LastUsed LastUsed
}; };
wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type); AUDACITY_DLL_API wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type);
FilePath FindDefaultPath(Operation op); AUDACITY_DLL_API FilePath FindDefaultPath(Operation op);
void UpdateDefaultPath(Operation op, const FilePath &path); AUDACITY_DLL_API void UpdateDefaultPath(Operation op, const FilePath &path);
// F is a function taking a wxString, returning wxString // F is a function taking a wxString, returning wxString
template<typename F> template<typename F>
@ -194,7 +195,7 @@ namespace FileNames
return result; return result;
} }
FilePath AUDACITY_DLL_API FilePath
SelectFile(Operation op, // op matters only when default_path is empty SelectFile(Operation op, // op matters only when default_path is empty
const TranslatableString& message, const TranslatableString& message,
const FilePath& default_path, const FilePath& default_path,
@ -205,11 +206,11 @@ namespace FileNames
wxWindow *parent); wxWindow *parent);
// Useful functions for working with search paths // Useful functions for working with search paths
void AddUniquePathToPathList(const FilePath &path, AUDACITY_DLL_API void AddUniquePathToPathList(const FilePath &path,
FilePaths &pathList); FilePaths &pathList);
void AddMultiPathsToPathList(const wxString &multiPathString, AUDACITY_DLL_API void AddMultiPathsToPathList(const wxString &multiPathString,
FilePaths &pathList); FilePaths &pathList);
void FindFilesInPathList(const wxString & pattern, AUDACITY_DLL_API void FindFilesInPathList(const wxString & pattern,
const FilePaths & pathList, const FilePaths & pathList,
FilePaths &results, FilePaths &results,
int flags = wxDIR_FILES); int flags = wxDIR_FILES);
@ -217,18 +218,18 @@ namespace FileNames
/** \brief Protect against Unicode to multi-byte conversion failures /** \brief Protect against Unicode to multi-byte conversion failures
* on Windows */ * on Windows */
#if defined(__WXMSW__) #if defined(__WXMSW__)
char *VerifyFilename(const wxString &s, bool input = true); AUDACITY_DLL_API char *VerifyFilename(const wxString &s, bool input = true);
#endif #endif
// wxString compare function for sorting case, which is needed to load correctly. // wxString compare function for sorting case, which is needed to load correctly.
int CompareNoCase(const wxString& first, const wxString& second); AUDACITY_DLL_API int CompareNoCase(const wxString& first, const wxString& second);
// Create a unique filename using the passed prefix and suffix // Create a unique filename using the passed prefix and suffix
wxString CreateUniqueName(const wxString &prefix, AUDACITY_DLL_API wxString CreateUniqueName(const wxString &prefix,
const wxString &suffix = wxEmptyString); const wxString &suffix = wxEmptyString);
// File extension used for unsaved/temporary project files // File extension used for unsaved/temporary project files
wxString UnsavedProjectExtension(); AUDACITY_DLL_API wxString UnsavedProjectExtension();
AUDACITY_DLL_API AUDACITY_DLL_API
bool IsOnFATFileSystem(const FilePath &path); bool IsOnFATFileSystem(const FilePath &path);

View File

@ -14,12 +14,12 @@
class TranslatableString; class TranslatableString;
class wxString; class wxString;
wxString HelpText( const wxString & Key ); AUDACITY_DLL_API wxString HelpText( const wxString & Key );
TranslatableString TitleText( const wxString & Key ); AUDACITY_DLL_API TranslatableString TitleText( const wxString & Key );
extern const wxString VerCheckArgs(); extern AUDACITY_DLL_API const wxString VerCheckArgs();
extern const wxString VerCheckUrl(); extern AUDACITY_DLL_API const wxString VerCheckUrl();
extern const wxString VerCheckHtml(); extern AUDACITY_DLL_API const wxString VerCheckHtml();
extern wxString FormatHtmlText( const wxString & Text ); extern AUDACITY_DLL_API wxString FormatHtmlText( const wxString & Text );
#endif #endif

View File

@ -18,6 +18,7 @@ class wxImage;
// the entire image by the vector difference between that // the entire image by the vector difference between that
// pixel and the dstColour. For better control, use // pixel and the dstColour. For better control, use
// ChangeImageColour(wxImage, wxColour*, wxColour*) below // ChangeImageColour(wxImage, wxColour*, wxColour*) below
AUDACITY_DLL_API
std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage, wxColour & dstColour); std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage, wxColour & dstColour);
// This function takes a source image, which it assumes to // This function takes a source image, which it assumes to
@ -27,6 +28,7 @@ std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage, wxColour & dstCol
// Audacity uses this routines to make the buttons // Audacity uses this routines to make the buttons
// (skip-start, play, stop, record, skip-end) adapt to // (skip-start, play, stop, record, skip-end) adapt to
// the color scheme of the user. // the color scheme of the user.
AUDACITY_DLL_API
std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage, std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage,
wxColour & srcColour, wxColour & srcColour,
wxColour & dstColour); wxColour & dstColour);
@ -36,6 +38,7 @@ std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage,
// returns a NEW image where the foreground has been // returns a NEW image where the foreground has been
// overlaid onto the background using alpha-blending, // overlaid onto the background using alpha-blending,
// at location (xoff, yoff). // at location (xoff, yoff).
AUDACITY_DLL_API
std::unique_ptr<wxImage> OverlayImage(wxImage * background, wxImage * foreground, std::unique_ptr<wxImage> OverlayImage(wxImage * background, wxImage * foreground,
wxImage * mask, int xoff, int yoff); wxImage * mask, int xoff, int yoff);
@ -45,23 +48,29 @@ using teBmps = int; /// The index of a bitmap resource in Theme Resources.
// Same idea, but this time the mask is an alpha channel in // Same idea, but this time the mask is an alpha channel in
// the foreground bitmap, and it's all retrieved from Themes. // the foreground bitmap, and it's all retrieved from Themes.
AUDACITY_DLL_API
std::unique_ptr<wxImage> OverlayImage(teBmps eBack, teBmps eForeground, std::unique_ptr<wxImage> OverlayImage(teBmps eBack, teBmps eForeground,
int xoff, int yoff); int xoff, int yoff);
// Creates an image with a solid background color // Creates an image with a solid background color
AUDACITY_DLL_API
std::unique_ptr<wxImage> CreateBackground(int width, int height, wxColour colour); std::unique_ptr<wxImage> CreateBackground(int width, int height, wxColour colour);
// Creates an image with the Mac OS X Aqua stripes, to be used // Creates an image with the Mac OS X Aqua stripes, to be used
// as a background // as a background
AUDACITY_DLL_API
std::unique_ptr<wxImage> CreateAquaBackground(int width, int height, int offset); std::unique_ptr<wxImage> CreateAquaBackground(int width, int height, int offset);
// Uses color on all OS except Mac, uses Aqua // Uses color on all OS except Mac, uses Aqua
AUDACITY_DLL_API
std::unique_ptr<wxImage> CreateSysBackground(int width, int height, int offset, std::unique_ptr<wxImage> CreateSysBackground(int width, int height, int offset,
wxColour colour); wxColour colour);
// Pastes one image into another at specified location. // Pastes one image into another at specified location.
AUDACITY_DLL_API
void PasteSubImage( wxImage * pDest, wxImage * pSrc, int x, int y ); void PasteSubImage( wxImage * pDest, wxImage * pSrc, int x, int y );
// Gets a rectangle from within another image, INCLUDING the alpha channel // Gets a rectangle from within another image, INCLUDING the alpha channel
AUDACITY_DLL_API
wxImage GetSubImageWithAlpha( const wxImage & Src, const wxRect &rect ); wxImage GetSubImageWithAlpha( const wxImage & Src, const wxRect &rect );

View File

@ -20,7 +20,7 @@
The error message identifies source file and line number, possibly the function too (depending on The error message identifies source file and line number, possibly the function too (depending on
the compiler), and suggests that the user inform the development team. the compiler), and suggests that the user inform the development team.
*/ */
class InconsistencyException final : public MessageBoxException class AUDACITY_DLL_API InconsistencyException final : public MessageBoxException
{ {
public: public:
InconsistencyException() {} InconsistencyException() {}

View File

@ -101,7 +101,7 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
#define XPC(sing, plur, n, c) \ #define XPC(sing, plur, n, c) \
TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) ) TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )
class Internat class AUDACITY_DLL_API Internat
{ {
public: public:
/** \brief Initialize internationalisation support. Call this once at /** \brief Initialize internationalisation support. Call this once at
@ -161,9 +161,9 @@ private:
#define LAT1CTOWX(X) wxString((X), wxConvISO8859_1) #define LAT1CTOWX(X) wxString((X), wxConvISO8859_1)
class ComponentInterfaceSymbol; class ComponentInterfaceSymbol;
TranslatableStrings Msgids( AUDACITY_DLL_API TranslatableStrings Msgids(
const EnumValueSymbol strings[], size_t nStrings); const EnumValueSymbol strings[], size_t nStrings);
TranslatableStrings Msgids( const std::vector<EnumValueSymbol> &strings ); AUDACITY_DLL_API TranslatableStrings Msgids( const std::vector<EnumValueSymbol> &strings );
// Whether disambiguationg contexts are supported // Whether disambiguationg contexts are supported
// If not, then the program builds and runs, but strings in the catalog with // If not, then the program builds and runs, but strings in the catalog with

View File

@ -31,16 +31,17 @@ DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_CAPTURE_KEY, -1);
namespace KeyboardCapture namespace KeyboardCapture
{ {
bool IsHandler(const wxWindow *handler); AUDACITY_DLL_API bool IsHandler(const wxWindow *handler);
wxWindow *GetHandler(); AUDACITY_DLL_API wxWindow *GetHandler();
void Capture(wxWindow *handler); AUDACITY_DLL_API void Capture(wxWindow *handler);
void Release(wxWindow *handler); AUDACITY_DLL_API void Release(wxWindow *handler);
using FilterFunction = std::function< bool( wxKeyEvent& ) >; using FilterFunction = std::function< bool( wxKeyEvent& ) >;
/// \brief Install a pre-filter, returning the previously installed one /// \brief Install a pre-filter, returning the previously installed one
/// Pre-filter is called before passing the event to the captured window; if it /// Pre-filter is called before passing the event to the captured window; if it
/// returns false, then skip the event entirely /// returns false, then skip the event entirely
AUDACITY_DLL_API
FilterFunction SetPreFilter( const FilterFunction &function ); FilterFunction SetPreFilter( const FilterFunction &function );
/// \brief Install a post-filter, returning the previously installed one /// \brief Install a post-filter, returning the previously installed one
@ -49,12 +50,14 @@ namespace KeyboardCapture
/// it skips only the wxEVT_CHAR or wxEVT_KEY_UP event); it is passed a /// it skips only the wxEVT_CHAR or wxEVT_KEY_UP event); it is passed a
/// wxKEY_DOWN or a wxKEY_UP event; if it returns false, then the event is /// wxKEY_DOWN or a wxKEY_UP event; if it returns false, then the event is
/// skipped /// skipped
AUDACITY_DLL_API
FilterFunction SetPostFilter( const FilterFunction &function ); FilterFunction SetPostFilter( const FilterFunction &function );
/// \brief a function useful to implement a focus event handler /// \brief a function useful to implement a focus event handler
/// The window releases the keyboard if the event is for killing focus, /// The window releases the keyboard if the event is for killing focus,
/// otherwise the window captures the keyboard; then refresh the window /// otherwise the window captures the keyboard; then refresh the window
/// and skip the event /// and skip the event
AUDACITY_DLL_API
void OnFocus( wxWindow &window, wxFocusEvent &event ); void OnFocus( wxWindow &window, wxFocusEvent &event );
} }

View File

@ -26,7 +26,7 @@ class TimeWarper;
struct LabelTrackHit; struct LabelTrackHit;
struct TrackPanelDrawingContext; struct TrackPanelDrawingContext;
class LabelStruct class AUDACITY_DLL_API LabelStruct
{ {
public: public:
LabelStruct() = default; LabelStruct() = default;

View File

@ -16,6 +16,7 @@ class wxString;
#include "audacity/Types.h" #include "audacity/Types.h"
AUDACITY_DLL_API
void GetLanguages( void GetLanguages(
wxArrayString &langCodes, TranslatableStrings &langNames); wxArrayString &langCodes, TranslatableStrings &langNames);

View File

@ -35,7 +35,7 @@ typedef wxArrayString PluginIDs;
namespace Registry{ class Visitor; } namespace Registry{ class Visitor; }
class MenuCreator class AUDACITY_DLL_API MenuCreator
{ {
public: public:
MenuCreator(); MenuCreator();
@ -71,7 +71,7 @@ public:
struct ToolbarMenuVisitor; struct ToolbarMenuVisitor;
class MenuManager final class AUDACITY_DLL_API MenuManager final
: public MenuCreator : public MenuCreator
, public ClientData::Base , public ClientData::Base
, private PrefsListener , private PrefsListener

View File

@ -43,7 +43,7 @@ class WaveTrackCache;
* no explicit time range to process, and the whole occupied length of the * no explicit time range to process, and the whole occupied length of the
* input tracks is processed. * input tracks is processed.
*/ */
void MixAndRender(TrackList * tracks, WaveTrackFactory *factory, void AUDACITY_DLL_API MixAndRender(TrackList * tracks, WaveTrackFactory *factory,
double rate, sampleFormat format, double rate, sampleFormat format,
double startTime, double endTime, double startTime, double endTime,
std::shared_ptr<WaveTrack> &uLeft, std::shared_ptr<WaveTrack> &uLeft,
@ -79,7 +79,7 @@ class AUDACITY_DLL_API Mixer {
public: public:
// An argument to Mixer's constructor // An argument to Mixer's constructor
class WarpOptions class AUDACITY_DLL_API WarpOptions
{ {
public: public:
//! Construct with warp from the TimeTrack if there is one //! Construct with warp from the TimeTrack if there is one

View File

@ -75,7 +75,7 @@ typedef std::map<wxString, ModuleInterfaceHandle> ModuleMap;
typedef std::map<ModuleInterface *, std::unique_ptr<wxDynamicLibrary>> LibraryMap; typedef std::map<ModuleInterface *, std::unique_ptr<wxDynamicLibrary>> LibraryMap;
using PluginIDs = wxArrayString; using PluginIDs = wxArrayString;
class ModuleManager final class AUDACITY_DLL_API ModuleManager final
{ {
public: public:

View File

@ -26,37 +26,39 @@ class TranslatableString;
// Each register starts with C (e.g., for middle C and A440, // Each register starts with C (e.g., for middle C and A440,
// it's register 4). // it's register 4).
// MIDI note number 0 is C-1 in Scientific pitch notation. // MIDI note number 0 is C-1 in Scientific pitch notation.
double FreqToMIDInote(const double freq); AUDACITY_DLL_API double FreqToMIDInote(const double freq);
double MIDInoteToFreq(const double dMIDInote); AUDACITY_DLL_API double MIDInoteToFreq(const double dMIDInote);
// PitchIndex returns the [0,11] index for a double MIDI note number, // PitchIndex returns the [0,11] index for a double MIDI note number,
// per result from FreqToMIDInote, corresponding to modulo 12 // per result from FreqToMIDInote, corresponding to modulo 12
// of the integer part of (dMIDInote + 0.5), so 0=C, 1=C#, etc. // of the integer part of (dMIDInote + 0.5), so 0=C, 1=C#, etc.
unsigned int PitchIndex(const double dMIDInote); AUDACITY_DLL_API unsigned int PitchIndex(const double dMIDInote);
// PitchOctave returns the octave index for a double dMIDInote note number, // PitchOctave returns the octave index for a double dMIDInote note number,
// per result from FreqToMIDInote. // per result from FreqToMIDInote.
// MIDI note number 0 is C-1 in Scientific pitch notation. // MIDI note number 0 is C-1 in Scientific pitch notation.
int PitchOctave(const double dMIDInote); AUDACITY_DLL_API int PitchOctave(const double dMIDInote);
enum class PitchNameChoice { Sharps, Flats, Both }; enum class PitchNameChoice { Sharps, Flats, Both };
// PitchName takes dMIDInote (per result from // PitchName takes dMIDInote (per result from
// FreqToMIDInote) and returns a standard pitch/note name [C, C#, etc.). // FreqToMIDInote) and returns a standard pitch/note name [C, C#, etc.).
TranslatableString PitchName( AUDACITY_DLL_API TranslatableString PitchName(
const double dMIDInote, const double dMIDInote,
const PitchNameChoice choice = PitchNameChoice::Sharps ); const PitchNameChoice choice = PitchNameChoice::Sharps );
// PitchName_Absolute does the same thing as PitchName, but appends // PitchName_Absolute does the same thing as PitchName, but appends
// the octave number, e.g., instead of "C" it will return "C4" // the octave number, e.g., instead of "C" it will return "C4"
// if the dMIDInote corresponds to middle C, i.e., is 60. // if the dMIDInote corresponds to middle C, i.e., is 60.
TranslatableString PitchName_Absolute( AUDACITY_DLL_API TranslatableString PitchName_Absolute(
const double dMIDInote, const double dMIDInote,
const PitchNameChoice choice = PitchNameChoice::Sharps); const PitchNameChoice choice = PitchNameChoice::Sharps);
AUDACITY_DLL_API
double PitchToMIDInote(const unsigned int nPitchIndex, const int nPitchOctave); double PitchToMIDInote(const unsigned int nPitchIndex, const int nPitchOctave);
AUDACITY_DLL_API
double PitchToFreq(const unsigned int nPitchIndex, const int nPitchOctave); double PitchToFreq(const unsigned int nPitchIndex, const int nPitchOctave);
#endif // __AUDACITY_PITCHNAME__ #endif // __AUDACITY_PITCHNAME__

View File

@ -22,7 +22,7 @@
#include "audacity/Types.h" #include "audacity/Types.h"
class PlatformCompatibility class AUDACITY_DLL_API PlatformCompatibility
{ {
public: public:
// //

View File

@ -41,7 +41,7 @@ typedef enum
} PluginType; } PluginType;
// TODO: Convert this to multiple derived classes // TODO: Convert this to multiple derived classes
class PluginDescriptor class AUDACITY_DLL_API PluginDescriptor
{ {
public: public:
PluginDescriptor(); PluginDescriptor();
@ -168,7 +168,7 @@ typedef wxArrayString PluginIDs;
class PluginRegistrationDialog; class PluginRegistrationDialog;
class PluginManager final : public PluginManagerInterface class AUDACITY_DLL_API PluginManager final : public PluginManagerInterface
{ {
public: public:

View File

@ -58,7 +58,7 @@ extern ByColumns_t ByColumns;
/// A table of EnumValueSymbol that you can access by "row" with /// A table of EnumValueSymbol that you can access by "row" with
/// operator [] but also allowing access to the "columns" of internal or /// operator [] but also allowing access to the "columns" of internal or
/// translated strings, and also allowing convenient column-wise construction /// translated strings, and also allowing convenient column-wise construction
class EnumValueSymbols : public std::vector< EnumValueSymbol > class AUDACITY_DLL_API EnumValueSymbols : public std::vector< EnumValueSymbol >
{ {
public: public:
EnumValueSymbols() = default; EnumValueSymbols() = default;
@ -86,7 +86,7 @@ private:
/// Packages a table of user-visible choices each with an internal code string, /// Packages a table of user-visible choices each with an internal code string,
/// a preference key path, and a default choice /// a preference key path, and a default choice
class ChoiceSetting class AUDACITY_DLL_API ChoiceSetting
{ {
public: public:
ChoiceSetting( ChoiceSetting(
@ -136,7 +136,7 @@ protected:
/// (generally not equal to their table positions), /// (generally not equal to their table positions),
/// and optionally an old preference key path that stored integer codes, to be /// and optionally an old preference key path that stored integer codes, to be
/// migrated into one that stores internal string values instead /// migrated into one that stores internal string values instead
class EnumSettingBase : public ChoiceSetting class AUDACITY_DLL_API EnumSettingBase : public ChoiceSetting
{ {
public: public:
EnumSettingBase( EnumSettingBase(
@ -209,7 +209,8 @@ public:
// An event emitted by the application when the Preference dialog commits // An event emitted by the application when the Preference dialog commits
// changes // changes
wxDECLARE_EVENT(EVT_PREFS_UPDATE, wxCommandEvent); wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
EVT_PREFS_UPDATE, wxCommandEvent);
// Invoke UpdatePrefs() when Preference dialog commits changes. // Invoke UpdatePrefs() when Preference dialog commits changes.
class AUDACITY_DLL_API PrefsListener class AUDACITY_DLL_API PrefsListener
@ -236,13 +237,14 @@ private:
/// Return the config file key associated with a warning dialog identified /// Return the config file key associated with a warning dialog identified
/// by internalDialogName. When the box is checked, the value at the key /// by internalDialogName. When the box is checked, the value at the key
/// becomes false. /// becomes false.
AUDACITY_DLL_API
wxString WarningDialogKey(const wxString &internalDialogName); wxString WarningDialogKey(const wxString &internalDialogName);
/* /*
Meant to be statically constructed. A callback to repopulate configuration Meant to be statically constructed. A callback to repopulate configuration
files after a reset. files after a reset.
*/ */
struct PreferenceInitializer { struct AUDACITY_DLL_API PreferenceInitializer {
PreferenceInitializer(); PreferenceInitializer();
virtual ~PreferenceInitializer(); virtual ~PreferenceInitializer();
virtual void operator () () = 0; virtual void operator () () = 0;

View File

@ -27,14 +27,14 @@ class AudacityProject;
AUDACITY_DLL_API AudacityProject *GetActiveProject(); AUDACITY_DLL_API AudacityProject *GetActiveProject();
// For use by ProjectManager only: // For use by ProjectManager only:
extern void SetActiveProject(AudacityProject * project); AUDACITY_DLL_API void SetActiveProject(AudacityProject * project);
/// \brief an object of class AllProjects acts like a standard library /// \brief an object of class AllProjects acts like a standard library
/// container, but refers to a global array of open projects. So you can /// container, but refers to a global array of open projects. So you can
/// iterate easily over shared pointers to them with range-for : /// iterate easily over shared pointers to them with range-for :
/// for (auto pProject : AllProjects{}) { ... } /// for (auto pProject : AllProjects{}) { ... }
/// The pointers are never null. /// The pointers are never null.
class AllProjects class AUDACITY_DLL_API AllProjects
{ {
// Use shared_ptr to projects, because elsewhere we need weak_ptr // Use shared_ptr to projects, because elsewhere we need weak_ptr
using AProjectHolder = std::shared_ptr< AudacityProject >; using AProjectHolder = std::shared_ptr< AudacityProject >;

View File

@ -19,7 +19,7 @@ class MeterPanelBase;
///\ brief Holds per-project state needed for interaction with AudioIO, ///\ brief Holds per-project state needed for interaction with AudioIO,
/// including the audio stream token and pointers to meters /// including the audio stream token and pointers to meters
class ProjectAudioIO final class AUDACITY_DLL_API ProjectAudioIO final
: public ClientData::Base : public ClientData::Base
{ {
public: public:

View File

@ -38,7 +38,7 @@ struct TransportTracks;
enum StatusBarField : int; enum StatusBarField : int;
class ProjectAudioManager final class AUDACITY_DLL_API ProjectAudioManager final
: public ClientData::Base : public ClientData::Base
, public AudioIOListener , public AudioIOListener
, public std::enable_shared_from_this< ProjectAudioManager > , public std::enable_shared_from_this< ProjectAudioManager >
@ -163,7 +163,9 @@ private:
const AudacityProject &project, StatusBarField field); const AudacityProject &project, StatusBarField field);
}; };
AUDACITY_DLL_API
AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project ); AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project );
AUDACITY_DLL_API
AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project ); AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project );
struct PropertiesOfSelected struct PropertiesOfSelected
@ -173,11 +175,12 @@ struct PropertiesOfSelected
int numberOfSelected{ 0 }; int numberOfSelected{ 0 };
}; };
AUDACITY_DLL_API
PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj); PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj);
#include "commands/CommandFlag.h" #include "commands/CommandFlag.h"
extern const ReservedCommandFlag extern AUDACITY_DLL_API const ReservedCommandFlag
&CanStopAudioStreamFlag(); &CanStopAudioStreamFlag();
#endif #endif

View File

@ -52,7 +52,7 @@ wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API,
///\brief Object associated with a project that manages reading and writing ///\brief Object associated with a project that manages reading and writing
/// of Audacity project file formats, and autosave /// of Audacity project file formats, and autosave
class ProjectFileIO final class AUDACITY_DLL_API ProjectFileIO final
: public ClientData::Base : public ClientData::Base
, public XMLTagHandler , public XMLTagHandler
, private PrefsListener , private PrefsListener
@ -327,7 +327,7 @@ wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
EVT_PROJECT_TITLE_CHANGE, wxCommandEvent); EVT_PROJECT_TITLE_CHANGE, wxCommandEvent);
//! Makes a temporary project that doesn't display on the screen //! Makes a temporary project that doesn't display on the screen
class InvisibleTemporaryProject class AUDACITY_DLL_API InvisibleTemporaryProject
{ {
public: public:
InvisibleTemporaryProject(); InvisibleTemporaryProject();

View File

@ -24,7 +24,7 @@ using TagHandlerFactory =
std::function< XMLTagHandler *( AudacityProject & ) >; std::function< XMLTagHandler *( AudacityProject & ) >;
// Typically statically constructed // Typically statically constructed
struct Entry{ struct AUDACITY_DLL_API Entry{
Entry( const wxString &tag, const TagHandlerFactory &factory ); Entry( const wxString &tag, const TagHandlerFactory &factory );
}; };

View File

@ -28,7 +28,7 @@ class XMLTagHandler;
using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >; using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >;
using TrackHolders = std::vector< WaveTrackArray >; using TrackHolders = std::vector< WaveTrackArray >;
class ProjectFileManager final class AUDACITY_DLL_API ProjectFileManager final
: public ClientData::Base : public ClientData::Base
{ {
public: public:

View File

@ -17,7 +17,7 @@ class AudacityProject;
struct UndoState; struct UndoState;
enum class UndoPush : unsigned char; enum class UndoPush : unsigned char;
class ProjectHistory final class AUDACITY_DLL_API ProjectHistory final
: public ClientData::Base : public ClientData::Base
{ {
public: public:

View File

@ -25,7 +25,7 @@ struct AudioIOStartStreamOptions;
///\brief Object associated with a project for high-level management of the ///\brief Object associated with a project for high-level management of the
/// project's lifetime, including creation, destruction, opening from file, /// project's lifetime, including creation, destruction, opening from file,
/// importing, pushing undo states, and reverting to saved states /// importing, pushing undo states, and reverting to saved states
class ProjectManager final class AUDACITY_DLL_API ProjectManager final
: public wxEvtHandler : public wxEvtHandler
, public ClientData::Base , public ClientData::Base
{ {

View File

@ -17,7 +17,7 @@ Paul Licameli split from ProjectManager.cpp
class AudacityProject; class AudacityProject;
class ProjectSelectionManager final class AUDACITY_DLL_API ProjectSelectionManager final
: public ClientData::Base : public ClientData::Base
, public SelectionBarListener , public SelectionBarListener
, public SpectralSelectionBarListener , public SpectralSelectionBarListener

View File

@ -47,7 +47,7 @@ enum {
///\brief Holds various per-project settings values, including the sample rate, ///\brief Holds various per-project settings values, including the sample rate,
/// and sends events to the project when certain values change /// and sends events to the project when certain values change
class ProjectSettings final class AUDACITY_DLL_API ProjectSettings final
: public ClientData::Base : public ClientData::Base
, private PrefsListener , private PrefsListener
{ {

View File

@ -34,7 +34,7 @@ enum StatusBarField : int {
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
EVT_PROJECT_STATUS_UPDATE, wxCommandEvent); EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
class ProjectStatus final class AUDACITY_DLL_API ProjectStatus final
: public ClientData::Base : public ClientData::Base
, public PrefsListener , public PrefsListener
{ {
@ -57,7 +57,7 @@ public:
using StatusWidthFunctions = std::vector< StatusWidthFunction >; using StatusWidthFunctions = std::vector< StatusWidthFunction >;
// Typically a static instance of this struct is used. // Typically a static instance of this struct is used.
struct RegisteredStatusWidthFunction struct AUDACITY_DLL_API RegisteredStatusWidthFunction
{ {
explicit explicit
RegisteredStatusWidthFunction( const StatusWidthFunction &function ); RegisteredStatusWidthFunction( const StatusWidthFunction &function );

View File

@ -26,7 +26,7 @@ void InitProjectWindow( ProjectWindow &window );
///\brief A top-level window associated with a project, and handling scrollbars ///\brief A top-level window associated with a project, and handling scrollbars
/// and zooming /// and zooming
class ProjectWindow final : public ProjectWindowBase class AUDACITY_DLL_API ProjectWindow final : public ProjectWindowBase
, public TrackPanelListener , public TrackPanelListener
, public PrefsListener , public PrefsListener
{ {

View File

@ -33,7 +33,7 @@ protected:
AudacityProject &mProject; AudacityProject &mProject;
}; };
AudacityProject *FindProjectFromWindow( wxWindow *pWindow ); AUDACITY_DLL_API AudacityProject *FindProjectFromWindow( wxWindow *pWindow );
const AudacityProject *FindProjectFromWindow( const wxWindow *pWindow ); const AudacityProject *FindProjectFromWindow( const wxWindow *pWindow );
#endif #endif

View File

@ -17,7 +17,7 @@ struct FFTParam {
#endif #endif
}; };
struct FFTDeleter{ struct AUDACITY_DLL_API FFTDeleter{
void operator () (FFTParam *p) const; void operator () (FFTParam *p) const;
}; };
@ -25,11 +25,11 @@ using HFFT = std::unique_ptr<
FFTParam, FFTDeleter FFTParam, FFTDeleter
>; >;
HFFT GetFFT(size_t); AUDACITY_DLL_API HFFT GetFFT(size_t);
void RealFFTf(fft_type *, const FFTParam *); AUDACITY_DLL_API void RealFFTf(fft_type *, const FFTParam *);
void InverseRealFFTf(fft_type *, const FFTParam *); AUDACITY_DLL_API void InverseRealFFTf(fft_type *, const FFTParam *);
void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut); AUDACITY_DLL_API void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut);
void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer, AUDACITY_DLL_API void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer,
fft_type *RealOut, fft_type *ImagOut); fft_type *RealOut, fft_type *ImagOut);
#endif #endif

View File

@ -56,7 +56,7 @@ namespace Registry {
// Most items in the table will be the large ones describing commands, so the // Most items in the table will be the large ones describing commands, so the
// waste of space in unions for separators and sub-menus should not be // waste of space in unions for separators and sub-menus should not be
// large. // large.
struct BaseItem { struct AUDACITY_DLL_API BaseItem {
// declare at least one virtual function so dynamic_cast will work // declare at least one virtual function so dynamic_cast will work
explicit explicit
BaseItem( const Identifier &internalName ) BaseItem( const Identifier &internalName )
@ -79,7 +79,7 @@ namespace Registry {
// static tables of items to be computed once and reused // static tables of items to be computed once and reused
// The name of the delegate is significant for path calculations, but the // The name of the delegate is significant for path calculations, but the
// SharedItem's ordering hint is used if the delegate has none // SharedItem's ordering hint is used if the delegate has none
struct SharedItem final : BaseItem { struct AUDACITY_DLL_API SharedItem final : BaseItem {
explicit SharedItem( const BaseItemSharedPtr &ptr_ ) explicit SharedItem( const BaseItemSharedPtr &ptr_ )
: BaseItem{ wxEmptyString } : BaseItem{ wxEmptyString }
, ptr{ ptr_ } , ptr{ ptr_ }
@ -97,7 +97,7 @@ namespace Registry {
// the ComputedItem is visited // the ComputedItem is visited
// The name of the substitute is significant for path calculations, but the // The name of the substitute is significant for path calculations, but the
// ComputedItem's ordering hint is used if the substitute has none // ComputedItem's ordering hint is used if the substitute has none
struct ComputedItem final : BaseItem { struct AUDACITY_DLL_API ComputedItem final : BaseItem {
// The type of functions that generate descriptions of items. // The type of functions that generate descriptions of items.
// Return type is a shared_ptr to let the function decide whether to // Return type is a shared_ptr to let the function decide whether to
// recycle the object or rebuild it on demand each time. // recycle the object or rebuild it on demand each time.
@ -117,13 +117,13 @@ namespace Registry {
}; };
// Common abstract base class for items that are not groups // Common abstract base class for items that are not groups
struct SingleItem : BaseItem { struct AUDACITY_DLL_API SingleItem : BaseItem {
using BaseItem::BaseItem; using BaseItem::BaseItem;
~SingleItem() override = 0; ~SingleItem() override = 0;
}; };
// Common abstract base class for items that group other items // Common abstract base class for items that group other items
struct GroupItem : BaseItem { struct AUDACITY_DLL_API GroupItem : BaseItem {
using BaseItem::BaseItem; using BaseItem::BaseItem;
// Construction from an internal name and a previously built-up // Construction from an internal name and a previously built-up
@ -231,13 +231,14 @@ namespace Registry {
// The sequence of calls to RegisterItem has no significance for // The sequence of calls to RegisterItem has no significance for
// determining the visitation ordering. When sequence is important, register // determining the visitation ordering. When sequence is important, register
// a GroupItem. // a GroupItem.
AUDACITY_DLL_API
void RegisterItem( GroupItem &registry, const Placement &placement, void RegisterItem( GroupItem &registry, const Placement &placement,
BaseItemPtr pItem ); BaseItemPtr pItem );
// Define actions to be done in Visit. // Define actions to be done in Visit.
// Default implementations do nothing // Default implementations do nothing
// The supplied path does not include the name of the item // The supplied path does not include the name of the item
class Visitor class AUDACITY_DLL_API Visitor
{ {
public: public:
virtual ~Visitor(); virtual ~Visitor();
@ -268,7 +269,8 @@ namespace Registry {
// registry of plug-ins, and something must be done to preserve old // registry of plug-ins, and something must be done to preserve old
// behavior. It can be done in the central place using string literal // behavior. It can be done in the central place using string literal
// identifiers only, not requiring static compilation or linkage dependency. // identifiers only, not requiring static compilation or linkage dependency.
struct OrderingPreferenceInitializer : PreferenceInitializer { struct AUDACITY_DLL_API
OrderingPreferenceInitializer : PreferenceInitializer {
using Literal = const wxChar *; using Literal = const wxChar *;
using Pair = std::pair< Literal, Literal >; using Pair = std::pair< Literal, Literal >;
using Pairs = std::vector< Pair >; using Pairs = std::vector< Pair >;

View File

@ -25,7 +25,7 @@ struct soxr_deleter {
}; };
using soxrHandle = std::unique_ptr<soxr, soxr_deleter>; using soxrHandle = std::unique_ptr<soxr, soxr_deleter>;
class Resample final class AUDACITY_DLL_API Resample final
{ {
public: public:
/// Resamplers may have more than one method, offering a /// Resamplers may have more than one method, offering a

View File

@ -44,7 +44,7 @@ typedef enum {
#define SAMPLE_SIZE_DISK(SampleFormat) (((SampleFormat) == int24Sample) ? \ #define SAMPLE_SIZE_DISK(SampleFormat) (((SampleFormat) == int24Sample) ? \
size_t{ 3 } : SAMPLE_SIZE(SampleFormat) ) size_t{ 3 } : SAMPLE_SIZE(SampleFormat) )
TranslatableString GetSampleFormatStr(sampleFormat format); AUDACITY_DLL_API TranslatableString GetSampleFormatStr(sampleFormat format);
// //
// Allocating/Freeing Samples // Allocating/Freeing Samples
@ -124,21 +124,25 @@ private:
// Copying, Converting and Clearing Samples // Copying, Converting and Clearing Samples
// //
AUDACITY_DLL_API
void CopySamples(constSamplePtr src, sampleFormat srcFormat, void CopySamples(constSamplePtr src, sampleFormat srcFormat,
samplePtr dst, sampleFormat dstFormat, samplePtr dst, sampleFormat dstFormat,
unsigned int len, bool highQuality=true, unsigned int len, bool highQuality=true,
unsigned int srcStride=1, unsigned int srcStride=1,
unsigned int dstStride=1); unsigned int dstStride=1);
AUDACITY_DLL_API
void CopySamplesNoDither(samplePtr src, sampleFormat srcFormat, void CopySamplesNoDither(samplePtr src, sampleFormat srcFormat,
samplePtr dst, sampleFormat dstFormat, samplePtr dst, sampleFormat dstFormat,
unsigned int len, unsigned int len,
unsigned int srcStride=1, unsigned int srcStride=1,
unsigned int dstStride=1); unsigned int dstStride=1);
AUDACITY_DLL_API
void ClearSamples(samplePtr buffer, sampleFormat format, void ClearSamples(samplePtr buffer, sampleFormat format,
size_t start, size_t len); size_t start, size_t len);
AUDACITY_DLL_API
void ReverseSamples(samplePtr buffer, sampleFormat format, void ReverseSamples(samplePtr buffer, sampleFormat format,
int start, int len); int start, int len);
@ -147,6 +151,7 @@ void ReverseSamples(samplePtr buffer, sampleFormat format,
// are set in preferences. // are set in preferences.
// //
AUDACITY_DLL_API
void InitDitherers(); void InitDitherers();
// These are so commonly done for processing samples in floating point form in memory, // These are so commonly done for processing samples in floating point form in memory,

View File

@ -25,7 +25,7 @@
class AudacityProject; class AudacityProject;
void OpenScreenshotTools( AudacityProject &project ); AUDACITY_DLL_API void OpenScreenshotTools( AudacityProject &project );
void CloseScreenshotTools(); void CloseScreenshotTools();
#endif // __AUDACITY_SCREENSHOT__ #endif // __AUDACITY_SCREENSHOT__

View File

@ -17,17 +17,17 @@ class Track;
/// Namespace for functions for Select menu /// Namespace for functions for Select menu
namespace SelectUtilities { namespace SelectUtilities {
void DoSelectTimeAndTracks( AUDACITY_DLL_API void DoSelectTimeAndTracks(
AudacityProject &project, bool bAllTime, bool bAllTracks); AudacityProject &project, bool bAllTime, bool bAllTracks);
void SelectAllIfNone( AudacityProject &project ); AUDACITY_DLL_API void SelectAllIfNone( AudacityProject &project );
bool SelectAllIfNoneAndAllowed( AudacityProject &project ); AUDACITY_DLL_API bool SelectAllIfNoneAndAllowed( AudacityProject &project );
void SelectNone( AudacityProject &project ); AUDACITY_DLL_API void SelectNone( AudacityProject &project );
void DoListSelection( AUDACITY_DLL_API void DoListSelection(
AudacityProject &project, Track *t, AudacityProject &project, Track *t,
bool shift, bool ctrl, bool modifyState ); bool shift, bool ctrl, bool modifyState );
void DoSelectAll( AudacityProject &project ); AUDACITY_DLL_API void DoSelectAll( AudacityProject &project );
void DoSelectAllAudio( AudacityProject &project ); AUDACITY_DLL_API void DoSelectAllAudio( AudacityProject &project );
void DoSelectSomething( AudacityProject &project ); AUDACITY_DLL_API void DoSelectSomething( AudacityProject &project );
} }

View File

@ -18,7 +18,7 @@ class ViewInfo;
#include <vector> #include <vector>
// State relating to the set of selected tracks // State relating to the set of selected tracks
class SelectionState final class AUDACITY_DLL_API SelectionState final
: public ClientData::Base : public ClientData::Base
{ {
public: public:
@ -52,7 +52,7 @@ private:
// For committing or rolling-back of changes in selectedness of tracks. // For committing or rolling-back of changes in selectedness of tracks.
// When rolling back, it is assumed that no tracks have been added or removed. // When rolling back, it is assumed that no tracks have been added or removed.
class SelectionStateChanger class AUDACITY_DLL_API SelectionStateChanger
{ {
public: public:
SelectionStateChanger( SelectionState &state, TrackList &tracks ); SelectionStateChanger( SelectionState &state, TrackList &tracks );

View File

@ -57,7 +57,7 @@ class CommandParameters;
virtual functions that do nothing by default. virtual functions that do nothing by default.
Unrelated to class Shuttle. Unrelated to class Shuttle.
********************************************************************************/ ********************************************************************************/
class ShuttleParams /* not final */ class AUDACITY_DLL_API ShuttleParams /* not final */
{ {
public: public:
wxString mParams; wxString mParams;
@ -83,7 +83,7 @@ public:
/**************************************************************************//** /**************************************************************************//**
\brief Shuttle that gets parameter values into a string. \brief Shuttle that gets parameter values into a string.
********************************************************************************/ ********************************************************************************/
class ShuttleGetAutomation final : public ShuttleParams class AUDACITY_DLL_API ShuttleGetAutomation final : public ShuttleParams
{ {
public: public:
ShuttleParams & Optional( bool & var ) override; ShuttleParams & Optional( bool & var ) override;
@ -101,7 +101,7 @@ public:
/**************************************************************************//** /**************************************************************************//**
\brief Shuttle that sets parameters to a value (from a string) \brief Shuttle that sets parameters to a value (from a string)
********************************************************************************/ ********************************************************************************/
class ShuttleSetAutomation final : public ShuttleParams class AUDACITY_DLL_API ShuttleSetAutomation final : public ShuttleParams
{ {
public: public:
ShuttleSetAutomation(){ bWrite = false; bOK = false;}; ShuttleSetAutomation(){ bWrite = false; bOK = false;};

View File

@ -17,7 +17,7 @@
/**************************************************************************//** /**************************************************************************//**
\brief Shuttle that retrieves a JSON format definition of a command's parameters. \brief Shuttle that retrieves a JSON format definition of a command's parameters.
********************************************************************************/ ********************************************************************************/
class ShuttleGetDefinition final class AUDACITY_DLL_API ShuttleGetDefinition final
: public ShuttleParams, public CommandMessageTargetDecorator : public ShuttleParams, public CommandMessageTargetDecorator
{ {
public: public:

View File

@ -52,7 +52,7 @@ struct SnapResults {
bool Snapped() const { return snappedPoint || snappedTime; } bool Snapped() const { return snappedPoint || snappedTime; }
}; };
class SnapManager class AUDACITY_DLL_API SnapManager
{ {
public: public:
SnapManager(const AudacityProject &project, SnapManager(const AudacityProject &project,

View File

@ -21,6 +21,7 @@
calculates windowSize/2 frequency samples calculates windowSize/2 frequency samples
*/ */
AUDACITY_DLL_API
bool ComputeSpectrum(const float * data, size_t width, size_t windowSize, bool ComputeSpectrum(const float * data, size_t width, size_t windowSize,
double rate, float *out, bool autocorrelation, double rate, float *out, bool autocorrelation,
int windowFunc = eWinFuncHann); int windowFunc = eWinFuncHann);

View File

@ -18,20 +18,19 @@ class wxWindow;
namespace TempDirectory namespace TempDirectory
{ {
wxString TempDir(); AUDACITY_DLL_API wxString TempDir();
void ResetTempDir(); AUDACITY_DLL_API void ResetTempDir();
const FilePath &DefaultTempDir(); AUDACITY_DLL_API const FilePath &DefaultTempDir();
void SetDefaultTempDir( const FilePath &tempDir ); AUDACITY_DLL_API void SetDefaultTempDir( const FilePath &tempDir );
bool IsTempDirectoryNameOK( const FilePath & Name ); AUDACITY_DLL_API bool IsTempDirectoryNameOK( const FilePath & Name );
// Create a filename for an unsaved/temporary project file // Create a filename for an unsaved/temporary project file
wxString UnsavedProjectFileName(); AUDACITY_DLL_API wxString UnsavedProjectFileName();
bool FATFilesystemDenied(const FilePath &path, AUDACITY_DLL_API bool FATFilesystemDenied(const FilePath &path,
const TranslatableString &msg, const TranslatableString &msg,
wxWindow *window = nullptr); wxWindow *window = nullptr);
}; };
#endif #endif

View File

@ -179,7 +179,7 @@ class wxWindow;
class wxString; class wxString;
class wxPaintEvent; class wxPaintEvent;
class auStaticText : public wxWindow class AUDACITY_DLL_API auStaticText : public wxWindow
{ {
public: public:
auStaticText(wxWindow* parent, wxString text); auStaticText(wxWindow* parent, wxString text);
@ -193,7 +193,7 @@ public:
extern AUDACITY_DLL_API Theme theTheme; extern AUDACITY_DLL_API Theme theTheme;
extern ChoiceSetting extern AUDACITY_DLL_API ChoiceSetting
GUITheme GUITheme
; ;

View File

@ -20,7 +20,7 @@
class NumericTextCtrl; class NumericTextCtrl;
class ShuttleGui; class ShuttleGui;
class TimeDialog final : public wxDialogWrapper class AUDACITY_DLL_API TimeDialog final : public wxDialogWrapper
{ {
public: public:

View File

@ -21,7 +21,7 @@ class Ruler;
class ZoomInfo; class ZoomInfo;
struct TrackPanelDrawingContext; struct TrackPanelDrawingContext;
class TimeTrack final : public Track { class AUDACITY_DLL_API TimeTrack final : public Track {
public: public:

View File

@ -182,7 +182,7 @@ private:
}; };
//! Optional extra information about an interval, appropriate to a subtype of Track //! Optional extra information about an interval, appropriate to a subtype of Track
struct TrackIntervalData { struct AUDACITY_DLL_API TrackIntervalData {
virtual ~TrackIntervalData(); virtual ~TrackIntervalData();
}; };
@ -1255,7 +1255,7 @@ wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
/*! @brief A flat linked list of tracks supporting Add, Remove, /*! @brief A flat linked list of tracks supporting Add, Remove,
* Clear, and Contains, serialization of the list of tracks, event notifications * Clear, and Contains, serialization of the list of tracks, event notifications
*/ */
class TrackList final class AUDACITY_DLL_API TrackList final
: public wxEvtHandler : public wxEvtHandler
, public ListOfTracks , public ListOfTracks
, public std::enable_shared_from_this<TrackList> , public std::enable_shared_from_this<TrackList>

View File

@ -39,15 +39,18 @@ class ZoomInfo;
namespace TrackArt { namespace TrackArt {
// Helper: draws the "sync-locked" watermark tiled to a rectangle // Helper: draws the "sync-locked" watermark tiled to a rectangle
AUDACITY_DLL_API
void DrawSyncLockTiles( void DrawSyncLockTiles(
TrackPanelDrawingContext &context, const wxRect &rect ); TrackPanelDrawingContext &context, const wxRect &rect );
// Helper: draws background with selection rect // Helper: draws background with selection rect
AUDACITY_DLL_API
void DrawBackgroundWithSelection(TrackPanelDrawingContext &context, void DrawBackgroundWithSelection(TrackPanelDrawingContext &context,
const wxRect &rect, const Track *track, const wxRect &rect, const Track *track,
const wxBrush &selBrush, const wxBrush &unselBrush, const wxBrush &selBrush, const wxBrush &unselBrush,
bool useSelection = true); bool useSelection = true);
AUDACITY_DLL_API
void DrawNegativeOffsetTrackArrows( TrackPanelDrawingContext &context, void DrawNegativeOffsetTrackArrows( TrackPanelDrawingContext &context,
const wxRect & rect ); const wxRect & rect );
} }
@ -137,11 +140,11 @@ public:
bool hasSolo{ false }; bool hasSolo{ false };
}; };
extern int GetWaveYPos(float value, float min, float max, extern AUDACITY_DLL_API int GetWaveYPos(float value, float min, float max,
int height, bool dB, bool outer, float dBr, int height, bool dB, bool outer, float dBr,
bool clip); bool clip);
extern float FromDB(float value, double dBRange); extern float FromDB(float value, double dBRange);
extern float ValueOfPixel(int yy, int height, bool offset, extern AUDACITY_DLL_API float ValueOfPixel(int yy, int height, bool offset,
bool dB, double dBRange, float zoomMin, float zoomMax); bool dB, double dBRange, float zoomMin, float zoomMax);
#endif // define __AUDACITY_TRACKARTIST__ #endif // define __AUDACITY_TRACKARTIST__

View File

@ -30,6 +30,7 @@ static const int TitleSoloBorderOverlap = 1;
namespace TrackInfo namespace TrackInfo
{ {
AUDACITY_DLL_API
unsigned MinimumTrackHeight(); unsigned MinimumTrackHeight();
struct TCPLine { struct TCPLine {
@ -65,59 +66,81 @@ namespace TrackInfo
using TCPLines = std::vector< TCPLine >; using TCPLines = std::vector< TCPLine >;
// return y value and height // return y value and height
AUDACITY_DLL_API
std::pair< int, int > CalcItemY( const TCPLines &lines, unsigned iItem ); std::pair< int, int > CalcItemY( const TCPLines &lines, unsigned iItem );
AUDACITY_DLL_API
unsigned DefaultTrackHeight( const TCPLines &topLines ); unsigned DefaultTrackHeight( const TCPLines &topLines );
AUDACITY_DLL_API
void DrawItems void DrawItems
( TrackPanelDrawingContext &context, ( TrackPanelDrawingContext &context,
const wxRect &rect, const Track &track ); const wxRect &rect, const Track &track );
AUDACITY_DLL_API
void DrawItems void DrawItems
( TrackPanelDrawingContext &context, ( TrackPanelDrawingContext &context,
const wxRect &rect, const Track *pTrack, const wxRect &rect, const Track *pTrack,
const std::vector<TCPLine> &topLines, const std::vector<TCPLine> &topLines,
const std::vector<TCPLine> &bottomLines ); const std::vector<TCPLine> &bottomLines );
AUDACITY_DLL_API
void DrawCloseButton( void DrawCloseButton(
TrackPanelDrawingContext &context, const wxRect &bev, TrackPanelDrawingContext &context, const wxRect &bev,
const Track *pTrack, ButtonHandle *target ); const Track *pTrack, ButtonHandle *target );
AUDACITY_DLL_API
void CloseTitleDrawFunction void CloseTitleDrawFunction
( TrackPanelDrawingContext &context, ( TrackPanelDrawingContext &context,
const wxRect &rect, const Track *pTrack ); const wxRect &rect, const Track *pTrack );
AUDACITY_DLL_API
void MinimizeSyncLockDrawFunction void MinimizeSyncLockDrawFunction
( TrackPanelDrawingContext &context, ( TrackPanelDrawingContext &context,
const wxRect &rect, const Track *pTrack ); const wxRect &rect, const Track *pTrack );
AUDACITY_DLL_API
void SetTrackInfoFont(wxDC *dc); void SetTrackInfoFont(wxDC *dc);
AUDACITY_DLL_API
void GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest ); void GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest );
AUDACITY_DLL_API
void GetCloseBoxRect(const wxRect & rect, wxRect &dest); void GetCloseBoxRect(const wxRect & rect, wxRect &dest);
AUDACITY_DLL_API
void GetTitleBarHorizontalBounds( const wxRect & rect, wxRect &dest ); void GetTitleBarHorizontalBounds( const wxRect & rect, wxRect &dest );
AUDACITY_DLL_API
void GetTitleBarRect(const wxRect & rect, wxRect &dest); void GetTitleBarRect(const wxRect & rect, wxRect &dest);
AUDACITY_DLL_API
void GetSliderHorizontalBounds( const wxPoint &topleft, wxRect &dest ); void GetSliderHorizontalBounds( const wxPoint &topleft, wxRect &dest );
AUDACITY_DLL_API
void GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest ); void GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest );
AUDACITY_DLL_API
void GetMinimizeRect(const wxRect & rect, wxRect &dest); void GetMinimizeRect(const wxRect & rect, wxRect &dest);
AUDACITY_DLL_API
void GetSelectButtonHorizontalBounds( const wxRect &rect, wxRect &dest ); void GetSelectButtonHorizontalBounds( const wxRect &rect, wxRect &dest );
AUDACITY_DLL_API
void GetSelectButtonRect(const wxRect & rect, wxRect &dest); void GetSelectButtonRect(const wxRect & rect, wxRect &dest);
AUDACITY_DLL_API
void GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest ); void GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest );
AUDACITY_DLL_API
void GetSyncLockIconRect(const wxRect & rect, wxRect &dest); void GetSyncLockIconRect(const wxRect & rect, wxRect &dest);
AUDACITY_DLL_API
bool HideTopItem( const wxRect &rect, const wxRect &subRect, bool HideTopItem( const wxRect &rect, const wxRect &subRect,
int allowance = 0 ); int allowance = 0 );
// Non-member, namespace function relying on TrackPanel to invoke it // Non-member, namespace function relying on TrackPanel to invoke it
// when it handles preference update events // when it handles preference update events
AUDACITY_DLL_API
void UpdatePrefs( wxWindow *pParent ); void UpdatePrefs( wxWindow *pParent );
AUDACITY_DLL_API
bool HasSoloButton(); bool HasSoloButton();
}; };

View File

@ -213,7 +213,7 @@ protected:
}; };
// A predicate class // A predicate class
struct IsVisibleTrack struct AUDACITY_DLL_API IsVisibleTrack
{ {
IsVisibleTrack(AudacityProject *project); IsVisibleTrack(AudacityProject *project);

View File

@ -156,7 +156,7 @@ private:
int mMessageCount; int mMessageCount;
}; };
class TrackFocus final class AUDACITY_DLL_API TrackFocus final
: public ClientData::Base : public ClientData::Base
{ {
public: public:

View File

@ -20,13 +20,18 @@ namespace TrackUtilities {
OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID
}; };
/// Move a track up, down, to top or to bottom. /// Move a track up, down, to top or to bottom.
void DoMoveTrack( AudacityProject &project, Track* target, MoveChoice choice ); AUDACITY_DLL_API void DoMoveTrack(
AudacityProject &project, Track* target, MoveChoice choice );
// "exclusive" mute means mute the chosen track and unmute all others. // "exclusive" mute means mute the chosen track and unmute all others.
AUDACITY_DLL_API
void DoTrackMute( AudacityProject &project, Track *pTrack, bool exclusive ); void DoTrackMute( AudacityProject &project, Track *pTrack, bool exclusive );
// Type of solo (standard or simple) follows the set preference, unless // Type of solo (standard or simple) follows the set preference, unless
// exclusive == true, which causes the opposite behavior. // exclusive == true, which causes the opposite behavior.
AUDACITY_DLL_API
void DoTrackSolo( AudacityProject &project, Track *pTrack, bool exclusive ); void DoTrackSolo( AudacityProject &project, Track *pTrack, bool exclusive );
AUDACITY_DLL_API
void DoRemoveTrack( AudacityProject &project, Track * toRemove ); void DoRemoveTrack( AudacityProject &project, Track * toRemove );
AUDACITY_DLL_API
void DoRemoveTracks( AudacityProject & ); void DoRemoveTracks( AudacityProject & );
} }

View File

@ -32,7 +32,7 @@ struct TrackPanelMouseState;
// A TrackPanelCell reports a handle object of some subclass, in response to a // A TrackPanelCell reports a handle object of some subclass, in response to a
// hit test at a mouse position; then this handle processes certain events, // hit test at a mouse position; then this handle processes certain events,
// and maintains necessary state through click-drag-release event sequences. // and maintains necessary state through click-drag-release event sequences.
class UIHandle /* not final */ : public TrackPanelDrawable class AUDACITY_DLL_API UIHandle /* not final */ : public TrackPanelDrawable
{ {
public: public:
// See RefreshCode.h for bit flags: // See RefreshCode.h for bit flags:

View File

@ -13,7 +13,7 @@
//! Can be thrown when user cancels operations, as with a progress dialog. Delayed handler does nothing //! Can be thrown when user cancels operations, as with a progress dialog. Delayed handler does nothing
/*! This class does not inherit from MessageBoxException. */ /*! This class does not inherit from MessageBoxException. */
class UserException final : public AudacityException class AUDACITY_DLL_API UserException final : public AudacityException
{ {
public: public:
UserException() {} UserException() {}

View File

@ -38,7 +38,7 @@ wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API,
// This heavyweight wrapper of the SelectedRegion structure emits events // This heavyweight wrapper of the SelectedRegion structure emits events
// on mutating operations, that other classes can listen for. // on mutating operations, that other classes can listen for.
class NotifyingSelectedRegion : public wxEvtHandler class AUDACITY_DLL_API NotifyingSelectedRegion : public wxEvtHandler
{ {
public: public:
// Expose SelectedRegion's const accessors // Expose SelectedRegion's const accessors

View File

@ -34,7 +34,7 @@ class WaveCache;
class WaveTrackCache; class WaveTrackCache;
class wxFileNameWrapper; class wxFileNameWrapper;
class SpecCache { class AUDACITY_DLL_API SpecCache {
public: public:
// Make invalid cache // Make invalid cache

View File

@ -596,7 +596,7 @@ private:
// the contents of the WaveTrack are known not to change. It can replace // the contents of the WaveTrack are known not to change. It can replace
// repeated calls to WaveTrack::Get() (each of which opens and closes at least // repeated calls to WaveTrack::Get() (each of which opens and closes at least
// one block file). // one block file).
class WaveTrackCache { class AUDACITY_DLL_API WaveTrackCache {
public: public:
WaveTrackCache() WaveTrackCache()
: mBufferSize(0) : mBufferSize(0)

View File

@ -72,7 +72,8 @@ public:
}; };
class CommandImplementation /* not final */ : public OldStyleCommand class AUDACITY_DLL_API CommandImplementation /* not final */
: public OldStyleCommand
{ {
private: private:
OldStyleCommandType &mType; OldStyleCommandType &mType;

View File

@ -27,7 +27,7 @@ they are kept separate to make things simpler.
class CommandOutputTargets; class CommandOutputTargets;
class CommandDirectory class AUDACITY_DLL_API CommandDirectory
{ {
private: private:
static std::unique_ptr<CommandDirectory> mInstance; static std::unique_ptr<CommandDirectory> mInstance;

View File

@ -85,7 +85,7 @@ struct CommandFlagOptions{
// Construct one statically to register (and reserve) a bit position in the set // Construct one statically to register (and reserve) a bit position in the set
// an associate it with a test function; those with quickTest = true are cheap // an associate it with a test function; those with quickTest = true are cheap
// to compute and always checked // to compute and always checked
class ReservedCommandFlag : public CommandFlag class AUDACITY_DLL_API ReservedCommandFlag : public CommandFlag
{ {
public: public:
using Predicate = std::function< bool( const AudacityProject& ) >; using Predicate = std::function< bool( const AudacityProject& ) >;
@ -116,7 +116,7 @@ struct MenuItemEnabler {
}; };
// Typically this is statically constructed: // Typically this is statically constructed:
struct RegisteredMenuItemEnabler{ struct AUDACITY_DLL_API RegisteredMenuItemEnabler{
RegisteredMenuItemEnabler( const MenuItemEnabler &enabler ); RegisteredMenuItemEnabler( const MenuItemEnabler &enabler );
}; };

View File

@ -94,7 +94,7 @@ class AUDACITY_DLL_API CommandManager final
using CheckFn = std::function< bool(AudacityProject&) >; using CheckFn = std::function< bool(AudacityProject&) >;
// For specifying unusual arguments in AddItem // For specifying unusual arguments in AddItem
struct Options struct AUDACITY_DLL_API Options
{ {
Options() {} Options() {}
// Allow implicit construction from an accelerator string, which is // Allow implicit construction from an accelerator string, which is
@ -366,7 +366,7 @@ private:
std::unique_ptr< wxMenuBar > mTempMenuBar; std::unique_ptr< wxMenuBar > mTempMenuBar;
}; };
struct MenuVisitor : Registry::Visitor struct AUDACITY_DLL_API MenuVisitor : Registry::Visitor
{ {
// final overrides // final overrides
void BeginGroup( Registry::GroupItem &item, const Path &path ) final; void BeginGroup( Registry::GroupItem &item, const Path &path ) final;
@ -397,17 +397,18 @@ namespace MenuTable {
using namespace Registry; using namespace Registry;
// These are found by dynamic_cast // These are found by dynamic_cast
struct MenuSection { struct AUDACITY_DLL_API MenuSection {
virtual ~MenuSection(); virtual ~MenuSection();
}; };
struct WholeMenu { struct AUDACITY_DLL_API WholeMenu {
WholeMenu( bool extend = false ) : extension{ extend } {} WholeMenu( bool extend = false ) : extension{ extend } {}
virtual ~WholeMenu(); virtual ~WholeMenu();
bool extension; bool extension;
}; };
// Describes a main menu in the toolbar, or a sub-menu // Describes a main menu in the toolbar, or a sub-menu
struct MenuItem final : ConcreteGroupItem< false, ToolbarMenuVisitor > struct AUDACITY_DLL_API MenuItem final
: ConcreteGroupItem< false, ToolbarMenuVisitor >
, WholeMenu { , WholeMenu {
// Construction from an internal name and a previously built-up // Construction from an internal name and a previously built-up
// vector of pointers // vector of pointers
@ -460,7 +461,7 @@ namespace MenuTable {
// This is used before a sequence of many calls to Command() and // This is used before a sequence of many calls to Command() and
// CommandGroup(), so that the finder argument need not be specified // CommandGroup(), so that the finder argument need not be specified
// in each call. // in each call.
class FinderScope : ValueRestorer< CommandHandlerFinder > class AUDACITY_DLL_API FinderScope : ValueRestorer< CommandHandlerFinder >
{ {
static CommandHandlerFinder sFinder; static CommandHandlerFinder sFinder;
@ -474,7 +475,7 @@ namespace MenuTable {
}; };
// Describes one command in a menu // Describes one command in a menu
struct CommandItem final : SingleItem { struct AUDACITY_DLL_API CommandItem final : SingleItem {
CommandItem(const CommandID &name_, CommandItem(const CommandID &name_,
const TranslatableString &label_in_, const TranslatableString &label_in_,
CommandFunctorPointer callback_, CommandFunctorPointer callback_,
@ -508,7 +509,7 @@ namespace MenuTable {
// Describes several successive commands in a menu that are closely related // Describes several successive commands in a menu that are closely related
// and dispatch to one common callback, which will be passed a number // and dispatch to one common callback, which will be passed a number
// in the CommandContext identifying the command // in the CommandContext identifying the command
struct CommandGroupItem final : SingleItem { struct AUDACITY_DLL_API CommandGroupItem final : SingleItem {
CommandGroupItem(const Identifier &name_, CommandGroupItem(const Identifier &name_,
std::vector< ComponentInterfaceSymbol > items_, std::vector< ComponentInterfaceSymbol > items_,
CommandFunctorPointer callback_, CommandFunctorPointer callback_,
@ -683,7 +684,7 @@ namespace MenuTable {
// Typically you make a static object of this type in the .cpp file that // Typically you make a static object of this type in the .cpp file that
// also defines the added menu actions. // also defines the added menu actions.
// pItem can be specified by an expression using the inline functions above. // pItem can be specified by an expression using the inline functions above.
struct AttachedItem final struct AUDACITY_DLL_API AttachedItem final
{ {
AttachedItem( const Placement &placement, BaseItemPtr pItem ); AttachedItem( const Placement &placement, BaseItemPtr pItem );

View File

@ -25,7 +25,7 @@ struct AUDACITY_DLL_API NonKeystrokeInterceptingWindow
\brief Top-level windows that do redirect keystrokes to the associated \brief Top-level windows that do redirect keystrokes to the associated
project's CommandManager inherit this class. project's CommandManager inherit this class.
*/ */
struct TopLevelKeystrokeHandlingWindow struct AUDACITY_DLL_API TopLevelKeystrokeHandlingWindow
{ {
virtual ~TopLevelKeystrokeHandlingWindow(); virtual ~TopLevelKeystrokeHandlingWindow();
}; };

View File

@ -25,7 +25,7 @@ class wxString;
class wxVariant; class wxVariant;
class Validator; class Validator;
class CommandSignature class AUDACITY_DLL_API CommandSignature
{ {
private: private:
ParamValueMap mDefaults; ParamValueMap mDefaults;

View File

@ -70,7 +70,7 @@ public:
}; };
/// Interface for objects that can receive (string) messages from a command /// Interface for objects that can receive (string) messages from a command
class CommandMessageTarget /* not final */ class AUDACITY_DLL_API CommandMessageTarget /* not final */
{ {
public: public:
CommandMessageTarget() {mCounts.push_back(0);} CommandMessageTarget() {mCounts.push_back(0);}
@ -202,7 +202,7 @@ public:
}; };
/// Displays messages from a command in an AudacityMessageBox /// Displays messages from a command in an AudacityMessageBox
class MessageBoxTarget final : public CommandMessageTarget class AUDACITY_DLL_API MessageBoxTarget final : public CommandMessageTarget
{ {
public: public:
virtual ~MessageBoxTarget() {} virtual ~MessageBoxTarget() {}
@ -210,7 +210,7 @@ public:
}; };
/// Displays messages from a command in a wxStatusBar /// Displays messages from a command in a wxStatusBar
class StatusBarTarget final : public CommandMessageTarget class AUDACITY_DLL_API StatusBarTarget final : public CommandMessageTarget
{ {
private: private:
wxStatusBar &mStatus; wxStatusBar &mStatus;
@ -385,7 +385,8 @@ public:
} }
}; };
class LispifiedCommandOutputTargets : public CommandOutputTargets class AUDACITY_DLL_API LispifiedCommandOutputTargets
: public CommandOutputTargets
{ {
public : public :
LispifiedCommandOutputTargets( CommandOutputTargets & target ); LispifiedCommandOutputTargets( CommandOutputTargets & target );
@ -394,7 +395,7 @@ private:
CommandOutputTargets * pToRestore; CommandOutputTargets * pToRestore;
}; };
class BriefCommandOutputTargets : public CommandOutputTargets class AUDACITY_DLL_API BriefCommandOutputTargets : public CommandOutputTargets
{ {
public : public :
BriefCommandOutputTargets( CommandOutputTargets & target ); BriefCommandOutputTargets( CommandOutputTargets & target );

View File

@ -39,7 +39,7 @@ class CommandOutputTargets;
class CommandSignature; class CommandSignature;
class wxString; class wxString;
class OldStyleCommandType : public AudacityCommand class AUDACITY_DLL_API OldStyleCommandType : public AudacityCommand
{ {
private: private:
ComponentInterfaceSymbol mSymbol; ComponentInterfaceSymbol mSymbol;

View File

@ -21,7 +21,7 @@ struct NormalizedKeyStringTag;
// Case insensitive comparisons // Case insensitive comparisons
using NormalizedKeyStringBase = TaggedIdentifier<NormalizedKeyStringTag, false>; using NormalizedKeyStringBase = TaggedIdentifier<NormalizedKeyStringTag, false>;
struct NormalizedKeyString : NormalizedKeyStringBase struct AUDACITY_DLL_API NormalizedKeyString : NormalizedKeyStringBase
{ {
NormalizedKeyString() = default; NormalizedKeyString() = default;
explicit NormalizedKeyString( const wxString &key ); explicit NormalizedKeyString( const wxString &key );
@ -35,6 +35,7 @@ namespace std
: hash< NormalizedKeyStringBase > {}; : hash< NormalizedKeyStringBase > {};
} }
AUDACITY_DLL_API
NormalizedKeyString KeyEventToKeyString(const wxKeyEvent & keyEvent); NormalizedKeyString KeyEventToKeyString(const wxKeyEvent & keyEvent);
#endif #endif

View File

@ -27,7 +27,7 @@ class AudacityCommand;
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class BuiltinCommandsModule final : public ModuleInterface class AUDACITY_DLL_API BuiltinCommandsModule final : public ModuleInterface
{ {
public: public:
BuiltinCommandsModule(const wxString *path); BuiltinCommandsModule(const wxString *path);

View File

@ -28,7 +28,7 @@ class AdornedRulerPanel;
class AudacityProject; class AudacityProject;
class CommandContext; class CommandContext;
class ScreenshotCommand : public AudacityCommand class AUDACITY_DLL_API ScreenshotCommand : public AudacityCommand
{ {
public: public:
enum kBackgrounds enum kBackgrounds

View File

@ -25,7 +25,7 @@ class wxString;
typedef int(*tpExecScriptServerFunc)(wxString * pIn, wxString * pOut); typedef int(*tpExecScriptServerFunc)(wxString * pIn, wxString * pOut);
typedef int(*tpRegScriptServerFunc)(tpExecScriptServerFunc pFn); typedef int(*tpRegScriptServerFunc)(tpExecScriptServerFunc pFn);
class ScriptCommandRelay class AUDACITY_DLL_API ScriptCommandRelay
{ {
public: public:
static void StartScriptServer(tpRegScriptServerFunc scriptFn); static void StartScriptServer(tpRegScriptServerFunc scriptFn);

View File

@ -376,7 +376,7 @@ protected:
// For the use of analyzers, which don't need to make output wave tracks, // For the use of analyzers, which don't need to make output wave tracks,
// but may need to add label tracks. // but may need to add label tracks.
class AddedAnalysisTrack { class AUDACITY_DLL_API AddedAnalysisTrack {
friend Effect; friend Effect;
AddedAnalysisTrack(Effect *pEffect, const wxString &name); AddedAnalysisTrack(Effect *pEffect, const wxString &name);
AddedAnalysisTrack(const AddedAnalysisTrack&) PROHIBITED; AddedAnalysisTrack(const AddedAnalysisTrack&) PROHIBITED;
@ -406,7 +406,7 @@ protected:
// For the use of analyzers, which don't need to make output wave tracks, // For the use of analyzers, which don't need to make output wave tracks,
// but may need to modify label tracks. // but may need to modify label tracks.
class ModifiedAnalysisTrack { class AUDACITY_DLL_API ModifiedAnalysisTrack {
friend Effect; friend Effect;
ModifiedAnalysisTrack ModifiedAnalysisTrack
(Effect *pEffect, const LabelTrack *pOrigTrack, const wxString &name); (Effect *pEffect, const LabelTrack *pOrigTrack, const wxString &name);

View File

@ -220,6 +220,7 @@ class CommandContext;
namespace EffectUI { namespace EffectUI {
AUDACITY_DLL_API
wxDialog *DialogFactory( wxWindow &parent, EffectHostInterface *pHost, wxDialog *DialogFactory( wxWindow &parent, EffectHostInterface *pHost,
EffectUIClientInterface *client); EffectUIClientInterface *client);
@ -227,7 +228,7 @@ namespace EffectUI {
// Returns true on success. Will only operate on tracks that // Returns true on success. Will only operate on tracks that
// have the "selected" flag set to true, which is consistent with // have the "selected" flag set to true, which is consistent with
// Audacity's standard UI. // Audacity's standard UI.
bool DoEffect( AUDACITY_DLL_API bool DoEffect(
const PluginID & ID, const CommandContext &context, unsigned flags ); const PluginID & ID, const CommandContext &context, unsigned flags );
} }

View File

@ -51,7 +51,7 @@ protected:
// Postcondition: // Postcondition:
// If mDuration was valid (>= 0), then the tracks are replaced by the // If mDuration was valid (>= 0), then the tracks are replaced by the
// generated results and true is returned. Otherwise, return false. // generated results and true is returned. Otherwise, return false.
bool Process() override; AUDACITY_DLL_API bool Process() override;
}; };
// Abstract generator which creates the sound in discrete blocks, whilst // Abstract generator which creates the sound in discrete blocks, whilst

View File

@ -26,7 +26,7 @@ class Effect;
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class BuiltinEffectsModule final : public ModuleInterface class AUDACITY_DLL_API BuiltinEffectsModule final : public ModuleInterface
{ {
public: public:
BuiltinEffectsModule(const wxString *path); BuiltinEffectsModule(const wxString *path);

View File

@ -58,20 +58,20 @@ of the warped region.
#include "../MemoryX.h" #include "../MemoryX.h"
class TimeWarper /* not final */ class AUDACITY_DLL_API TimeWarper /* not final */
{ {
public: public:
virtual ~TimeWarper(); virtual ~TimeWarper();
virtual double Warp(double originalTime) const = 0; virtual double Warp(double originalTime) const = 0;
}; };
class IdentityTimeWarper final : public TimeWarper class AUDACITY_DLL_API IdentityTimeWarper final : public TimeWarper
{ {
public: public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class ShiftTimeWarper final : public TimeWarper class AUDACITY_DLL_API ShiftTimeWarper final : public TimeWarper
{ {
private: private:
std::unique_ptr<TimeWarper> mWarper; std::unique_ptr<TimeWarper> mWarper;
@ -83,7 +83,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class LinearTimeWarper final : public TimeWarper class AUDACITY_DLL_API LinearTimeWarper final : public TimeWarper
{ {
private: private:
double mScale; double mScale;
@ -97,7 +97,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class LinearInputRateTimeWarper final : public TimeWarper class AUDACITY_DLL_API LinearInputRateTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mRateWarper; LinearTimeWarper mRateWarper;
@ -110,7 +110,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class LinearOutputRateTimeWarper final : public TimeWarper class AUDACITY_DLL_API LinearOutputRateTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mTimeWarper; LinearTimeWarper mTimeWarper;
@ -125,7 +125,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class LinearInputStretchTimeWarper final : public TimeWarper class AUDACITY_DLL_API LinearInputStretchTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mTimeWarper; LinearTimeWarper mTimeWarper;
@ -138,7 +138,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class LinearOutputStretchTimeWarper final : public TimeWarper class AUDACITY_DLL_API LinearOutputStretchTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mTimeWarper; LinearTimeWarper mTimeWarper;
@ -151,7 +151,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class GeometricInputTimeWarper final : public TimeWarper class AUDACITY_DLL_API GeometricInputTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mTimeWarper; LinearTimeWarper mTimeWarper;
@ -164,7 +164,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class GeometricOutputTimeWarper final : public TimeWarper class AUDACITY_DLL_API GeometricOutputTimeWarper final : public TimeWarper
{ {
private: private:
LinearTimeWarper mTimeWarper; LinearTimeWarper mTimeWarper;
@ -177,7 +177,7 @@ public:
double Warp(double originalTime) const override; double Warp(double originalTime) const override;
}; };
class PasteTimeWarper final : public TimeWarper class AUDACITY_DLL_API PasteTimeWarper final : public TimeWarper
{ {
private: private:
const double mOldT1, mNewT1; const double mOldT1, mNewT1;
@ -188,7 +188,7 @@ public:
// Note: this assumes that tStart is a fixed point of warper->warp() // Note: this assumes that tStart is a fixed point of warper->warp()
class RegionTimeWarper final : public TimeWarper class AUDACITY_DLL_API RegionTimeWarper final : public TimeWarper
{ {
private: private:
std::unique_ptr<TimeWarper> mWarper; std::unique_ptr<TimeWarper> mWarper;

View File

@ -17,7 +17,7 @@
class WaveTrack; class WaveTrack;
class EffectTwoPassSimpleMono /* not final */ : public Effect class AUDACITY_DLL_API EffectTwoPassSimpleMono /* not final */ : public Effect
{ {
public: public:
// Effect implementation // Effect implementation

View File

@ -158,7 +158,8 @@ using ExportPluginArray = std::vector < std::unique_ptr< ExportPlugin > > ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// For a file suffix change from the options. // For a file suffix change from the options.
wxDECLARE_EVENT(AUDACITY_FILE_SUFFIX_EVENT, wxCommandEvent); wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
AUDACITY_FILE_SUFFIX_EVENT, wxCommandEvent);
class AUDACITY_DLL_API Exporter final : public wxEvtHandler class AUDACITY_DLL_API Exporter final : public wxEvtHandler
{ {
@ -172,7 +173,7 @@ public:
// Register factories, not plugin objects themselves, which allows them // Register factories, not plugin objects themselves, which allows them
// to have some fresh state variables each time export begins again // to have some fresh state variables each time export begins again
// and to compute translated strings for the current locale // and to compute translated strings for the current locale
struct RegisteredExportPlugin{ struct AUDACITY_DLL_API RegisteredExportPlugin{
RegisteredExportPlugin( RegisteredExportPlugin(
const Identifier &id, // an internal string naming the plug-in const Identifier &id, // an internal string naming the plug-in
const ExportPluginFactory&, const ExportPluginFactory&,
@ -322,16 +323,17 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
TranslatableString AudacityExportCaptionStr(); AUDACITY_DLL_API TranslatableString AudacityExportCaptionStr();
TranslatableString AudacityExportMessageStr(); AUDACITY_DLL_API TranslatableString AudacityExportMessageStr();
/// We have many Export errors that are essentially anonymous /// We have many Export errors that are essentially anonymous
/// and are distinguished only by an error code number. /// and are distinguished only by an error code number.
/// Rather than repeat the code, we have it just once. /// Rather than repeat the code, we have it just once.
void ShowExportErrorDialog(wxString ErrorCode, AUDACITY_DLL_API void ShowExportErrorDialog(wxString ErrorCode,
TranslatableString message = AudacityExportMessageStr(), TranslatableString message = AudacityExportMessageStr(),
const TranslatableString& caption = AudacityExportCaptionStr()); const TranslatableString& caption = AudacityExportCaptionStr());
AUDACITY_DLL_API
void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName); void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName);
#endif #endif

View File

@ -29,7 +29,7 @@ class SelectionState;
class ShuttleGui; class ShuttleGui;
class Track; class Track;
class ExportMultipleDialog final : public wxDialogWrapper class AUDACITY_DLL_API ExportMultipleDialog final : public wxDialogWrapper
{ {
public: public:

View File

@ -77,12 +77,12 @@ class ExtImportItem
wxArrayString mime_types; wxArrayString mime_types;
}; };
class Importer { class AUDACITY_DLL_API Importer {
public: public:
// Objects of this type are statically constructed in files implementing // Objects of this type are statically constructed in files implementing
// subclasses of ImportPlugin // subclasses of ImportPlugin
struct RegisteredImportPlugin{ struct AUDACITY_DLL_API RegisteredImportPlugin{
RegisteredImportPlugin( RegisteredImportPlugin(
const Identifier &id, // an internal string naming the plug-in const Identifier &id, // an internal string naming the plug-in
std::unique_ptr<ImportPlugin>, std::unique_ptr<ImportPlugin>,

View File

@ -60,7 +60,7 @@ class Tags;
class ImportFileHandle; class ImportFileHandle;
class ImportPlugin /* not final */ class AUDACITY_DLL_API ImportPlugin /* not final */
{ {
public: public:
@ -100,7 +100,7 @@ protected:
class WaveTrack; class WaveTrack;
using TrackHolders = std::vector< std::vector< std::shared_ptr<WaveTrack> > >; using TrackHolders = std::vector< std::vector< std::shared_ptr<WaveTrack> > >;
class ImportFileHandle /* not final */ class AUDACITY_DLL_API ImportFileHandle /* not final */
{ {
public: public:
ImportFileHandle(const FilePath & filename); ImportFileHandle(const FilePath & filename);

View File

@ -38,5 +38,5 @@ class EffectsPrefs final : public PrefsPanel
void Populate(); void Populate();
}; };
extern ChoiceSetting EffectsGroupBy; AUDACITY_DLL_API extern ChoiceSetting EffectsGroupBy;
#endif #endif

View File

@ -22,7 +22,7 @@ class ShuttleGui;
#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") } #define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }
class GUIPrefs final : public PrefsPanel class AUDACITY_DLL_API GUIPrefs final : public PrefsPanel
{ {
public: public:
GUIPrefs(wxWindow * parent, wxWindowID winid); GUIPrefs(wxWindow * parent, wxWindowID winid);
@ -68,10 +68,11 @@ class GUIPrefs final : public PrefsPanel
int mDefaultRangeIndex; int mDefaultRangeIndex;
}; };
AUDACITY_DLL_API
int ShowClippingPrefsID(); int ShowClippingPrefsID();
int ShowTrackNameInWaveformPrefsID(); int ShowTrackNameInWaveformPrefsID();
extern ChoiceSetting extern AUDACITY_DLL_API ChoiceSetting
GUIManualLocation GUIManualLocation
; ;

View File

@ -23,7 +23,7 @@ class ShuttleGui;
template< typename Enum > class EnumSetting; template< typename Enum > class EnumSetting;
class ImportExportPrefs final : public PrefsPanel class AUDACITY_DLL_API ImportExportPrefs final : public PrefsPanel
{ {
public: public:
static EnumSetting< bool > ExportDownMixSetting; static EnumSetting< bool > ExportDownMixSetting;

Some files were not shown because too many files have changed in this diff Show More