Fix compilation of EXPERIMENTAL_OUTPUT_DISPLAY; fix a warning in it

This commit is contained in:
Paul Licameli 2017-04-23 07:58:11 -04:00
parent 218f2ebb8d
commit 3aff330671
2 changed files with 12 additions and 4 deletions

View File

@ -199,7 +199,11 @@ class AUDACITY_DLL_API Track /* not final */ : public XMLTagHandler
virtual void SetOffset (double o) { mOffset = o; }
void SetChannel(int c) { mChannel = c; }
virtual void SetPan( float ){ ;};
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
virtual bool SetPan( float ){ return false; }
#else
virtual void SetPan( float ){ ;}
#endif
virtual void SetPanFromChannelType(){ ;};
// AS: Note that the dirManager is mutable. This is

View File

@ -428,12 +428,16 @@ bool WaveTrack::SetPan(float newPan)
else
mPan = newPan;
if(mDisplay == WaveTrack::Waveform && mChannel == Track::MonoChannel && (p == 0.0f && newPan != 0.0f || p != 0.0f && newPan == 0.0f) && mMonoAsVirtualStereo)
if(mDisplay == WaveTrack::Waveform &&
mChannel == Track::MonoChannel &&
((p == 0.0f) != (newPan == 0.0f)) &&
mMonoAsVirtualStereo)
{
panZero=true;
if(!mPan){
if(!mPan) {
mHeight = mHeight + mHeightv;
}else{
}
else {
temp = mHeight;
mHeight = temp*mPerY;
mHeightv = temp - mHeight;