1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00
This commit is contained in:
v.audacity 2013-08-03 00:24:26 +00:00
parent d571ece7e6
commit 51e0391b7d
6 changed files with 17 additions and 2 deletions

View File

@ -237,8 +237,6 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
wxString prefix = ::wxPathOnly(files[i]);
::wxSetWorkingDirectory(prefix);
Module *module = new Module(files[i]);
#ifdef EXPERIMENTAL_MODULE_PREFS
if( !IsAllowedModule( files[i] ) ) // don't try and check the in-date-ness before this as that means loading the module to call it's GetVersionString, which could do anything.
#endif EXPERIMENTAL_MODULE_PREFS
@ -254,6 +252,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler)
continue;
}
Module *module = new Module(files[i]);
if (module->Load()) // it will get rejected if there are version problems
{
mInstance->mModules.Add(module);

View File

@ -184,7 +184,11 @@ bool Sequence::ConvertToSampleFormat(sampleFormat format, bool* pbChanged)
bSuccess = (pOldBlockFile->ReadData(bufferOld, oldFormat, 0, len) > 0);
if (!bSuccess)
{
DeleteSamples(bufferNew);
DeleteSamples(bufferOld);
break;
}
CopySamples(bufferOld, oldFormat, bufferNew, mSampleFormat, len);

View File

@ -117,6 +117,10 @@ void EffectChangePitch::DeduceFrequencies()
for(j=1; j<windowSize/2; j++)
if (freqa[j] > freqa[argmax])
argmax = j;
delete [] freq;
delete [] freqa;
lag = (windowSize/2 - 1) - argmax;
m_dStartFrequency = rate / lag;
}

View File

@ -2675,6 +2675,9 @@ void EqualizationDialog::OnInvert(wxCommandEvent &event) // Inverts any curve
mLogEnvelope->Move(when[i] , -value[i]);
}
delete [] when;
delete [] value;
// copy it back to the other one (just in case)
if(lin)
EnvLinToLog();

View File

@ -233,6 +233,7 @@ int ExportMP2::Export(AudacityProject *project,
{
wxMessageBox(_("Cannot export MP2 with this sample rate and bit rate"),
_("Error"), wxICON_STOP);
twolame_close(&encodeOptions);
return false;
}
@ -243,6 +244,7 @@ int ExportMP2::Export(AudacityProject *project,
FileIO outFile(fName, FileIO::Output);
if (!outFile.IsOpened()) {
wxMessageBox(_("Unable to open target file for writing"));
twolame_close(&encodeOptions);
return false;
}

View File

@ -596,7 +596,10 @@ char *ExportPCM::ConvertTo7bitASCII(const wxString wxStr)
return NULL;
char *pSrc = (char *)malloc(sr);
if (!pSrc)
{
free(pDest);
return NULL;
}
memset(pDest, 0, sr);
memset(pSrc, 0, sr);