mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-15 15:50:54 +02:00
Bug 368: No longer look at plugins.cfg to decide whether to rescan. Just use the rescan preference.
This commit is contained in:
parent
507bc713a7
commit
ba187bbafc
@ -4,6 +4,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#undef WXUNUSED
|
||||
#define WXUNUSED( x )
|
||||
|
||||
namespace _sbsms_ {
|
||||
|
||||
typedef float t_fft[2];
|
||||
@ -49,7 +52,7 @@ typedef long (*SBSMSResampleCB)(void *cbData, SBSMSFrame *frame);
|
||||
class SBSMSInterface {
|
||||
public:
|
||||
virtual ~SBSMSInterface() {}
|
||||
virtual long samples(audio *buf, long n) { return 0; }
|
||||
virtual long samples(audio * WXUNUSED(buf), long WXUNUSED(n)) { return 0; }
|
||||
virtual float getStretch(float t)=0;
|
||||
virtual float getPitch(float t)=0;
|
||||
virtual long getPresamples()=0;
|
||||
@ -78,11 +81,11 @@ class SBSMSRenderer {
|
||||
public:
|
||||
virtual ~SBSMSRenderer() {}
|
||||
virtual void startFrame() {}
|
||||
virtual void startTime(int c, const TimeType &time, int n) {}
|
||||
virtual void render(int c, SBSMSTrack *t) {}
|
||||
virtual void endTime(int c) {}
|
||||
virtual void startTime(int WXUNUSED(c), const TimeType & WXUNUSED(time), int WXUNUSED(n)) {}
|
||||
virtual void render(int WXUNUSED(c), SBSMSTrack * WXUNUSED(t)) {}
|
||||
virtual void endTime(int WXUNUSED(c)) {}
|
||||
virtual void endFrame() {}
|
||||
virtual void end(const SampleCountType &samples) {}
|
||||
virtual void end(const SampleCountType & WXUNUSED(samples)) {}
|
||||
};
|
||||
|
||||
enum SBSMSError {
|
||||
|
@ -77,16 +77,21 @@ void RegisterVSTEffects()
|
||||
|
||||
pm.Open();
|
||||
|
||||
bool bRescanRequired=false;
|
||||
if ( gPrefs->Read(wxT("/VST/Rescan"), (long)true) != false) {
|
||||
bRescanRequired = true;
|
||||
pm.PurgeType(VSTPLUGINTYPE);
|
||||
}
|
||||
|
||||
if (!pm.HasType(VSTPLUGINTYPE)) {
|
||||
pm.Close();
|
||||
VSTEffect::Scan();
|
||||
if( bRescanRequired )
|
||||
if( VSTEffect::Scan() != wxID_CANCEL )
|
||||
{
|
||||
gPrefs->Write(wxT("/VST/Rescan"), false);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
pm.Open();
|
||||
gPrefs->Write(wxT("/VST/Rescan"), false);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
EffectManager & em = EffectManager::Get();
|
||||
@ -160,7 +165,7 @@ PluginRegistrationDialog::PluginRegistrationDialog(wxWindow * parent, const wxAr
|
||||
SetLabel(_("Install VST Effects")); // Provide visual label
|
||||
SetName(_("Install VST Effects")); // Provide audible label
|
||||
Populate();
|
||||
|
||||
SetReturnCode( wxID_OK);
|
||||
mAbort = false;
|
||||
}
|
||||
|
||||
@ -335,12 +340,12 @@ void PluginRegistrationDialog::OnApply(wxCommandEvent & WXUNUSED(event))
|
||||
mPlugins->SetItemImage( i, SHOW_CHECKED );
|
||||
}
|
||||
}
|
||||
EndModal( true );
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
void PluginRegistrationDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
EndModal(false);
|
||||
EndModal(wxID_CANCEL);
|
||||
}
|
||||
|
||||
|
||||
@ -1931,10 +1936,10 @@ void VSTEffect::ScanOnePlugin( const wxString & file )
|
||||
wxExecute((wxChar **) argv, wxEXEC_SYNC | wxEXEC_NODISABLE, NULL);
|
||||
}
|
||||
|
||||
void VSTEffect::ShowPluginListDialog( const wxArrayString & files )
|
||||
int VSTEffect::ShowPluginListDialog( const wxArrayString & files )
|
||||
{
|
||||
PluginRegistrationDialog d( wxGetApp().GetTopWindow(), files );
|
||||
d.ShowModal();
|
||||
return d.ShowModal();
|
||||
}
|
||||
|
||||
void VSTEffect::ShowProgressDialog( const wxString & longest, const wxArrayString & files )
|
||||
@ -1961,7 +1966,7 @@ void VSTEffect::ShowProgressDialog( const wxString & longest, const wxArrayStrin
|
||||
}
|
||||
|
||||
/* static */
|
||||
void VSTEffect::Scan()
|
||||
int VSTEffect::Scan()
|
||||
{
|
||||
wxArrayString audacityPathList = wxGetApp().audacityPathList;
|
||||
wxArrayString pathList;
|
||||
@ -2066,7 +2071,7 @@ void VSTEffect::Scan()
|
||||
// JKC: Let's not show the progress dialog if there are no
|
||||
// files to test.
|
||||
if( cnt <= 0 )
|
||||
return;
|
||||
return wxID_OK;
|
||||
|
||||
for (size_t i = 0; i < cnt; i++) {
|
||||
if (files[i].Length() > longest.Length()) {
|
||||
@ -2076,7 +2081,7 @@ void VSTEffect::Scan()
|
||||
//Choose the first for the original version which scans them all
|
||||
//The second to selectively scan.
|
||||
//ShowProgressDialog( longest, files );
|
||||
ShowPluginListDialog( files );
|
||||
return ShowPluginListDialog( files );
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -65,11 +65,11 @@ class VSTEffect:public Effect
|
||||
|
||||
// Plugin probing
|
||||
|
||||
static void Scan();
|
||||
static int Scan();
|
||||
static void Check(const wxChar *fname);
|
||||
|
||||
static void ScanOnePlugin( const wxString & file );
|
||||
static void ShowPluginListDialog( const wxArrayString & files );
|
||||
static int ShowPluginListDialog( const wxArrayString & files );
|
||||
static void ShowProgressDialog( const wxString & longest, const wxArrayString & files );
|
||||
|
||||
|
||||
|
@ -93,6 +93,7 @@
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="echo // Automatically generated file >"$(InputDir)/$(ConfigurationName)/config.h"
IF NOT "%DXSDK_DIR%" == "" echo #define PX_USE_WIN_DSOUND 1 >>"$(InputDir)/$(ConfigurationName)/config.h"
"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
@ -149,6 +150,7 @@
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="set BASE="../../../lib-src/portmixer"
set CFLAGS=/Od /I "%BASE%/../portaudio-v19/include" /I "%BASE%/include" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "PX_USE_WIN_MME" /D "_MBCS" /GF /FD /EHsc /RTC1 /MDd /Gy /Fo"$(IntDir)/" /Fd"$(IntDir)/" /W3 /nologo /c /ZI /wd4996 /FI "$(InputDir)/$(ConfigurationName)/config.h" /errorReport:prompt
set LIBS=

if "%DXSDK_DIR%"=="" goto NoDX

cl %CFLAGS% /I "%DXSDK_DIR%/include" "%BASE%/src/px_win_ds.c"

set LIBS="%DXSDK_DIR%/lib/x86/dxguid.lib"

:NoDX

lib /OUT:"$(TargetPath)" "$(IntDir)/*.obj" %LIBS%
"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
Loading…
x
Reference in New Issue
Block a user