Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ reaper_csurf_integrator.xcodeproj/project.xcworkspace/xcuserdata/christopherreis
reaper_csurf_integrator.xcodeproj/project.xcworkspace/xcuserdata/christopherreis.xcuserdatad/UserInterfaceState.xcuserstate
reaper_csurf_integrator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
reaper_csurf_integrator.xcodeproj/project.pbxproj

# JetBrains IDEs
.idea/
7 changes: 0 additions & 7 deletions reaper_csurf_integrator/control_surface_integrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4250,13 +4250,6 @@ CSurfIntegrator::CSurfIntegrator()

index = projectconfig_var_getoffs("panmode", &size);
projectPanModeOffs_ = size==4 ? index : -1;

// these are supported by ~7.10+, previous versions we fallback to get_config_var() on-demand
index = projectconfig_var_getoffs("projmetrov1", &size);
projectMetronomePrimaryVolumeOffs_ = size==8 ? index : -1;

index = projectconfig_var_getoffs("projmetrov2", &size);
projectMetronomeSecondaryVolumeOffs_ = size==8 ? index : -1;
}

CSurfIntegrator::~CSurfIntegrator()
Expand Down
29 changes: 2 additions & 27 deletions reaper_csurf_integrator/control_surface_integrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4061,10 +4061,7 @@ class CSurfIntegrator : public IReaperControlSurface
int measOffsOffs_;
int timeOffsOffs_; // for a double
int projectPanModeOffs_;

int projectMetronomePrimaryVolumeOffs_; // for double -- if invalid, use fallbacks
int projectMetronomeSecondaryVolumeOffs_; // for double -- if invalid, use fallbacks


void InitActionsDictionary();

double GetPrivateProfileDouble(const char *key)
Expand Down Expand Up @@ -4121,29 +4118,7 @@ class CSurfIntegrator : public IReaperControlSurface
int *GetMeasOffsPtr() { return (int *) projectconfig_var_addr(NULL,measOffsOffs_); }
double *GetTimeOffsPtr() { return (double *) projectconfig_var_addr(NULL,timeOffsOffs_); }
int GetProjectPanMode() { int *p = (int *) projectconfig_var_addr(NULL,projectPanModeOffs_); return p ? *p : 0; }

double *GetMetronomePrimaryVolumePtr()
{
void *ret = projectconfig_var_addr(NULL,projectMetronomePrimaryVolumeOffs_);
if (ret) return (double *)ret;
// REAPER 7.09 and earlier require this:
int size=0;
ret = get_config_var("projmetrov1", &size);
if (size==8) return (double *)ret;
return NULL;
}

double *GetMetronomeSecondaryVolumePtr()
{
void *ret = projectconfig_var_addr(NULL,projectMetronomeSecondaryVolumeOffs_);
if (ret) return (double *)ret;
// REAPER 7.09 and earlier require this:
int size=0;
ret = get_config_var("projmetrov2", &size);
if (size==8) return (double *)ret;
return NULL;
}


void Speak(const char *phrase)
{
static void (*osara_outputMessage)(const char *message);
Expand Down