mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 07:40:23 +02:00
Make a large number of global variables static so they only have file scope when that is all they need. Part of a patch by Campbell Barton
This commit is contained in:
parent
5523339ac5
commit
6758caa5e1
@ -232,7 +232,7 @@ static void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg
|
||||
|
||||
static wxFrame *gParentFrame = NULL;
|
||||
|
||||
bool gInited = false;
|
||||
static bool gInited = false;
|
||||
bool gIsQuitting = false;
|
||||
|
||||
void QuitAudacity(bool bForce)
|
||||
|
@ -51,7 +51,7 @@ enum eCommandType { CtEffect, CtMenu, CtSpecial };
|
||||
// TIDY-ME: Not currently translated,
|
||||
// but there are issues to address if we do.
|
||||
// CLEANSPEECH remnant
|
||||
wxString SpecialCommands[] = {
|
||||
static wxString SpecialCommands[] = {
|
||||
wxT("NoAction"),
|
||||
// wxT("Import"), // non-functioning
|
||||
wxT("ExportMP3_56k_before"),
|
||||
|
@ -65,8 +65,8 @@ out.
|
||||
#define BLOCKFILE_DEBUG_OUTPUT(op, i)
|
||||
#endif
|
||||
|
||||
const int headerTagLen = 20;
|
||||
char headerTag[headerTagLen + 1] = "AudacityBlockFile112";
|
||||
static const int headerTagLen = 20;
|
||||
static char headerTag[headerTagLen + 1] = "AudacityBlockFile112";
|
||||
|
||||
SummaryInfo::SummaryInfo(sampleCount samples)
|
||||
{
|
||||
|
@ -46,8 +46,8 @@
|
||||
|
||||
#include "FFT.h"
|
||||
|
||||
int **gFFTBitTable = NULL;
|
||||
const int MaxFastBits = 16;
|
||||
static int **gFFTBitTable = NULL;
|
||||
static const int MaxFastBits = 16;
|
||||
|
||||
/* Declare Static functions */
|
||||
static int IsPowerOfTwo(int x);
|
||||
|
@ -175,7 +175,7 @@ int sf_num_simple_formats()
|
||||
return count;
|
||||
}
|
||||
|
||||
SF_FORMAT_INFO g_format_info;
|
||||
static SF_FORMAT_INFO g_format_info;
|
||||
|
||||
SF_FORMAT_INFO *sf_simple_format(int i)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ typedef pwxWindow (*tPanelFn)(int);
|
||||
|
||||
// This variable will hold the address of a subroutine in
|
||||
// a DLL that can hijack the normal panel.
|
||||
tPanelFn pPanelHijack=NULL;
|
||||
static tPanelFn pPanelHijack=NULL;
|
||||
|
||||
// Next two commented out lines are handy when investigating
|
||||
// strange DLL behaviour. Instead of dynamic linking,
|
||||
@ -75,7 +75,7 @@ wxWindow * MakeHijackPanel()
|
||||
|
||||
// This variable will hold the address of a subroutine in a DLL that
|
||||
// starts a thread and reads script commands.
|
||||
tpRegScriptServerFunc scriptFn;
|
||||
static tpRegScriptServerFunc scriptFn;
|
||||
|
||||
#ifdef EXPERIMENTAL_MODULE_PREFS
|
||||
bool IsAllowedModule( wxString fname )
|
||||
|
@ -54,8 +54,8 @@ int PitchOctave(const double dMIDInote)
|
||||
}
|
||||
|
||||
|
||||
wxChar gPitchName[10];
|
||||
wxChar * pPitchName;
|
||||
static wxChar gPitchName[10];
|
||||
static wxChar * pPitchName;
|
||||
|
||||
wxChar * PitchName(const double dMIDInote, const bool bWantFlats /* = false */)
|
||||
{
|
||||
|
@ -25,11 +25,11 @@ ODTask requests and internals.
|
||||
#include <wx/thread.h>
|
||||
#include <wx/event.h>
|
||||
|
||||
ODLock gODInitedMutex;
|
||||
bool gManagerCreated=false;
|
||||
bool gPause=false; //to be loaded in and used with Pause/Resume before ODMan init.
|
||||
static ODLock gODInitedMutex;
|
||||
static bool gManagerCreated=false;
|
||||
static bool gPause=false; //to be loaded in and used with Pause/Resume before ODMan init.
|
||||
/// a flag that is set if we have loaded some OD blockfiles from PCM.
|
||||
bool sHasLoadedOD=false;
|
||||
static bool sHasLoadedOD=false;
|
||||
|
||||
ODManager* ODManager::pMan=NULL;
|
||||
//init the accessor function pointer - use the first time version of the interface fetcher
|
||||
@ -38,7 +38,7 @@ typedef ODManager* (*pfodman)();
|
||||
pfodman ODManager::Instance = &(ODManager::InstanceFirstTime);
|
||||
|
||||
//libsndfile is not threadsafe - this deals with it
|
||||
ODLock sLibSndFileMutex;
|
||||
static ODLock sLibSndFileMutex;
|
||||
|
||||
DEFINE_EVENT_TYPE(EVT_ODTASK_UPDATE)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user