Remove EXPERIMENTAL_OUTPUT_DISPLAY...
... Maybe a good feature idea, but the implementation pollutes the code in too many places. It's a special case of the more general idea of many-to-one associations between screen rectangles and track objects. More generalized ways to accommodate that should be sought.
This commit is contained in:
parent
ad221b3e82
commit
5407079c62
|
@ -179,10 +179,6 @@
|
|||
//#define EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
||||
#endif
|
||||
|
||||
// John (Thales) work to make the display show the result of the pan and gain sliders, rather than their input.
|
||||
// First committed by Martyn, 30th May 2013.
|
||||
//#define EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|
||||
// Module prefs provides a panel in prefs where users can choose which modules
|
||||
// to enable.
|
||||
#define EXPERIMENTAL_MODULE_PREFS
|
||||
|
|
|
@ -107,19 +107,6 @@ bool AudacityPrintout::OnPrintPage(int WXUNUSED(page))
|
|||
dc->SetPen(*wxBLACK_PEN);
|
||||
AColor::Line(*dc, 0, r.y, width, r.y);
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(n)){
|
||||
y += r.height;
|
||||
r.x = 0;
|
||||
r.y = y;
|
||||
r.width = width;
|
||||
r.height = (int)(n->GetHeight(true) * scale);
|
||||
artist.DrawTrack(
|
||||
n, *dc, r, SelectedRegion{}, zoomInfo, false, false, false, false);
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
AColor::Line(*dc, 0, r.y, width, r.y);
|
||||
}
|
||||
#endif
|
||||
n = iter.Next();
|
||||
y += r.height;
|
||||
};
|
||||
|
|
110
src/Track.cpp
110
src/Track.cpp
|
@ -62,12 +62,6 @@ Track::Track(const std::shared_ptr<DirManager> &projDirManager)
|
|||
mY = 0;
|
||||
mHeight = DefaultHeight;
|
||||
mIndex = 0;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
mYv = mHeight;
|
||||
mHeightv = mHeight;
|
||||
mPerY = 0.5;
|
||||
mVirtualStereo = false;
|
||||
#endif
|
||||
|
||||
mMinimized = false;
|
||||
|
||||
|
@ -81,9 +75,6 @@ Track::Track(const Track &orig)
|
|||
{
|
||||
mY = 0;
|
||||
mIndex = 0;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
mPerY = 0.5;
|
||||
#endif
|
||||
Init(orig);
|
||||
mOffset = orig.mOffset;
|
||||
}
|
||||
|
@ -101,11 +92,6 @@ void Track::Init(const Track &orig)
|
|||
mHeight = orig.mHeight;
|
||||
mMinimized = orig.mMinimized;
|
||||
mChannel = orig.mChannel;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
mVirtualStereo = orig.mVirtualStereo;
|
||||
mHeightv = orig.mHeightv;
|
||||
mYv = orig.mYv;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Track::SetSelected(bool s)
|
||||
|
@ -161,43 +147,6 @@ void Track::SetIndex(int index)
|
|||
mIndex = index;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int Track::GetY(bool vStereo) const
|
||||
{
|
||||
if(vStereo && mChannel == Track::MonoChannel) return mYv;
|
||||
return mY;
|
||||
}
|
||||
|
||||
void Track::SetY(int y, bool vStereo)
|
||||
{
|
||||
if(vStereo && mChannel == Track::MonoChannel) mYv = y;
|
||||
else mY = y;
|
||||
}
|
||||
|
||||
int Track::GetHeight(bool vStereo) const
|
||||
{
|
||||
if (mMinimized) {
|
||||
return GetMinimizedHeight();
|
||||
}
|
||||
|
||||
if(vStereo && mChannel == Track::MonoChannel) return mHeightv;
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
void Track::SetHeight(int h, bool vStereo)
|
||||
{
|
||||
|
||||
if(vStereo && mChannel == Track::MonoChannel) mHeightv = h;
|
||||
else mHeight = h;
|
||||
|
||||
if (mList) {
|
||||
mList->RecalcPositions(mNode);
|
||||
mList->ResizedEvent(mNode);
|
||||
}
|
||||
}
|
||||
|
||||
#else // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|
||||
int Track::GetY() const
|
||||
{
|
||||
return mY;
|
||||
|
@ -226,7 +175,6 @@ void Track::SetHeight(int h)
|
|||
pList->ResizingEvent(mNode);
|
||||
}
|
||||
}
|
||||
#endif // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|
||||
bool Track::GetMinimized() const
|
||||
{
|
||||
|
@ -281,17 +229,6 @@ Track *Track::GetLink() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void Track::ReorderList(bool resize)
|
||||
{
|
||||
if (mList) {
|
||||
mList->RecalcPositions(mNode);
|
||||
if(resize)
|
||||
mList->ResizedEvent(mNode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool Track::IsSyncLockSelected() const
|
||||
{
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
|
@ -824,36 +761,6 @@ void TrackList::RecalcPositions(TrackNodePointer node)
|
|||
int i = 0;
|
||||
int y = 0;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int cnt = 0;
|
||||
if (hasPrev(node)) {
|
||||
auto prev = node;
|
||||
--prev;
|
||||
t = prev->get();
|
||||
i = t->GetIndex() + 1;
|
||||
if(MONO_WAVE_PAN(t))
|
||||
y = t->GetY(true) + t->GetHeight(true);
|
||||
else
|
||||
y = t->GetY() + t->GetHeight();
|
||||
}
|
||||
|
||||
for (auto n = node; n != end(); ++n) {
|
||||
t = n->get();
|
||||
if(MONO_WAVE_PAN(t))
|
||||
cnt++;
|
||||
|
||||
if(cnt != 2){
|
||||
t->SetIndex(i++);
|
||||
t->SetY(y);
|
||||
y += t->GetHeight();
|
||||
}
|
||||
if(cnt != 0){
|
||||
t->SetY(y,true);
|
||||
y += t->GetHeight(true);
|
||||
}
|
||||
cnt = 0;
|
||||
}
|
||||
#else // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (hasPrev(node)) {
|
||||
auto prev = node;
|
||||
--prev;
|
||||
|
@ -869,7 +776,6 @@ void TrackList::RecalcPositions(TrackNodePointer node)
|
|||
t->SetY(y);
|
||||
y += t->GetHeight();
|
||||
}
|
||||
#endif // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
}
|
||||
|
||||
void TrackList::PermutationEvent()
|
||||
|
@ -1097,11 +1003,6 @@ int TrackList::GetGroupHeight(Track * t) const
|
|||
if (t) {
|
||||
height += t->GetHeight();
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if(MONO_WAVE_PAN(t)){
|
||||
height += t->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
return height;
|
||||
}
|
||||
|
||||
|
@ -1363,20 +1264,11 @@ int TrackList::GetHeight() const
|
|||
{
|
||||
int height = 0;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (!empty()) {
|
||||
const Track *t = rbegin()->get();
|
||||
if(MONO_WAVE_PAN(t))
|
||||
height = t->GetY(true) + t->GetHeight(true);
|
||||
else
|
||||
height = t->GetY() + t->GetHeight();
|
||||
}
|
||||
#else
|
||||
if (!empty()) {
|
||||
const auto &track = back();
|
||||
height = track->GetY() + track->GetHeight();
|
||||
}
|
||||
#endif
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
|
|
26
src/Track.h
26
src/Track.h
|
@ -78,12 +78,6 @@ class AUDACITY_DLL_API Track /* not final */
|
|||
int mIndex;
|
||||
int mY;
|
||||
int mHeight;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int mYv; //For mono a virtual Y value is necessary.
|
||||
int mHeightv; // For mono a virtual height value is necessary.
|
||||
float mPerY; //mY as a percent of mYv + mY
|
||||
bool mVirtualStereo;
|
||||
#endif
|
||||
wxString mName;
|
||||
wxString mDefaultName;
|
||||
|
||||
|
@ -157,25 +151,12 @@ class AUDACITY_DLL_API Track /* not final */
|
|||
|
||||
int GetIndex() const;
|
||||
void SetIndex(int index);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int GetY(bool vStereo = false) const;
|
||||
void SetY(int y, bool vStereo = false);
|
||||
int GetHeight(bool vStereo = false) const;
|
||||
void SetHeight(int h, bool vStereo = false);
|
||||
#else
|
||||
int GetY() const;
|
||||
void SetY(int y);
|
||||
int GetHeight() const;
|
||||
virtual void SetHeight(int h);
|
||||
#endif
|
||||
bool GetMinimized() const;
|
||||
virtual void SetMinimized(bool isMinimized);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
float GetVirtualTrackPercentage() const { return mPerY;}
|
||||
void SetVirtualTrackPercentage(float val) { mPerY = val;}
|
||||
bool GetVirtualStereo() { return mVirtualStereo;}
|
||||
void SetVirtualStereo(bool vStereo) { mVirtualStereo = vStereo;}
|
||||
#endif
|
||||
Track *GetLink() const;
|
||||
|
||||
private:
|
||||
|
@ -192,9 +173,6 @@ class AUDACITY_DLL_API Track /* not final */
|
|||
mutable std::shared_ptr<DirManager> mDirManager;
|
||||
|
||||
public:
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void ReorderList(bool resize = true);
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -249,11 +227,7 @@ class AUDACITY_DLL_API Track /* not final */
|
|||
virtual void SetOffset (double o) { mOffset = o; }
|
||||
|
||||
void SetChannel(int c) { mChannel = c; }
|
||||
#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
|
||||
|
|
|
@ -419,12 +419,6 @@ void TrackArtist::DrawTracks(TrackPanelDrawingContext &context,
|
|||
stereoTrackRect.height += link->GetHeight();
|
||||
}
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(t)){
|
||||
stereoTrackRect.height += t->GetHeight(true);
|
||||
t->SetVirtualStereo(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stereoTrackRect.Intersects(clip) && reg.Contains(stereoTrackRect)) {
|
||||
wxRect rr = trackRect;
|
||||
|
@ -437,26 +431,6 @@ void TrackArtist::DrawTracks(TrackPanelDrawingContext &context,
|
|||
drawEnvelope, bigPoints, drawSliders, hasSolo);
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(t)){
|
||||
trackRect.y = t->GetY(true) - zoomInfo.vpos;
|
||||
trackRect.height = t->GetHeight(true);
|
||||
stereoTrackRect = trackRect;
|
||||
stereoTrackRect.y -= t->GetHeight();
|
||||
stereoTrackRect.height += t->GetHeight();
|
||||
t->SetVirtualStereo(true);
|
||||
if (stereoTrackRect.Intersects(clip) && reg.Contains(stereoTrackRect)) {
|
||||
wxRect rr = trackRect;
|
||||
rr.x += mMarginLeft;
|
||||
rr.y += mMarginTop;
|
||||
rr.width -= (mMarginLeft + mMarginRight);
|
||||
rr.height -= (mMarginTop + mMarginBottom);
|
||||
DrawTrack(t, dc, rr, selectedRegion, zoomInfo,
|
||||
drawEnvelope, bigPoints, drawSliders, hasSolo);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
t = iter.Next();
|
||||
}
|
||||
}
|
||||
|
@ -1192,11 +1166,7 @@ void TrackArtist::DrawMinMaxRMS(wxDC &dc, const wxRect & rect, const double env[
|
|||
float zoomMin, float zoomMax,
|
||||
bool dB, float dBRange,
|
||||
const float *min, const float *max, const float *rms, const int *bl,
|
||||
bool /* showProgress */, bool muted
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
, const float gain
|
||||
#endif
|
||||
)
|
||||
bool /* showProgress */, bool muted)
|
||||
{
|
||||
// Display a line representing the
|
||||
// min and max of the samples in this region
|
||||
|
@ -1223,12 +1193,7 @@ void TrackArtist::DrawMinMaxRMS(wxDC &dc, const wxRect & rect, const double env[
|
|||
for (int x0 = 0; x0 < rect.width; ++x0) {
|
||||
int xx = rect.x + x0;
|
||||
double v;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
//JWA: "gain" variable passed to function includes the pan value and is used below 4/14/13
|
||||
v = min[x0] * env[x0] * gain;
|
||||
#else
|
||||
v = min[x0] * env[x0];
|
||||
#endif
|
||||
if (clipped && mShowClipping && (v <= -MAX_AUDIO))
|
||||
{
|
||||
if (clipcnt == 0 || clipped[clipcnt - 1] != xx) {
|
||||
|
@ -1238,11 +1203,7 @@ void TrackArtist::DrawMinMaxRMS(wxDC &dc, const wxRect & rect, const double env[
|
|||
h1 = GetWaveYPos(v, zoomMin, zoomMax,
|
||||
rect.height, dB, true, dBRange, true);
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
v = max[x0] * env[x0] * gain;
|
||||
#else
|
||||
v = max[x0] * env[x0];
|
||||
#endif
|
||||
if (clipped && mShowClipping && (v >= MAX_AUDIO))
|
||||
{
|
||||
if (clipcnt == 0 || clipped[clipcnt - 1] != xx) {
|
||||
|
@ -1265,17 +1226,10 @@ void TrackArtist::DrawMinMaxRMS(wxDC &dc, const wxRect & rect, const double env[
|
|||
lasth1 = h1;
|
||||
lasth2 = h2;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
r1[x0] = GetWaveYPos(-rms[x0] * env[x0]*gain, zoomMin, zoomMax,
|
||||
rect.height, dB, true, dBRange, true);
|
||||
r2[x0] = GetWaveYPos(rms[x0] * env[x0]*gain, zoomMin, zoomMax,
|
||||
rect.height, dB, true, dBRange, true);
|
||||
#else
|
||||
r1[x0] = GetWaveYPos(-rms[x0] * env[x0], zoomMin, zoomMax,
|
||||
rect.height, dB, true, dBRange, true);
|
||||
r2[x0] = GetWaveYPos(rms[x0] * env[x0], zoomMin, zoomMax,
|
||||
rect.height, dB, true, dBRange, true);
|
||||
#endif
|
||||
// Make sure the rms isn't larger than the waveform min/max
|
||||
if (r1[x0] > h1 - 1) {
|
||||
r1[x0] = h1 - 1;
|
||||
|
@ -2012,11 +1966,7 @@ void TrackArtist::DrawClipWaveform(TrackPanelDrawingContext &context,
|
|||
zoomMin, zoomMax,
|
||||
dB, dBRange,
|
||||
useMin, useMax, useRms, useBl,
|
||||
isLoadingOD, muted
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
, track->GetChannelGain(track->GetChannel())
|
||||
#endif
|
||||
);
|
||||
isLoadingOD, muted);
|
||||
}
|
||||
else {
|
||||
bool highlight = false;
|
||||
|
|
|
@ -160,11 +160,7 @@ class AUDACITY_DLL_API TrackArtist {
|
|||
float zoomMin, float zoomMax,
|
||||
bool dB, float dBRange,
|
||||
const float *min, const float *max, const float *rms, const int *bl,
|
||||
bool /* showProgress */, bool muted
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
, const float gain
|
||||
#endif
|
||||
);
|
||||
bool /* showProgress */, bool muted);
|
||||
void DrawIndividualSamples(wxDC & dc, int leftOffset, const wxRect & rect,
|
||||
float zoomMin, float zoomMax,
|
||||
bool dB, float dBRange,
|
||||
|
|
|
@ -406,33 +406,6 @@ LWSlider *TrackPanel::VelocitySlider( const NoteTrack *nt )
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void TrackPanel::UpdateVirtualStereoOrder()
|
||||
{
|
||||
TrackListOfKindIterator iter(Track::Wave, GetTracks());
|
||||
Track *t;
|
||||
int temp;
|
||||
|
||||
for (t = iter.First(); t; t = iter.Next()) {
|
||||
const auto wt = static_cast<WaveTrack*>(t);
|
||||
if(t->GetChannel() == Track::MonoChannel){
|
||||
|
||||
if(WaveTrack::mMonoAsVirtualStereo && wt->GetPan() != 0){
|
||||
temp = wt->GetHeight();
|
||||
wt->SetHeight(temp*wt->GetVirtualTrackPercentage());
|
||||
wt->SetHeight(temp - wt->GetHeight(),true);
|
||||
}else if(!WaveTrack::mMonoAsVirtualStereo && wt->GetPan() != 0){
|
||||
wt->SetHeight(wt->GetHeight() + wt->GetHeight(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
t = iter.First();
|
||||
if(t){
|
||||
t->ReorderList(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
wxString TrackPanel::gSoloPref;
|
||||
|
||||
void TrackPanel::UpdatePrefs()
|
||||
|
@ -441,15 +414,6 @@ void TrackPanel::UpdatePrefs()
|
|||
true);
|
||||
gPrefs->Read(wxT("/GUI/Solo"), &gSoloPref, wxT("Simple"));
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
bool temp = WaveTrack::mMonoAsVirtualStereo;
|
||||
gPrefs->Read(wxT("/GUI/MonoAsVirtualStereo"), &WaveTrack::mMonoAsVirtualStereo,
|
||||
false);
|
||||
|
||||
if(WaveTrack::mMonoAsVirtualStereo != temp)
|
||||
UpdateVirtualStereoOrder();
|
||||
#endif
|
||||
|
||||
mViewInfo->UpdatePrefs();
|
||||
|
||||
if (mTrackArtist) {
|
||||
|
@ -1818,12 +1782,6 @@ void TrackPanel::RefreshTrack(Track *trk, bool refreshbacking)
|
|||
rect.height += link->GetHeight();
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if(MONO_WAVE_PAN(trk)){
|
||||
rect.height += trk->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if( refreshbacking )
|
||||
{
|
||||
mRefreshBacking = true;
|
||||
|
@ -1925,12 +1883,6 @@ void TrackPanel::DrawEverythingElse(TrackPanelDrawingContext &context,
|
|||
skipBorder = true;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(t)){
|
||||
rect.height += t->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// If the previous track is linked to this one but isn't on the screen
|
||||
// (and thus would have been skipped by VisibleTrackIterator) we need to
|
||||
// draw that track's border instead.
|
||||
|
@ -1973,21 +1925,6 @@ void TrackPanel::DrawEverythingElse(TrackPanelDrawingContext &context,
|
|||
rect.height -= (kTopMargin + kBottomMargin);
|
||||
mTrackArtist->DrawVRuler(context, t, rect);
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(t)){
|
||||
trackRect.y = t->GetY(true) - mViewInfo->vpos;
|
||||
trackRect.height = t->GetHeight(true);
|
||||
if (region.Contains(0, trackRect.y, GetLeftOffset(), trackRect.height)) {
|
||||
wxRect rect = trackRect;
|
||||
rect.x += GetVRulerOffset();
|
||||
rect.y += kTopMargin;
|
||||
rect.width = GetVRulerWidth();
|
||||
rect.height -= (kTopMargin + kBottomMargin);
|
||||
mTrackArtist->DrawVRuler(context, t, rect);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
auto target = Target();
|
||||
|
@ -2421,11 +2358,7 @@ void TrackInfo::Status1DrawFunction
|
|||
/// stereo and what sample rate it's using.
|
||||
auto rate = wt ? wt->GetRate() : 44100.0;
|
||||
wxString s;
|
||||
if (!wt || (wt->GetLinked()
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
&& wt->GetChannel() != Track::MonoChannel
|
||||
#endif
|
||||
))
|
||||
if (!wt || (wt->GetLinked()))
|
||||
s = _("Stereo, %dHz");
|
||||
else {
|
||||
if (wt->GetChannel() == Track::MonoChannel)
|
||||
|
@ -2529,11 +2462,7 @@ void TrackPanel::DrawOutsideOfTrack
|
|||
dc->DrawRectangle(side);
|
||||
|
||||
// Area between tracks of stereo group
|
||||
if (t->GetLinked()
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|| MONO_WAVE_PAN(t)
|
||||
#endif
|
||||
) {
|
||||
if (t->GetLinked()) {
|
||||
// Paint the channel separator over (what would be) the shadow of the top
|
||||
// channel, and the top inset of the bottom channel
|
||||
side = rect;
|
||||
|
@ -2611,12 +2540,6 @@ void TrackPanel::UpdateTrackVRuler(const Track *t)
|
|||
rect.height = l->GetHeight() - (kTopMargin + kBottomMargin);
|
||||
mTrackArtist->UpdateVRuler(l, rect);
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if(MONO_WAVE_PAN(t)){
|
||||
rect.height = t->GetHeight(true) - (kTopMargin + kBottomMargin);
|
||||
mTrackArtist->UpdateVRuler(t, rect);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TrackPanel::UpdateVRulerSize()
|
||||
|
@ -2717,11 +2640,6 @@ void TrackPanel::EnsureVisible(Track * t)
|
|||
nt = iter.Next();
|
||||
trackHeight += nt->GetHeight();
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if(MONO_WAVE_PAN(it)){
|
||||
trackHeight += it->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
nt = it;
|
||||
}
|
||||
|
@ -2770,11 +2688,6 @@ void TrackPanel::VerticalScroll( float fracPosition){
|
|||
nt = iter.Next();
|
||||
trackHeight += nt->GetHeight();
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if(MONO_WAVE_PAN(it)){
|
||||
trackHeight += it->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
nt = it;
|
||||
}
|
||||
|
@ -2814,11 +2727,7 @@ void TrackPanel::DrawBordersAroundTrack(Track * t, wxDC * dc,
|
|||
|
||||
// The lines at bottom of 1st track and top of second track of stereo group
|
||||
// Possibly replace with DrawRectangle to add left border.
|
||||
if (t->GetLinked()
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|| MONO_WAVE_PAN(t)
|
||||
#endif
|
||||
) {
|
||||
if (t->GetLinked()) {
|
||||
// The given rect has had the top inset subtracted
|
||||
int h1 = rect.y + t->GetHeight() - kTopInset;
|
||||
// h1 is the top coordinate of the second tracks' rectangle
|
||||
|
@ -3518,7 +3427,6 @@ auto TrackPanelCellIterator::operator* () const -> value_type
|
|||
|
||||
void TrackPanelCellIterator::UpdateRect()
|
||||
{
|
||||
// TODO: cooperate with EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
const auto size = mPanel->GetSize();
|
||||
if ( mpTrack ) {
|
||||
mRect = {
|
||||
|
|
|
@ -437,10 +437,6 @@ public:
|
|||
(const std::shared_ptr< TrackPanelCell > &pCell);
|
||||
std::shared_ptr< TrackPanelCell > GetBackgroundCell();
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void UpdateVirtualStereoOrder();
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Accessors...
|
||||
static bool HasSoloButton(){ return gSoloPref!=wxT("None");}
|
||||
|
|
|
@ -24,10 +24,6 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "TrackPanelMouseEvent.h"
|
||||
#include "tracks/ui/TrackControls.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
#include "WaveTrack.h"
|
||||
#endif
|
||||
|
||||
HitTestPreview TrackPanelResizeHandle::HitPreview(bool bLinked)
|
||||
{
|
||||
static wxCursor resizeCursor{ wxCURSOR_SIZENS };
|
||||
|
@ -67,59 +63,35 @@ TrackPanelResizeHandle::TrackPanelResizeHandle
|
|||
: mpTrack{ track }
|
||||
, mMouseClickY( y )
|
||||
{
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (MONO_WAVE_PAN(track)){
|
||||
//STM: Determine whether we should rescale one or two tracks
|
||||
if (track->GetVirtualStereo()) {
|
||||
// mpTrack is the lower track
|
||||
mInitialTrackHeight = track->GetHeight(true);
|
||||
mInitialActualHeight = mInitialUpperActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mInitialUpperTrackHeight = track->GetHeight();
|
||||
mMode = IsResizingBelowLinkedTracks;
|
||||
}
|
||||
else {
|
||||
// mpTrack is the upper track
|
||||
mInitialTrackHeight = track->GetHeight(true);
|
||||
mInitialActualHeight = mInitialUpperActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mInitialUpperTrackHeight = track->GetHeight();
|
||||
mMode = IsResizingBetweenLinkedTracks;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
auto tracks = pProject->GetTracks();
|
||||
Track *prev = tracks->GetPrev(track.get());
|
||||
Track *next = tracks->GetNext(track.get());
|
||||
auto tracks = pProject->GetTracks();
|
||||
Track *prev = tracks->GetPrev(track.get());
|
||||
Track *next = tracks->GetNext(track.get());
|
||||
|
||||
//STM: Determine whether we should rescale one or two tracks
|
||||
if (prev && prev->GetLink() == track.get()) {
|
||||
// mpTrack is the lower track
|
||||
mInitialTrackHeight = track->GetHeight();
|
||||
mInitialActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mInitialUpperTrackHeight = prev->GetHeight();
|
||||
mInitialUpperActualHeight = prev->GetActualHeight();
|
||||
mMode = IsResizingBelowLinkedTracks;
|
||||
}
|
||||
else if (next && track->GetLink() == next) {
|
||||
// mpTrack is the upper track
|
||||
mInitialTrackHeight = next->GetHeight();
|
||||
mInitialActualHeight = next->GetActualHeight();
|
||||
mInitialMinimized = next->GetMinimized();
|
||||
mInitialUpperTrackHeight = track->GetHeight();
|
||||
mInitialUpperActualHeight = track->GetActualHeight();
|
||||
mMode = IsResizingBetweenLinkedTracks;
|
||||
}
|
||||
else {
|
||||
// DM: Save the initial mouse location and the initial height
|
||||
mInitialTrackHeight = track->GetHeight();
|
||||
mInitialActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mMode = IsResizing;
|
||||
}
|
||||
//STM: Determine whether we should rescale one or two tracks
|
||||
if (prev && prev->GetLink() == track.get()) {
|
||||
// mpTrack is the lower track
|
||||
mInitialTrackHeight = track->GetHeight();
|
||||
mInitialActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mInitialUpperTrackHeight = prev->GetHeight();
|
||||
mInitialUpperActualHeight = prev->GetActualHeight();
|
||||
mMode = IsResizingBelowLinkedTracks;
|
||||
}
|
||||
else if (next && track->GetLink() == next) {
|
||||
// mpTrack is the upper track
|
||||
mInitialTrackHeight = next->GetHeight();
|
||||
mInitialActualHeight = next->GetActualHeight();
|
||||
mInitialMinimized = next->GetMinimized();
|
||||
mInitialUpperTrackHeight = track->GetHeight();
|
||||
mInitialUpperActualHeight = track->GetActualHeight();
|
||||
mMode = IsResizingBetweenLinkedTracks;
|
||||
}
|
||||
else {
|
||||
// DM: Save the initial mouse location and the initial height
|
||||
mInitialTrackHeight = track->GetHeight();
|
||||
mInitialActualHeight = track->GetActualHeight();
|
||||
mInitialMinimized = track->GetMinimized();
|
||||
mMode = IsResizing;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,13 +126,6 @@ UIHandle::Result TrackPanelResizeHandle::Drag
|
|||
mInitialUpperTrackHeight = link->GetHeight();
|
||||
mInitialTrackHeight = pTrack->GetHeight();
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
else if (MONO_WAVE_PAN(mpTrack)){
|
||||
mpTrack->SetMinimized(false);
|
||||
mInitialUpperTrackHeight = mpTrack->GetHeight();
|
||||
mInitialTrackHeight = mpTrack->GetHeight(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Common pieces of code for MONO_WAVE_PAN and otherwise.
|
||||
|
@ -180,11 +145,7 @@ UIHandle::Result TrackPanelResizeHandle::Drag
|
|||
if (newUpperTrackHeight < prev->GetMinimizedHeight())
|
||||
newUpperTrackHeight = prev->GetMinimizedHeight();
|
||||
|
||||
pTrack->SetHeight(newTrackHeight
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
, vStereo
|
||||
#endif
|
||||
);
|
||||
pTrack->SetHeight(newTrackHeight);
|
||||
prev->SetHeight(newUpperTrackHeight);
|
||||
};
|
||||
|
||||
|
@ -204,21 +165,8 @@ UIHandle::Result TrackPanelResizeHandle::Drag
|
|||
mInitialUpperTrackHeight + mInitialTrackHeight - pTrack->GetMinimizedHeight();
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (vStereo) {
|
||||
float temp = 1.0f;
|
||||
if(newUpperTrackHeight != 0.0f)
|
||||
temp = (float)newUpperTrackHeight/(float)(newUpperTrackHeight + newTrackHeight);
|
||||
mpTrack->SetVirtualTrackPercentage(temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
pTrack->SetHeight(newUpperTrackHeight);
|
||||
next->SetHeight(newTrackHeight
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
, vStereo
|
||||
#endif
|
||||
);
|
||||
next->SetHeight(newTrackHeight);
|
||||
};
|
||||
|
||||
auto doResize = [&] {
|
||||
|
@ -232,58 +180,28 @@ UIHandle::Result TrackPanelResizeHandle::Drag
|
|||
// If two, resize proportionally if we are dragging the lower track, and
|
||||
// adjust compensatively if we are dragging the upper track.
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(MONO_WAVE_PAN(mpTrack)) {
|
||||
switch( mMode )
|
||||
{
|
||||
case IsResizingBelowLinkedTracks:
|
||||
{
|
||||
doResizeBelow( mpTrack, true );
|
||||
break;
|
||||
}
|
||||
case IsResizingBetweenLinkedTracks:
|
||||
{
|
||||
doResizeBetween( mpTrack, true );
|
||||
break;
|
||||
}
|
||||
case IsResizing:
|
||||
{
|
||||
// Should imply !MONO_WAVE_PAN(mCapturedTrack),
|
||||
// so impossible, but anyway:
|
||||
doResize();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// don't refresh in this case.
|
||||
return RefreshCode::RefreshNone;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
switch( mMode )
|
||||
{
|
||||
switch( mMode )
|
||||
case IsResizingBelowLinkedTracks:
|
||||
{
|
||||
case IsResizingBelowLinkedTracks:
|
||||
{
|
||||
Track *prev = tracks->GetPrev(pTrack.get());
|
||||
doResizeBelow(prev, false);
|
||||
break;
|
||||
}
|
||||
case IsResizingBetweenLinkedTracks:
|
||||
{
|
||||
Track *next = tracks->GetNext(pTrack.get());
|
||||
doResizeBetween(next, false);
|
||||
break;
|
||||
}
|
||||
case IsResizing:
|
||||
{
|
||||
doResize();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// don't refresh in this case.
|
||||
return RefreshCode::RefreshNone;
|
||||
Track *prev = tracks->GetPrev(pTrack.get());
|
||||
doResizeBelow(prev, false);
|
||||
break;
|
||||
}
|
||||
case IsResizingBetweenLinkedTracks:
|
||||
{
|
||||
Track *next = tracks->GetNext(pTrack.get());
|
||||
doResizeBetween(next, false);
|
||||
break;
|
||||
}
|
||||
case IsResizing:
|
||||
{
|
||||
doResize();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// don't refresh in this case.
|
||||
return RefreshCode::RefreshNone;
|
||||
}
|
||||
|
||||
return RefreshCode::RefreshAll;
|
||||
|
@ -329,13 +247,8 @@ UIHandle::Result TrackPanelResizeHandle::Cancel(AudacityProject *pProject)
|
|||
Track *const next = tracks->GetNext(pTrack.get());
|
||||
pTrack->SetHeight(mInitialUpperActualHeight);
|
||||
pTrack->SetMinimized(mInitialMinimized);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if( !MONO_WAVE_PAN(pTrack) )
|
||||
#endif
|
||||
{
|
||||
next->SetHeight(mInitialActualHeight);
|
||||
next->SetMinimized(mInitialMinimized);
|
||||
}
|
||||
next->SetHeight(mInitialActualHeight);
|
||||
next->SetMinimized(mInitialMinimized);
|
||||
}
|
||||
break;
|
||||
case IsResizingBelowLinkedTracks:
|
||||
|
@ -343,13 +256,8 @@ UIHandle::Result TrackPanelResizeHandle::Cancel(AudacityProject *pProject)
|
|||
Track *const prev = tracks->GetPrev(pTrack.get());
|
||||
pTrack->SetHeight(mInitialActualHeight);
|
||||
pTrack->SetMinimized(mInitialMinimized);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if( !MONO_WAVE_PAN(pTrack) )
|
||||
#endif
|
||||
{
|
||||
prev->SetHeight(mInitialUpperActualHeight);
|
||||
prev->SetMinimized(mInitialMinimized);
|
||||
}
|
||||
prev->SetHeight(mInitialUpperActualHeight);
|
||||
prev->SetMinimized(mInitialMinimized);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -68,10 +68,6 @@ Track classes.
|
|||
|
||||
using std::max;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
bool WaveTrack::mMonoAsVirtualStereo;
|
||||
#endif
|
||||
|
||||
WaveTrack::Holder TrackFactory::DuplicateWaveTrack(const WaveTrack &orig)
|
||||
{
|
||||
return std::unique_ptr<WaveTrack>
|
||||
|
@ -430,41 +426,6 @@ float WaveTrack::GetPan() const
|
|||
return mPan;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
bool WaveTrack::SetPan(float newPan)
|
||||
{
|
||||
float p=mPan;
|
||||
bool panZero=false;
|
||||
int temp;
|
||||
|
||||
if (newPan > 1.0)
|
||||
mPan = 1.0;
|
||||
else if (newPan < -1.0)
|
||||
mPan = -1.0;
|
||||
else
|
||||
mPan = newPan;
|
||||
|
||||
if(mDisplay == WaveTrack::Waveform &&
|
||||
mChannel == Track::MonoChannel &&
|
||||
((p == 0.0f) != (newPan == 0.0f)) &&
|
||||
mMonoAsVirtualStereo)
|
||||
{
|
||||
panZero=true;
|
||||
if(!mPan) {
|
||||
mHeight = mHeight + mHeightv;
|
||||
}
|
||||
else {
|
||||
temp = mHeight;
|
||||
mHeight = temp*mPerY;
|
||||
mHeightv = temp - mHeight;
|
||||
}
|
||||
ReorderList();
|
||||
}
|
||||
|
||||
return panZero;
|
||||
}
|
||||
|
||||
#else // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void WaveTrack::SetPan(float newPan)
|
||||
{
|
||||
if (newPan > 1.0)
|
||||
|
@ -474,65 +435,12 @@ void WaveTrack::SetPan(float newPan)
|
|||
else
|
||||
mPan = newPan;
|
||||
}
|
||||
#endif // EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void WaveTrack::SetVirtualState(bool state, bool half)
|
||||
{
|
||||
int temp;
|
||||
|
||||
if(half)
|
||||
mPerY = 0.5;
|
||||
|
||||
if(state){
|
||||
if(mPan){
|
||||
temp = mHeight;
|
||||
mHeight = temp*mPerY;
|
||||
mHeightv = temp - mHeight;
|
||||
}
|
||||
ReorderList();
|
||||
}else{
|
||||
if(mPan){
|
||||
mHeight = mHeight + mHeightv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int WaveTrack::GetMinimizedHeight() const
|
||||
{
|
||||
if (GetLink()) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
if(GetChannel() == MonoChannel && GetPan() != 0 && mMonoAsVirtualStereo && mDisplay == Waveform)
|
||||
return 20;
|
||||
else
|
||||
return 40;
|
||||
}
|
||||
|
||||
void WaveTrack::VirtualStereoInit()
|
||||
{
|
||||
int temp;
|
||||
|
||||
if(mChannel == Track::MonoChannel && mPan != 0.0f && mMonoAsVirtualStereo){
|
||||
temp = mHeight;
|
||||
mHeight = temp*mPerY;
|
||||
mHeightv = temp - mHeight;
|
||||
ReorderList(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
float WaveTrack::GetChannelGain(int channel) const
|
||||
{
|
||||
float left = 1.0;
|
||||
float right = 1.0;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(mVirtualStereo)
|
||||
channel = 3;
|
||||
#endif
|
||||
|
||||
if (mPan < 0)
|
||||
right = (mPan + 1.0);
|
||||
else if (mPan > 0)
|
||||
|
@ -1800,9 +1708,6 @@ bool WaveTrack::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
// Don't use SetWaveColorIndex as it sets the clips too.
|
||||
mWaveColorIndex = nValue;
|
||||
} // while
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
VirtualStereoInit();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1864,16 +1769,7 @@ void WaveTrack::WriteXML(XMLWriter &xmlFile) const
|
|||
xmlFile.WriteAttr(wxT("channel"), mChannel);
|
||||
xmlFile.WriteAttr(wxT("linked"), mLinked);
|
||||
this->PlayableTrack::WriteXMLAttributes(xmlFile);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int height;
|
||||
if(MONO_PAN)
|
||||
height = mHeight + mHeightv;
|
||||
else
|
||||
height = this->GetActualHeight();
|
||||
xmlFile.WriteAttr(wxT("height"), height);
|
||||
#else
|
||||
xmlFile.WriteAttr(wxT("height"), this->GetActualHeight());
|
||||
#endif
|
||||
xmlFile.WriteAttr(wxT("minimized"), this->GetMinimized());
|
||||
xmlFile.WriteAttr(wxT("isSelected"), this->GetSelected());
|
||||
xmlFile.WriteAttr(wxT("rate"), mRate);
|
||||
|
|
|
@ -37,22 +37,6 @@ class EnvelopeHandle;
|
|||
//
|
||||
#define WAVETRACK_MERGE_POINT_TOLERANCE 0.01
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
#define MONO_WAVE_PAN(T) \
|
||||
(T != NULL && \
|
||||
T->GetChannel() == Track::MonoChannel && \
|
||||
T->GetKind() == Track::Wave && \
|
||||
((const WaveTrack *)T)->GetPan() != 0 && \
|
||||
WaveTrack::mMonoAsVirtualStereo && \
|
||||
((const WaveTrack *)T)->GetDisplay() == WaveTrack::Waveform)
|
||||
|
||||
#define MONO_PAN \
|
||||
(mPan != 0.0 && \
|
||||
mChannel == MonoChannel && \
|
||||
mDisplay == Waveform && \
|
||||
mMonoAsVirtualStereo)
|
||||
#endif
|
||||
|
||||
/// \brief Structure to hold region of a wavetrack and a comparison function
|
||||
/// for sortability.
|
||||
struct Region
|
||||
|
@ -92,15 +76,9 @@ class AUDACITY_DLL_API WaveTrack final : public PlayableTrack {
|
|||
|
||||
Track::Holder Duplicate() const override;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void VirtualStereoInit();
|
||||
#endif
|
||||
friend class TrackFactory;
|
||||
|
||||
public:
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
static bool mMonoAsVirtualStereo;
|
||||
#endif
|
||||
|
||||
typedef WaveTrackLocation Location;
|
||||
using Holder = std::unique_ptr<WaveTrack>;
|
||||
|
@ -135,9 +113,7 @@ class AUDACITY_DLL_API WaveTrack final : public PlayableTrack {
|
|||
//
|
||||
|
||||
int GetKind() const override { return Wave; }
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
int GetMinimizedHeight() const override;
|
||||
#endif
|
||||
|
||||
//
|
||||
// WaveTrack parameters
|
||||
//
|
||||
|
@ -151,16 +127,10 @@ class AUDACITY_DLL_API WaveTrack final : public PlayableTrack {
|
|||
|
||||
// -1.0 (left) -> 1.0 (right)
|
||||
float GetPan() const;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
bool SetPan(float newPan);
|
||||
#else
|
||||
void SetPan(float newPan) override;
|
||||
#endif
|
||||
|
||||
// Takes gain and pan into account
|
||||
float GetChannelGain(int channel) const;
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void SetVirtualState(bool state, bool half=false);
|
||||
#endif
|
||||
|
||||
void SetMinimized(bool isMinimized) override;
|
||||
|
||||
|
|
|
@ -204,11 +204,6 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||
S.TieCheckBox(_("B&lend system and Audacity theme"),
|
||||
wxT("/GUI/BlendThemes"),
|
||||
true);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
S.TieCheckBox(_("&Display a mono channel as virtual stereo"),
|
||||
wxT("/GUI/MonoAsVirtualStereo"),
|
||||
false);
|
||||
#endif
|
||||
}
|
||||
S.EndStatic();
|
||||
}
|
||||
|
|
|
@ -738,14 +738,6 @@ void WaveTrackMenuTable::OnSetDisplay(wxCommandEvent & event)
|
|||
? WaveformSettings::stLinear
|
||||
: WaveformSettings::stLogarithmic;
|
||||
}
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (pTrack->GetDisplay() == WaveTrack::Waveform) {
|
||||
pTrack->SetVirtualState(false);
|
||||
}
|
||||
else if (id == WaveTrack::Waveform) {
|
||||
pTrack->SetVirtualState(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
AudacityProject *const project = ::GetActiveProject();
|
||||
project->ModifyState(true);
|
||||
|
@ -853,13 +845,6 @@ void WaveTrackMenuTable::OnMergeStereo(wxCommandEvent &)
|
|||
// Assume partner is wave or null
|
||||
const auto partner = static_cast<WaveTrack*>(pTrack->GetLink());
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (MONO_WAVE_PAN(pTrack))
|
||||
pTrack->SetVirtualState(false);
|
||||
if (MONO_WAVE_PAN(partner))
|
||||
static_cast<WaveTrack*>(partner)->SetVirtualState(false);
|
||||
#endif
|
||||
|
||||
if (partner) {
|
||||
// Set partner's parameters to match target.
|
||||
partner->Merge(*pTrack);
|
||||
|
@ -918,13 +903,6 @@ void WaveTrackMenuTable::SplitStereo(bool stereo)
|
|||
if (!partner)
|
||||
return;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (!stereo && MONO_WAVE_PAN(pTrack))
|
||||
pTrack->SetVirtualState(true, true);
|
||||
if (!stereo && MONO_WAVE_PAN(partner))
|
||||
partner->SetVirtualState(true, true);
|
||||
#endif
|
||||
|
||||
if (partner)
|
||||
{
|
||||
// Keep original stereo track name.
|
||||
|
|
|
@ -131,12 +131,7 @@ UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newV
|
|||
auto pTrack = GetWaveTrack();
|
||||
|
||||
if (pTrack) {
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
bool panZero = false;
|
||||
panZero = static_cast<WaveTrack*>(mpTrack)->SetPan(newValue);
|
||||
#else
|
||||
pTrack->SetPan(newValue);
|
||||
#endif
|
||||
|
||||
// Assume linked track is wave or null
|
||||
const auto link = static_cast<WaveTrack*>(pTrack->GetLink());
|
||||
|
@ -146,11 +141,6 @@ UIHandle::Result PanSliderHandle::SetValue(AudacityProject *pProject, float newV
|
|||
MixerBoard *const pMixerBoard = pProject->GetMixerBoard();
|
||||
if (pMixerBoard)
|
||||
pMixerBoard->UpdatePan(pTrack.get());
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if(panZero)
|
||||
result |= FixScrollbars;
|
||||
#endif
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -20,10 +20,6 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../TrackPanelAx.h"
|
||||
#include "../../ViewInfo.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
#include "../../WaveTrack.h"
|
||||
#endif
|
||||
|
||||
#include <wx/dc.h>
|
||||
|
||||
namespace {
|
||||
|
@ -117,16 +113,6 @@ void EditCursorOverlay::Draw(OverlayPanel &panel, wxDC &dc)
|
|||
AColor::Line(dc, mLastCursorX, rect.GetTop(), mLastCursorX, rect.GetBottom());
|
||||
// ^^^ The whole point of this routine.
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
if (MONO_WAVE_PAN(pTrack)){
|
||||
auto y = pTrack->GetY(true) - viewInfo.vpos;
|
||||
auto top = y + kTopMargin;
|
||||
auto height = pTrack->GetHeight(true) - (kTopMargin + kBottomMargin);
|
||||
// - 1 because AColor::Line is inclusive of endpoint
|
||||
AColor::Line(dc, mLastCursorX, top, mLastCursorX, top + height - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue