Quantcast

TimeTracks (was Re: [audacity] r12077 committed - commit a large patch by Maarten Baert...)

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TimeTracks (was Re: [audacity] r12077 committed - commit a large patch by Maarten Baert...)

MartynShaw
Hi there

Sorry if I'm OT here, and things have  been covered already, but I'm
catching up after 10 days away.

This looks like very interesting work by Maarten!  And thanks for the
review and commit Richard!  Coupled with the resampling work from Rob
I think we have a lot to be excited about for the next release!
Additionally to all the other stuff as well.

Just a few comments, and I haven't looked at the signal processing:

I'm not sure if I'm 100% up to date here but I see that
Envelope::Rescale does not have a definition in Envelope.h, unless I
add it?  It may be just me.

On the GUI for TimeTracks now, the one that is greyed-out is the one
that we currently have (lin/log v-scale).  That's the same as Audio
Tracks 'Waveform, Waveform (dB)...' etc., but I really don't find it
obvious when I go to check what I'm looking at - I tend to think the
more-highlighted one is the one I'm looking at and the greyed one/s
are not available.  I prefer all possible options to be not-greyed and
a tick against the one I am using (like Mono, Left Channel, Right
Channel, or in Set Rate).  And/or some indication in the panel.

I've seen the discussions of the on/off-ness of timetracks after a
render and agree the the TT should then turn off.  A button on the
panel like the mute/solo would be good to turn it on/off.

The log/lin interpolation could also have a button there, and so not
have it on the menu.

And the indications of the vertical scale (Linear / Logarithmic) do
not actually say that they apply to the vertical scale.  Maybe
Scale:lin, Scale:log (with ticks) would be be more obvious?

We do not seem to be allowing vertical zooming in the ruler, which
would be useful, and more consistent with audio tracks. Would that be
a good idea?  I think so.

But I should stop here.

Great progress, a bit to go to get up to the standards of the audio
tracks but a vast improvement on what we had!

TTFN
Martyn

On 19/12/2012 21:51, [hidden email] wrote:

> Revision: 12077
> Author:   richardash1981
> Date:     Wed Dec 19 13:49:25 2012
> Log:      commit a large patch by Maarten Baert
> maarten-baert<at>hotmail<dot>com to fix and improve time track
> support. Several fix-me issues remain but none are new with this patch.
> http://code.google.com/p/audacity/source/detail?r=12077
>
> Modified:
>   /audacity-src/trunk/src/AudioIO.cpp
>   /audacity-src/trunk/src/AudioIO.h
>   /audacity-src/trunk/src/Envelope.cpp
>   /audacity-src/trunk/src/Envelope.h
>   /audacity-src/trunk/src/Mix.cpp
>   /audacity-src/trunk/src/Mix.h
>   /audacity-src/trunk/src/Resample.cpp
>   /audacity-src/trunk/src/Resample.h
>   /audacity-src/trunk/src/TimeTrack.cpp
>   /audacity-src/trunk/src/TimeTrack.h
>   /audacity-src/trunk/src/TrackArtist.cpp
>   /audacity-src/trunk/src/TrackPanel.cpp
>   /audacity-src/trunk/src/TrackPanel.h
>   /audacity-src/trunk/src/export/Export.cpp
>   /audacity-src/trunk/src/toolbars/TranscriptionToolBar.cpp
>   /audacity-src/trunk/src/widgets/Ruler.cpp
>
<snip>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Maarten Baert
On 27/12/12 01:26, Martyn Shaw wrote:
> I'm not sure if I'm 100% up to date here but I see that
> Envelope::Rescale does not have a definition in Envelope.h, unless I
> add it?  It may be just me.
I added Rescale, but removed it again because it wasn't needed anymore.
It's not there anymore in the latest revision AFAIK.
> We do not seem to be allowing vertical zooming in the ruler, which
> would be useful, and more consistent with audio tracks. Would that be
> a good idea?  I think so.
I intend to do that, it's just not finished yet.

Maarten Baert

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

MartynShaw


On 27/12/2012 01:55, Maarten Baert wrote:
> On 27/12/12 01:26, Martyn Shaw wrote:
>> I'm not sure if I'm 100% up to date here but I see that
>> Envelope::Rescale does not have a definition in Envelope.h, unless I
>> add it?  It may be just me.
> I added Rescale, but removed it again because it wasn't needed anymore.
> It's not there anymore in the latest revision AFAIK.

OK, thanks.  I guess I had a patch applied and wasn't actually at HEAD.

>> We do not seem to be allowing vertical zooming in the ruler, which
>> would be useful, and more consistent with audio tracks. Would that be
>> a good idea?  I think so.
> I intend to do that, it's just not finished yet.

Thanks!  That would be great!

TTFN
Martyn

>
> Maarten Baert
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks (was Re: [audacity] r12077 committed - commit a large patch by Maarten Baert...)

Gale
Administrator
In reply to this post by MartynShaw
>> Gale wrote:
>>  I've found a repeatable problem I don't understand (tested on Windows 7
>> and Ubuntu). It isn't possible to drag or set an envelope point above a
>> range of 200.
> Maarten wrote:
> Yes, that's a result of some code in the Envelope class that was intended
> for wave tracks (which are limited to 2.0). This is why I need to make the
> minimum and maximum value of Envelope adjustable. I'm still working on that.  
Thanks, I can now set points up to 1000 after your "patch-envelope-range"
patch (tested on Windows).  

Not sure if you know but although I can reopen projects with points set > 200
I cannot undo Time Track removal and have points > 200 respected.

Any points > 200 are reset to 200 after undoing Time Track removal and then
I cannot set further points > 200 in that track.



Gale
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks (was Re: [audacity] r12077 committed - commit a large patch by Maarten Baert...)

Maarten Baert
On 29/12/12 04:48, Gale (Audacity Team) wrote:
> Not sure if you know but although I can reopen projects with points set >
> 200
> I cannot undo Time Track removal and have points > 200 respected.
>
> Any points > 200 are reset to 200 after undoing Time Track removal and then
> I cannot set further points > 200 in that track.
I see - I forgot to set the new range in the second constructor of
TimeTrack, so when that one get's called you still get the old
behaviour. I've attached a new patch. It's almost identical to the
previous patch, I only added this:

@@ -65,8 +66,9 @@
     SetInterpolateLog(orig.GetInterpolateLog()); // this calls
Envelope::SetInterpolateDB
     mEnvelope->Flatten(1.0);
     mEnvelope->Mirror(false);
+   mEnvelope->SetOffset(0);
+   mEnvelope->SetRange(0.1, 10.0);
     mEnvelope->Paste(0.0, orig.mEnvelope);
-   mEnvelope->SetOffset(0);

     mRuler = new Ruler();
     mRuler->SetLabelEdges(false);

Maarten Baert

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

patch-envelope-range-2.patch (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Richard Ash (audacity-help)
On Sat, 29 Dec 2012 16:16:05 +0100
Maarten Baert <[hidden email]> wrote:

> I see - I forgot to set the new range in the second constructor of
> TimeTrack, so when that one get's called you still get the old
> behaviour. I've attached a new patch. It's almost identical to the
> previous patch, I only added this:
>
> @@ -65,8 +66,9 @@
>      SetInterpolateLog(orig.GetInterpolateLog()); // this calls
> Envelope::SetInterpolateDB
>      mEnvelope->Flatten(1.0);
>      mEnvelope->Mirror(false);
> +   mEnvelope->SetOffset(0);
> +   mEnvelope->SetRange(0.1, 10.0);
>      mEnvelope->Paste(0.0, orig.mEnvelope);
> -   mEnvelope->SetOffset(0);
Is this the right range? Shouldn't the range of the new
track be copied from the original, in case the source track has a wider
range (which would be clipped by the paste into the narrower range
track)?

On top of commits including your patch I'm suggesting the attached.

Richard
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

envelope-copy-const.patch (460 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Maarten Baert
On 29/12/12 17:35, Richard Ash wrote:
> Is this the right range? Shouldn't the range of the new track be
> copied from the original, in case the source track has a wider range
> (which would be clipped by the paste into the narrower range track)?
> On top of commits including your patch I'm suggesting the attached.
The range of the envelope is currently fixed at the maximum allowed
range of the time track - it doesn't change when you change the range of
the time track because that would clip the results (which isn't what
zooming should do of course). So both would have the same effect, but I
agree that your version is better (it just makes more sense considering
the envelope is just a copy of an existing envelope).

Maarten Baert

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Gale
Administrator
In reply to this post by Richard Ash (audacity-help)

| From Richard Ash <[hidden email]>
| Sat, 29 Dec 2012 16:35:16 +0000
| Subject: [Audacity-devel] TimeTracks

> On Sat, 29 Dec 2012 16:16:05 +0100
> Maarten Baert <[hidden email]> wrote:
> > I see - I forgot to set the new range in the second constructor of
> > TimeTrack, so when that one get's called you still get the old
> > behaviour. I've attached a new patch. It's almost identical to the
> > previous patch, I only added this:
> >
> > @@ -65,8 +66,9 @@
> >      SetInterpolateLog(orig.GetInterpolateLog()); // this calls
> > Envelope::SetInterpolateDB
> >      mEnvelope->Flatten(1.0);
> >      mEnvelope->Mirror(false);
> > +   mEnvelope->SetOffset(0);
> > +   mEnvelope->SetRange(0.1, 10.0);
> >      mEnvelope->Paste(0.0, orig.mEnvelope);
> > -   mEnvelope->SetOffset(0);
>
> Is this the right range? Shouldn't the range of the new
> track be copied from the original, in case the source track has a wider
> range (which would be clipped by the paste into the narrower range
> track)?
>
> On top of commits including your patch I'm suggesting the attached.

Maarten,

Trying what is committed now (unmodified HEAD) I get the same
errors building Unicode Release on Windows that I told you about
when trying V1 of patch-envelope-range (which built OK on Unicode
Debug):  

26>PCMAliasBlockFile.cpp
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
26>ODPCMAliasBlockFile.cpp
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'

At least, I assume this patch is the cause.  

Windows 7 x64, WxWidgets 2.8.12.




Gale

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Maarten Baert
On 29/12/12 23:30, Gale Andrews wrote:

> Maarten,
>
> Trying what is committed now (unmodified HEAD) I get the same
> errors building Unicode Release on Windows that I told you about
> when trying V1 of patch-envelope-range (which built OK on Unicode
> Debug):
>
> 26>PCMAliasBlockFile.cpp
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
> 26>ODPCMAliasBlockFile.cpp
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>
> At least, I assume this patch is the cause.
>
> Windows 7 x64, WxWidgets 2.8.12.
I already replied to that (off-list), did you miss it?
> I've seen similar errors before. Some windows headers define the
> macros 'min' and 'max', which obviously interfere with the functions
> std::min and std::max - you get something like std::((a < b)? a : b).
> You could add something like '#ifdef min #undef min #endif' to the top
> of Envelope.h. I'm not sure why it only happens in Release mode though.
I haven't added this in my patch though, I haven't tried building on
Windows so I don't really know whether this will solve your issue or
just create other problems elsewhere.

Maarten Baert

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Gale
Administrator
> "Maarten Baert" wrote:
> > On 29/12/12 23:30, Gale Andrews wrote:
> > Trying what is committed now (unmodified HEAD) I get the same
> > errors building Unicode Release on Windows that I told you about
> > when trying V1 of patch-envelope-range (which built OK on Unicode
> > Debug):
> >
>> 26>PCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>ODPCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>>
>> At least, I assume this patch is the cause.
>>
>> Windows 7 x64, WxWidgets 2.8.12.
> I already replied to that (off-list), did you miss it?
I finally found a forwarded copy in GMail Trash, thanks but the original never
reached me.


> I've seen similar errors before. Some windows headers define the
> macros 'min' and 'max', which obviously interfere with the functions
> std::min and std::max - you get something like std::((a < b)? a : b).
> You could add something like '#ifdef min #undef min #endif' to the top
> of Envelope.h. I'm not sure why it only happens in Release mode though.
> I haven't added this in my patch though, I haven't tried building on
> Windows so I don't really know whether this will solve your issue or
> just create other problems elsewhere.

Thanks, I tried that. It doesn't seem to have helped (line number in Envelope.h
is four higher because of what I added):

6>PCMAliasBlockFile.cpp
6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' : illegal token on right side of '::'
6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error : '::'
6>ODPCMAliasBlockFile.cpp
6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' : illegal token on right side of '::'
6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error : '::'

The suggested change to Envelope.h also caused two new errors:

6>TimeTrack.cpp
6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMinValue' : is not a member of 'TimeTrack'
6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of 'TimeTrack'
6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMaxValue' : is not a member of 'TimeTrack'
6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of 'TimeTrack'


Gale
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

MartynShaw
In reply to this post by Maarten Baert
Hi Maarten

I have the same problem as Gale had here, on Windows.

On 30/12/2012 00:05, Maarten Baert wrote:

> On 29/12/12 23:30, Gale Andrews wrote:
>> Maarten,
>>
>> Trying what is committed now (unmodified HEAD) I get the same
>> errors building Unicode Release on Windows that I told you about
>> when trying V1 of patch-envelope-range (which built OK on Unicode
>> Debug):
>>
>> 26>PCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>ODPCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>>
>> At least, I assume this patch is the cause.
>>
>> Windows 7 x64, WxWidgets 2.8.12.
> I already replied to that (off-list), did you miss it?
>> I've seen similar errors before. Some windows headers define the
>> macros 'min' and 'max', which obviously interfere with the functions
>> std::min and std::max - you get something like std::((a < b)? a : b).
>> You could add something like '#ifdef min #undef min #endif' to the top
>> of Envelope.h. I'm not sure why it only happens in Release mode though.
> I haven't added this in my patch though, I haven't tried building on
> Windows so I don't really know whether this will solve your issue or
> just create other problems elsewhere.

adding the rather ugly:

#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif

before
    double ClampValue(double value) { ...
does enable me to compile Release here, but I note that in Envelope.h
it does not make a difference if
#include <algorithm>
is in or out, implying to me that the declaration of algorithm is
happening somewhere else.

Also I note that std::max(...) is in use in several other places in
the Audacity code, without this problem.  The only place that I see
the problem is in Envelope.h and that is also the only .h file in
which std::max(...) is used.  Is that a coincidence, or a clue to how
to make the code more cross-platform?

This may be a minor point on Gnu/Linux but is a bigger problem here on
Win.

Thanks
Martyn (which is presumably pronounced the same as 'Maarten!)

> Maarten Baert
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_123012
> _______________________________________________
> audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

MartynShaw
In reply to this post by Gale
overlapping in the writing/posting...

On 30/12/2012 23:52, Gale (Audacity Team) wrote:

>> "Maarten Baert" wrote:
>>> On 29/12/12 23:30, Gale Andrews wrote:
>>> Trying what is committed now (unmodified HEAD) I get the same
>>> errors building Unicode Release on Windows that I told you about
>>> when trying V1 of patch-envelope-range (which built OK on Unicode
>>> Debug):
>>>
>>> 26>PCMAliasBlockFile.cpp
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax
>>> error : '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>> 26>ODPCMAliasBlockFile.cpp
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax
>>> error : '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
>>> illegal token on right side of '::'
>>>
>>> At least, I assume this patch is the cause.
>>>
>>> Windows 7 x64, WxWidgets 2.8.12.
>> I already replied to that (off-list), did you miss it?
> I finally found a forwarded copy in GMail Trash, thanks but the original
> never
> reached me.
>
>
>> I've seen similar errors before. Some windows headers define the
>> macros 'min' and 'max', which obviously interfere with the functions
>> std::min and std::max - you get something like std::((a < b)? a : b).
>> You could add something like '#ifdef min #undef min #endif' to the top
>> of Envelope.h. I'm not sure why it only happens in Release mode though.
>> I haven't added this in my patch though, I haven't tried building on
>> Windows so I don't really know whether this will solve your issue or
>> just create other problems elsewhere.
>
> Thanks, I tried that. It doesn't seem to have helped (line number in
> Envelope.h
> is four higher because of what I added):
>
> 6>PCMAliasBlockFile.cpp
> 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' :
> illegal token on right side of '::'
> 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error
> : '::'
> 6>ODPCMAliasBlockFile.cpp
> 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' :
> illegal token on right side of '::'
> 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error
> : '::'

Gale, it did help, you now have 4 error messages instead of 8.  See my
previous message on this thread (which you won't have seen when you
wrote this).  I know that you don't write code and can't fill in the
gaps from what is said, and that's ok.

> The suggested change to Envelope.h also caused two new errors:
>
> 6>TimeTrack.cpp
> 6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMinValue' : is not a
> member of 'TimeTrack'
> 6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of
> 'TimeTrack'
> 6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMaxValue' : is not a
> member of 'TimeTrack'
> 6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of
> 'TimeTrack'

I think I just committed a fix for this.  It may have been an untested
commit, and I can see how that could have happened.

TTFN
Martyn

> Gale
>
>
>
>
> --
> View this message in context: http://audacity.238276.n2.nabble.com/TimeTracks-was-Re-audacity-r12077-committed-commit-a-large-patch-by-Maarten-Baert-tp7557054p7557081.html
> Sent from the audacity-devel mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_123012
> _______________________________________________
> audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Maarten Baert
In reply to this post by MartynShaw
On 31/12/12 00:55, Martyn Shaw wrote:
> but I note that in Envelope.h it does not make a difference if
> #include <algorithm> is in or out, implying to me that the declaration
> of algorithm is happening somewhere else.
Yes, but if you remove it, it will fail to build on Mac in Debug mode
according to Paul Livesey.

> Also I note that std::max(...) is in use in several other places in
> the Audacity code, without this problem. The only place that I see the
> problem is in Envelope.h and that is also the only .h file in which
> std::max(...) is used. Is that a coincidence, or a clue to how to make
> the code more cross-platform?
It only causes a problem when included from specific source files:
PCMAliasBlockFile.cpp and ODPCMAliasBlockFile.cpp. These are two of the
few files that include <windows.h> directly, rather than including
wxWidgets headers. I assume these are simply the only files where
Envelope.h and windows.h are included at the same time. I don't quite
understand why the BlockFile-related code even has to include
<windows.h> since they don't use any windows-specific functions. Would
removing those break anything?

Alternatively, moving the definition of ClampValue from Envelope.h to
Envelope.cpp would also solve this problem, as long as Envelope.cpp
doesn't include <windows.h>.

Maarten Baert

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Gale
Administrator
In reply to this post by MartynShaw

| From Martyn Shaw <[hidden email]>
| Mon, 31 Dec 2012 00:17:20 +0000
| Subject: [Audacity-devel] TimeTracks

> overlapping in the writing/posting...
>
> On 30/12/2012 23:52, Gale (Audacity Team) wrote:
> >> "Maarten Baert" wrote:
> >>> On 29/12/12 23:30, Gale Andrews wrote:
> >>> Trying what is committed now (unmodified HEAD) I get the same
> >>> errors building Unicode Release on Windows that I told you about
> >>> when trying V1 of patch-envelope-range (which built OK on Unicode
> >>> Debug):
> >>>
> >>> 26>PCMAliasBlockFile.cpp
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax
> >>> error : '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>> 26>ODPCMAliasBlockFile.cpp
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax
> >>> error : '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' :
> >>> illegal token on right side of '::'
> >>>
> >>> At least, I assume this patch is the cause.
> >>>
> >>> Windows 7 x64, WxWidgets 2.8.12.
> >> I already replied to that (off-list), did you miss it?
> > I finally found a forwarded copy in GMail Trash, thanks but the original
> > never
> > reached me.
> >
> >
> >> I've seen similar errors before. Some windows headers define the
> >> macros 'min' and 'max', which obviously interfere with the functions
> >> std::min and std::max - you get something like std::((a < b)? a : b).
> >> You could add something like '#ifdef min #undef min #endif' to the top
> >> of Envelope.h. I'm not sure why it only happens in Release mode though.
> >> I haven't added this in my patch though, I haven't tried building on
> >> Windows so I don't really know whether this will solve your issue or
> >> just create other problems elsewhere.
> >
> > Thanks, I tried that. It doesn't seem to have helped (line number in
> > Envelope.h
> > is four higher because of what I added):
> >
> > 6>PCMAliasBlockFile.cpp
> > 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' :
> > illegal token on right side of '::'
> > 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error
> > : '::'
> > 6>ODPCMAliasBlockFile.cpp
> > 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2589: '(' :
> > illegal token on right side of '::'
> > 6>c:\audacity svn\src\widgets\../Envelope.h(109) : error C2059: syntax error
> > : '::'
>
> Gale, it did help, you now have 4 error messages instead of 8.  See my
> previous message on this thread (which you won't have seen when you
> wrote this).  I know that you don't write code and can't fill in the
> gaps from what is said, and that's ok.

OK, I've got it, I think :=). Undefining min fixed half of the
identical-looking errors.

See below.


> Sun, 30 Dec 2012 23:55:17 +0000
> adding the rather ugly:
>
> #ifdef min
> #undef min
> #endif
> #ifdef max
> #undef max
> #endif
>
> before
>     double ClampValue(double value) { ...
>
> does enable me to compile Release here

I can now build Unicode Release on Windows 7 x64 with that change,
thanks. Unicode Debug builds OK with that change too.


> > The suggested change to Envelope.h also caused two new errors:
> >
> > 6>TimeTrack.cpp
> > 6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMinValue' : is not a
> > member of 'TimeTrack'
> > 6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of
> > 'TimeTrack'
> > 6>..\..\..\src\TimeTrack.cpp(70) : error C2039: 'GetMaxValue' : is not a
> > member of 'TimeTrack'
> > 6>        c:\audacity svn\src\TimeTrack.h(25) : see declaration of
> > 'TimeTrack'
>
> I think I just committed a fix for this.  It may have been an untested
> commit, and I can see how that could have happened.

Also confirmed fixed on Windows 7 Unicode Release, though
I later found those errors were happening anyway in HEAD
without changing Envelope.h.

Confirmed I can now undo a "Remove Time Track" and still have
working points > 200.



Thanks



Gale




------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Richard Ash (audacity-help)
In reply to this post by Maarten Baert
On Sat, 29 Dec 2012 18:19:54 +0100
Maarten Baert <[hidden email]> wrote:

> On 29/12/12 17:35, Richard Ash wrote:
> > Is this the right range? Shouldn't the range of the new track be
> > copied from the original, in case the source track has a wider
> > range (which would be clipped by the paste into the narrower range
> > track)? On top of commits including your patch I'm suggesting the
> > attached.
> The range of the envelope is currently fixed at the maximum allowed
> range of the time track - it doesn't change when you change the range
> of the time track because that would clip the results (which isn't
> what zooming should do of course). So both would have the same
> effect, but I agree that your version is better (it just makes more
> sense considering the envelope is just a copy of an existing
> envelope).

OK, I got very confused by the difference between SetRange on the
Time Track (as done through the UI command to Set Range ...) and
SetRange on the envelope which is a member of the TimeTrack:: class. I
think I've now made sense of this, and put some comments in. Really
this wouldn't be necessary (and rather clearer) if Envelope:: and
Ruler:: had copy-constructors.

I hope I've now got my editor to do indentation correctly!

Richard

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Richard Ash (audacity-help)
In reply to this post by Maarten Baert
On Mon, 31 Dec 2012 02:29:16 +0100
Maarten Baert <[hidden email]> wrote:

> On 31/12/12 00:55, Martyn Shaw wrote:
> > Also I note that std::max(...) is in use in several other places in
> > the Audacity code, without this problem. The only place that I see
> > the problem is in Envelope.h and that is also the only .h file in
> > which std::max(...) is used. Is that a coincidence, or a clue to
> > how to make the code more cross-platform?
> It only causes a problem when included from specific source files:
> PCMAliasBlockFile.cpp and ODPCMAliasBlockFile.cpp. These are two of
> the few files that include <windows.h> directly, rather than
> including wxWidgets headers. I assume these are simply the only files
> where Envelope.h and windows.h are included at the same time. I don't
> quite understand why the BlockFile-related code even has to include
> <windows.h> since they don't use any windows-specific functions.
> Would removing those break anything?

I'd very much like to loose all the #includes of windows.h except where
the code is actually platform-dependent. I agree I can see no reason
why it is needed in any of the blockfile code. It seems to have been
added by Vaughan in 2008 for the switch to DLL (rather than static)
wxWidgets, although I can't see why, as most of the commit (r7435) is
adding precompilation header includes (which are all wx).

Could someone on windows try removing all of them and see what breaks?
The only ones I image to be legitimate are VSTEffect.cpp /
FileNames.cpp / PlatformCompatibility.cpp which all encapsulate
platform differences. The rest are:
src/blockfile/ODPCMAliasBlockFile.cpp:   #include <windows.h>
src/blockfile/ODDecodeBlockFile.cpp:   #include <windows.h>
src/blockfile/PCMAliasBlockFile.cpp:   #include <windows.h>
src/blockfile/SimpleBlockFile.cpp:   #include <windows.h>
src/xml/XMLTagHandler.cpp:   #include <windows.h>

Richard

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

MartynShaw


On 31/12/2012 13:29, Richard Ash wrote:

> On Mon, 31 Dec 2012 02:29:16 +0100
> Maarten Baert <[hidden email]> wrote:
>
>> On 31/12/12 00:55, Martyn Shaw wrote:
>>> Also I note that std::max(...) is in use in several other places in
>>> the Audacity code, without this problem. The only place that I see
>>> the problem is in Envelope.h and that is also the only .h file in
>>> which std::max(...) is used. Is that a coincidence, or a clue to
>>> how to make the code more cross-platform?
>> It only causes a problem when included from specific source files:
>> PCMAliasBlockFile.cpp and ODPCMAliasBlockFile.cpp. These are two of
>> the few files that include <windows.h> directly, rather than
>> including wxWidgets headers. I assume these are simply the only files
>> where Envelope.h and windows.h are included at the same time. I don't
>> quite understand why the BlockFile-related code even has to include
>> <windows.h> since they don't use any windows-specific functions.
>> Would removing those break anything?
>
> I'd very much like to loose all the #includes of windows.h except where
> the code is actually platform-dependent. I agree I can see no reason
> why it is needed in any of the blockfile code. It seems to have been
> added by Vaughan in 2008 for the switch to DLL (rather than static)
> wxWidgets, although I can't see why, as most of the commit (r7435) is
> adding precompilation header includes (which are all wx).
>
> Could someone on windows try removing all of them and see what breaks?
> The only ones I image to be legitimate are VSTEffect.cpp /
> FileNames.cpp / PlatformCompatibility.cpp which all encapsulate
> platform differences. The rest are:
> src/blockfile/ODPCMAliasBlockFile.cpp:   #include <windows.h>
> src/blockfile/ODDecodeBlockFile.cpp:   #include <windows.h>
> src/blockfile/PCMAliasBlockFile.cpp:   #include <windows.h>
> src/blockfile/SimpleBlockFile.cpp:   #include <windows.h>
> src/xml/XMLTagHandler.cpp:   #include <windows.h>

OK, I tried removing all the windows.h includes.  The only ones that
give compile errors were:
6>XMLTagHandler.cpp
6>..\..\..\src\xml\XMLTagHandler.cpp(44) : error C2065: 'MAX_PATH' :
undeclared identifier
6>..\..\..\src\xml\XMLTagHandler.cpp(56) : error C2065: 'MAX_PATH' :
undeclared identifier
6>..\..\..\src\xml\XMLTagHandler.cpp(84) : error C2065: 'MAX_PATH' :
undeclared identifier
6>..\..\..\src\xml\XMLTagHandler.cpp(103) : error C2065: 'MAX_PATH' :
undeclared identifier

6>FileNames.cpp
6>..\..\..\src\FileNames.cpp(241) : error C2065: 'WINAPI' : undeclared
identifier
6>..\..\..\src\FileNames.cpp(241) : error C2065: 'getmodulehandleex' :
undeclared identifier
6>..\..\..\src\FileNames.cpp(241) : error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
6>..\..\..\src\FileNames.cpp(241) : fatal error C1903: unable to
recover from previous error(s); stopping compilation

so I put those 2 back in and it all compiles and runs on Release and
Debug, and without any problems in Envelope.h.  Shall we remove them
from the code?

TTFN
Martyn

> Richard
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Richard Ash (audacity-help)
On Mon, 31 Dec 2012 19:58:20 +0000
Martyn Shaw <[hidden email]> wrote:
> On 31/12/2012 13:29, Richard Ash wrote:
> > On Mon, 31 Dec 2012 02:29:16 +0100
> > Could someone on windows try removing all of them and see what
> > breaks?
> OK, I tried removing all the windows.h includes.  The only ones that
> give compile errors were:
> XMLTagHandler.cpp
> ..\..\..\src\xml\XMLTagHandler.cpp(44) : error C2065: 'MAX_PATH' :
> undeclared identifier
[...]
>
> FileNames.cpp
> ..\..\..\src\FileNames.cpp(241) : error C2065: 'WINAPI' :
> undeclared
> identifier
>
> so I put those 2 back in and it all compiles and runs on Release and
> Debug, and without any problems in Envelope.h.  Shall we remove them
> from the code?
Yes please. FileNames must be part of the portability stuff so use is
legitimate, and I can't be bothered abstracting the concept of maximum
path length from the XML handler, so it may as well stay. At least we
loose the rest and that should solve the compile errors.

Richard

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

MartynShaw
Done
Martyn

On 31/12/2012 20:52, Richard Ash wrote:

> On Mon, 31 Dec 2012 19:58:20 +0000
> Martyn Shaw <[hidden email]> wrote:
>> On 31/12/2012 13:29, Richard Ash wrote:
>>> On Mon, 31 Dec 2012 02:29:16 +0100
>>> Could someone on windows try removing all of them and see what
>>> breaks?
>> OK, I tried removing all the windows.h includes.  The only ones that
>> give compile errors were:
>> XMLTagHandler.cpp
>> ..\..\..\src\xml\XMLTagHandler.cpp(44) : error C2065: 'MAX_PATH' :
>> undeclared identifier
> [...]
>>
>> FileNames.cpp
>> ..\..\..\src\FileNames.cpp(241) : error C2065: 'WINAPI' :
>> undeclared
>> identifier
>>
>> so I put those 2 back in and it all compiles and runs on Release and
>> Debug, and without any problems in Envelope.h.  Shall we remove them
>> from the code?
> Yes please. FileNames must be part of the portability stuff so use is
> legitimate, and I can't be bothered abstracting the concept of maximum
> path length from the XML handler, so it may as well stay. At least we
> loose the rest and that should solve the compile errors.
>
> Richard
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TimeTracks

Leland Lucius-2
In reply to this post by Maarten Baert
On 12/29/2012 6:05 PM, Maarten Baert wrote:

> On 29/12/12 23:30, Gale Andrews wrote:
>> Maarten,
>>
>> Trying what is committed now (unmodified HEAD) I get the same
>> errors building Unicode Release on Windows that I told you about
>> when trying V1 of patch-envelope-range (which built OK on Unicode
>> Debug):
>>
>> 26>PCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>ODPCMAliasBlockFile.cpp
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2059: syntax error : '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>> 26>c:\audacity svn\src\widgets\../Envelope.h(105) : error C2589: '(' : illegal token on right side of '::'
>>
>> At least, I assume this patch is the cause.
>>
>> Windows 7 x64, WxWidgets 2.8.12.
> I already replied to that (off-list), did you miss it?
>> I've seen similar errors before. Some windows headers define the
>> macros 'min' and 'max', which obviously interfere with the functions
>> std::min and std::max - you get something like std::((a < b)? a : b).
>> You could add something like '#ifdef min #undef min #endif' to the top
>> of Envelope.h. I'm not sure why it only happens in Release mode though.
> I haven't added this in my patch though, I haven't tried building on
> Windows so I don't really know whether this will solve your issue or
> just create other problems elsewhere.
>
May I suggest using wxMax and wxMin instead?  They are defined in
wx/utils.h.

Leland


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
12
Loading...