Re: [Audacity-devel] TimeTracks
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Richard A. <ri...@au...> - 2012-12-31 13:30:02
|
On Mon, 31 Dec 2012 02:29:16 +0100 Maarten Baert <maa...@ho...> 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 |