Re: [Audacity-devel] TimeTracks
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Maarten B. <maa...@ho...> - 2012-12-31 01:29:24
|
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 |