mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-04 22:49:07 +02:00
apply parts of Campbell Bartons patch for cleaning up compiler warnings: add static qualifiers to methods, ensure prototypes match definitions and some whitespace and comment changes
This commit is contained in:
parent
9d0daf8662
commit
b95918fe52
@ -214,7 +214,7 @@ DEFINE_EVENT_TYPE(EVT_RELEASE_KEYBOARD);
|
|||||||
DEFINE_EVENT_TYPE(EVT_CAPTURE_KEY);
|
DEFINE_EVENT_TYPE(EVT_CAPTURE_KEY);
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg)
|
static void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg)
|
||||||
{
|
{
|
||||||
if (msg)
|
if (msg)
|
||||||
printf("ASSERTION FAILED: %s\n%s: %d\n", (const char *)wxString(msg).mb_str(), (const char *)wxString(fileName).mb_str(), lineNumber);
|
printf("ASSERTION FAILED: %s\n%s: %d\n", (const char *)wxString(msg).mb_str(), (const char *)wxString(fileName).mb_str(), lineNumber);
|
||||||
@ -461,7 +461,7 @@ typedef void (*_gnome_interaction_key_return_fn)(gint, gboolean);
|
|||||||
static _gnome_client_request_interaction_fn gnome_client_request_interaction;
|
static _gnome_client_request_interaction_fn gnome_client_request_interaction;
|
||||||
static _gnome_interaction_key_return_fn gnome_interaction_key_return;
|
static _gnome_interaction_key_return_fn gnome_interaction_key_return;
|
||||||
|
|
||||||
void interact_cb(GnomeClient *client,
|
static void interact_cb(GnomeClient *client,
|
||||||
gint key,
|
gint key,
|
||||||
GnomeDialogType type,
|
GnomeDialogType type,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -475,7 +475,7 @@ void interact_cb(GnomeClient *client,
|
|||||||
gnome_interaction_key_return(key, e.GetVeto());
|
gnome_interaction_key_return(key, e.GetVeto());
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean save_yourself_cb(GnomeClient *client,
|
static gboolean save_yourself_cb(GnomeClient *client,
|
||||||
gint phase,
|
gint phase,
|
||||||
GnomeSaveStyle style,
|
GnomeSaveStyle style,
|
||||||
gboolean shutdown,
|
gboolean shutdown,
|
||||||
|
@ -928,7 +928,7 @@ void AudioIO::HandleDeviceChange()
|
|||||||
#endif // USE_PORTMIXER
|
#endif // USE_PORTMIXER
|
||||||
}
|
}
|
||||||
|
|
||||||
PaSampleFormat AudacityToPortAudioSampleFormat(sampleFormat format)
|
static PaSampleFormat AudacityToPortAudioSampleFormat(sampleFormat format)
|
||||||
{
|
{
|
||||||
switch(format) {
|
switch(format) {
|
||||||
case int16Sample:
|
case int16Sample:
|
||||||
@ -3210,7 +3210,7 @@ void AudioIO::AILAProcess(double maxPeak) {
|
|||||||
|
|
||||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
void DoSoftwarePlaythrough(const void *inputBuffer,
|
static void DoSoftwarePlaythrough(const void *inputBuffer,
|
||||||
sampleFormat inputFormat,
|
sampleFormat inputFormat,
|
||||||
int inputChannels,
|
int inputChannels,
|
||||||
float *outputBuffer,
|
float *outputBuffer,
|
||||||
|
@ -56,7 +56,7 @@ WX_DECLARE_HASH_MAP(BlockFile *, bool,
|
|||||||
// Given a project, returns a single array of all SeqBlocks
|
// Given a project, returns a single array of all SeqBlocks
|
||||||
// in the current set of tracks. Enumerating that array allows
|
// in the current set of tracks. Enumerating that array allows
|
||||||
// you to process all block files in the current set.
|
// you to process all block files in the current set.
|
||||||
void GetAllSeqBlocks(AudacityProject *project,
|
static void GetAllSeqBlocks(AudacityProject *project,
|
||||||
BlockArray *outBlocks)
|
BlockArray *outBlocks)
|
||||||
{
|
{
|
||||||
TrackList *tracks = project->GetTracks();
|
TrackList *tracks = project->GetTracks();
|
||||||
|
@ -79,7 +79,7 @@ wxFileConfig *gPrefs = NULL;
|
|||||||
int gMenusDirty = 0;
|
int gMenusDirty = 0;
|
||||||
|
|
||||||
// Copy one entry from one wxConfig object to another
|
// Copy one entry from one wxConfig object to another
|
||||||
void CopyEntry(wxString path, wxConfigBase *src, wxConfigBase *dst, wxString entry)
|
static void CopyEntry(wxString path, wxConfigBase *src, wxConfigBase *dst, wxString entry)
|
||||||
{
|
{
|
||||||
switch(src->GetEntryType(entry)) {
|
switch(src->GetEntryType(entry)) {
|
||||||
case wxConfigBase::Type_Unknown:
|
case wxConfigBase::Type_Unknown:
|
||||||
@ -110,7 +110,7 @@ void CopyEntry(wxString path, wxConfigBase *src, wxConfigBase *dst, wxString ent
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recursive routine to copy all groups and entries from one wxConfig object to another
|
// Recursive routine to copy all groups and entries from one wxConfig object to another
|
||||||
void CopyEntriesRecursive(wxString path, wxConfigBase *src, wxConfigBase *dst)
|
static void CopyEntriesRecursive(wxString path, wxConfigBase *src, wxConfigBase *dst)
|
||||||
{
|
{
|
||||||
wxString entryName;
|
wxString entryName;
|
||||||
long entryIndex;
|
long entryIndex;
|
||||||
|
@ -745,7 +745,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
#endif // CLEANSPEECH
|
#endif // CLEANSPEECH
|
||||||
mShowId3Dialog(true), //lda
|
mShowId3Dialog(true), //lda
|
||||||
mLastFocusedWindow(NULL),
|
mLastFocusedWindow(NULL),
|
||||||
mKeyboardCaptured(false),
|
mKeyboardCaptured(NULL),
|
||||||
mImportXMLTagHandler(NULL),
|
mImportXMLTagHandler(NULL),
|
||||||
mAutoSaving(false),
|
mAutoSaving(false),
|
||||||
mIsRecovered(false),
|
mIsRecovered(false),
|
||||||
|
@ -3195,7 +3195,7 @@ bool TrackPanel::IsDragZooming()
|
|||||||
return (abs(mZoomEnd - mZoomStart) > DragThreshold);
|
return (abs(mZoomEnd - mZoomStart) > DragThreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines if drag zooming is active
|
/// Determines if the a modal tool is active
|
||||||
bool TrackPanel::IsMouseCaptured()
|
bool TrackPanel::IsMouseCaptured()
|
||||||
{
|
{
|
||||||
return (mMouseCapture != IsUncaptured);
|
return (mMouseCapture != IsUncaptured);
|
||||||
|
@ -71,7 +71,7 @@ to get its definition, rather than rolling our own.
|
|||||||
#include "../Internat.h"
|
#include "../Internat.h"
|
||||||
|
|
||||||
|
|
||||||
wxUint32 SwapUintEndianess(wxUint32 in)
|
static wxUint32 SwapUintEndianess(wxUint32 in)
|
||||||
{
|
{
|
||||||
wxUint32 out;
|
wxUint32 out;
|
||||||
unsigned char *p_in = (unsigned char *) ∈
|
unsigned char *p_in = (unsigned char *) ∈
|
||||||
|
@ -221,7 +221,7 @@ static CHOICES sampRates[] =
|
|||||||
#define ID_CBR 7003
|
#define ID_CBR 7003
|
||||||
#define ID_QUALITY 7004
|
#define ID_QUALITY 7004
|
||||||
|
|
||||||
void InitMP3_Statics()
|
static void InitMP3_Statics()
|
||||||
{
|
{
|
||||||
for (size_t i=0; i < WXSIZEOF(fixRates); i++)
|
for (size_t i=0; i < WXSIZEOF(fixRates); i++)
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
static FILE *g_raw_debug_file = NULL;
|
static FILE *g_raw_debug_file = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float AmpStat(float *data, int len)
|
static float AmpStat(float *data, int len)
|
||||||
{
|
{
|
||||||
float sum, sumofsquares, avg, variance, dev;
|
float sum, sumofsquares, avg, variance, dev;
|
||||||
int i;
|
int i;
|
||||||
@ -57,7 +57,7 @@ float AmpStat(float *data, int len)
|
|||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
float JumpStat(float *data, int len)
|
static float JumpStat(float *data, int len)
|
||||||
{
|
{
|
||||||
float avg;
|
float avg;
|
||||||
int i;
|
int i;
|
||||||
@ -74,7 +74,7 @@ float JumpStat(float *data, int len)
|
|||||||
return avg;
|
return avg;
|
||||||
}
|
}
|
||||||
|
|
||||||
float SecondDStat(float *data, int len)
|
static float SecondDStat(float *data, int len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
float v1=0, v2=0, v3=0;
|
float v1=0, v2=0, v3=0;
|
||||||
@ -93,7 +93,7 @@ float SecondDStat(float *data, int len)
|
|||||||
return sum/len;
|
return sum/len;
|
||||||
}
|
}
|
||||||
|
|
||||||
float RedundantStereo(float *data, int len)
|
static float RedundantStereo(float *data, int len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
@ -106,7 +106,7 @@ float RedundantStereo(float *data, int len)
|
|||||||
return ((c * 2.0) / (len - 2));
|
return ((c * 2.0) / (len - 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtractFloats(bool doublePrec,
|
static void ExtractFloats(bool doublePrec,
|
||||||
bool bigendian,
|
bool bigendian,
|
||||||
bool stereo,
|
bool stereo,
|
||||||
int offset,
|
int offset,
|
||||||
@ -183,7 +183,7 @@ void ExtractFloats(bool doublePrec,
|
|||||||
*len2 = dataCount2;
|
*len2 = dataCount2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Extract(bool bits16,
|
static void Extract(bool bits16,
|
||||||
bool sign,
|
bool sign,
|
||||||
bool stereo,
|
bool stereo,
|
||||||
bool bigendian,
|
bool bigendian,
|
||||||
@ -284,7 +284,7 @@ void Extract(bool bits16,
|
|||||||
*len2 = dataCount2;
|
*len2 = dataCount2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GuessFloatFormats(int numTests, char **rawData, int dataSize,
|
static int GuessFloatFormats(int numTests, char **rawData, int dataSize,
|
||||||
int *out_offset, int *out_channels)
|
int *out_offset, int *out_channels)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
@ -519,7 +519,7 @@ int GuessFloatFormats(int numTests, char **rawData, int dataSize,
|
|||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Guess8Bit(int numTests, char **rawData, int dataSize, int *out_channels)
|
static int Guess8Bit(int numTests, char **rawData, int dataSize, int *out_channels)
|
||||||
{
|
{
|
||||||
bool guessSigned = false;
|
bool guessSigned = false;
|
||||||
bool guessStereo = false;
|
bool guessStereo = false;
|
||||||
@ -677,7 +677,7 @@ int Guess8Bit(int numTests, char **rawData, int dataSize, int *out_channels)
|
|||||||
return SF_FORMAT_RAW | SF_FORMAT_PCM_U8;
|
return SF_FORMAT_RAW | SF_FORMAT_PCM_U8;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Guess16Bit(int numTests, char **rawData,
|
static int Guess16Bit(int numTests, char **rawData,
|
||||||
int dataSize, bool evenMSB,
|
int dataSize, bool evenMSB,
|
||||||
int *out_offset, int *out_channels)
|
int *out_offset, int *out_channels)
|
||||||
{
|
{
|
||||||
@ -953,7 +953,7 @@ int Guess16Bit(int numTests, char **rawData,
|
|||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GuessIntFormats(int numTests, char **rawData, int dataSize,
|
static int GuessIntFormats(int numTests, char **rawData, int dataSize,
|
||||||
int *out_offset, int *out_channels)
|
int *out_offset, int *out_channels)
|
||||||
{
|
{
|
||||||
int format = SF_FORMAT_RAW;
|
int format = SF_FORMAT_RAW;
|
||||||
|
@ -191,7 +191,7 @@ void KeyConfigPrefs::CreateList()
|
|||||||
mList->SetColumnWidth(KeyComboColumn, 250);
|
mList->SetColumnWidth(KeyComboColumn, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxCALLBACK SortCallback(long item1, long item2, long sortData)
|
static int wxCALLBACK SortCallback(long item1, long item2, long sortData)
|
||||||
{
|
{
|
||||||
wxArrayString *names = (wxArrayString *) sortData;
|
wxArrayString *names = (wxArrayString *) sortData;
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ Gives an Error message with an option for help.
|
|||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
|
|
||||||
|
#include "ErrorDialog.h"
|
||||||
|
|
||||||
|
|
||||||
class ErrorDialog : public wxDialog
|
class ErrorDialog : public wxDialog
|
||||||
{
|
{
|
||||||
@ -180,7 +182,10 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void ShowHtmlText( wxWindow * pParent, const wxString &Title, const wxString &HtmlText, bool bIsFile = false, bool bModal = false )
|
void ShowHtmlText(wxWindow *pParent,
|
||||||
|
const wxString &Title,
|
||||||
|
const wxString &HtmlText,
|
||||||
|
bool bIsFile = false, bool bModal = false)
|
||||||
{
|
{
|
||||||
LinkingHtmlWindow *html;
|
LinkingHtmlWindow *html;
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ void ShowInfoDialog( wxWindow *parent,
|
|||||||
/// Displays a new window with wxHTML help.
|
/// Displays a new window with wxHTML help.
|
||||||
void ShowHtmlText( wxWindow * pParent,
|
void ShowHtmlText( wxWindow * pParent,
|
||||||
const wxString &Title,
|
const wxString &Title,
|
||||||
const wxString &HtmlText );
|
const wxString &HtmlText,
|
||||||
|
bool bIsFile, bool bModal);
|
||||||
|
|
||||||
/// Displays a file in your browser, if it's available locally,
|
/// Displays a file in your browser, if it's available locally,
|
||||||
/// OR else links to the internet.
|
/// OR else links to the internet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user