From: <sag...@us...> - 2014-07-03 21:57:03
|
Revision: 4183 http://sourceforge.net/p/modplug/code/4183 Author: saga-games Date: 2014-07-03 21:56:48 +0000 (Thu, 03 Jul 2014) Log Message: ----------- [Fix] Glissando in semitones mode didn't take finetune into account. [Fix] Pattern tab: When the main tracker window was not maximized, the note properties would wouldn't pop up at the center of the window. Modified Paths: -------------- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-07-01 00:31:16 UTC (rev 4182) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-07-03 21:56:48 UTC (rev 4183) @@ -652,8 +652,8 @@ } -bool CEditCommand::ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor, CWnd *parent) -//-------------------------------------------------------------------------------------------- +bool CEditCommand::ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor) +//------------------------------------------------------------------------------ { editPos.pattern = pat; const ROWINDEX row = editPos.row = cursor.GetRow(); @@ -703,7 +703,8 @@ SetWindowText(s); SetParent(CMainFrame::GetMainFrame()); - CenterWindow(parent); + // Note: Centering against a child window seems to be buggy. + CenterWindow(CMainFrame::GetMainFrame()); ShowWindow(SW_RESTORE); return true; Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.h =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2014-07-01 00:31:16 UTC (rev 4182) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2014-07-03 21:56:48 UTC (rev 4183) @@ -134,7 +134,7 @@ CEditCommand(CSoundFile &sndFile); public: - bool ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor, CWnd *parent); + bool ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor); protected: void InitAll() { InitNote(); InitVolume(); InitEffect(); } Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-07-01 00:31:16 UTC (rev 4182) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-07-03 21:56:48 UTC (rev 4183) @@ -643,7 +643,7 @@ } if (m_pEditWnd) { - m_pEditWnd->ShowEditWindow(m_nPattern, m_Cursor, this); + m_pEditWnd->ShowEditWindow(m_nPattern, m_Cursor); return true; } return false; Modified: trunk/OpenMPT/soundlib/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2014-07-01 00:31:16 UTC (rev 4182) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2014-07-03 21:56:48 UTC (rev 4183) @@ -1201,15 +1201,15 @@ } pChn->m_CalculateFreq = true; pChn->m_ReCalculateFreqOnFirstTick = true; - } - else + } else { - //IT playback compatibility 01 & 02 if(IsCompatibleMode(TRK_IMPULSETRACKER)) { + //IT playback compatibility 01 & 02 + // Pattern delay restarts tick counting. Not quite correct yet! const UINT tick = m_PlayState.m_nTickCount % (m_PlayState.m_nMusicSpeed + m_PlayState.m_nFrameDelay); - if(pChn->nArpeggio >> 4 != 0 || (pChn->nArpeggio & 0x0F) != 0) + if(pChn->nArpeggio != 0) { switch(tick % 3) { @@ -1217,9 +1217,7 @@ case 2: period = Util::Round<int>(period / TwoToPowerXOver12(pChn->nArpeggio & 0x0F)); break; } } - } - // FastTracker 2: Swedish tracker logic (TM) arpeggio - else if(IsCompatibleMode(TRK_FASTTRACKER2)) + } else if(IsCompatibleMode(TRK_FASTTRACKER2)) { uint8 note = pChn->nNote; int arpPos = 0; @@ -1245,7 +1243,6 @@ note = 108 + NOTE_MIN; // FT2's note limit period = GetPeriodFromNote(note, pChn->nFineTune, pChn->nC5Speed); - } // Other trackers else @@ -1832,7 +1829,15 @@ { // Only recompute this whole thing in case the base period has changed. pChn->cachedPeriod = period; - pChn->glissandoPeriod = GetPeriodFromNote(GetNoteFromPeriod(period), pChn->nFineTune, pChn->nC5Speed); + for(uint32 i = NOTE_MIN; i < NOTE_MAX; i++) + { + int32 n = GetPeriodFromNote(i, pChn->nFineTune, pChn->nC5Speed); + if(n > 0 && n <= period) + { + pChn->glissandoPeriod = n; + break; + } + } } period = pChn->glissandoPeriod; } @@ -2274,23 +2279,23 @@ } // calculate ramping step - long step = 0; + int32 step = 0; if (m_PlayState.m_nSamplesToGlobalVolRampDest > 0) { // Still some ramping left to do. - long highResGlobalVolumeDestination = static_cast<long>(m_PlayState.m_nGlobalVolumeDestination) << VOLUMERAMPPRECISION; + int32 highResGlobalVolumeDestination = static_cast<int32>(m_PlayState.m_nGlobalVolumeDestination) << VOLUMERAMPPRECISION; const long delta = highResGlobalVolumeDestination - m_PlayState.m_lHighResRampingGlobalVolume; step = delta / static_cast<long>(m_PlayState.m_nSamplesToGlobalVolRampDest); // Define max step size as some factor of user defined ramping value: the lower the value, the more likely the click. // If step is too big (might cause click), extend ramp length. - UINT maxStep = MAX(50, (10000 / (m_PlayState.m_nGlobalVolumeRampAmount + 1))); - while(static_cast<UINT>(abs(step)) > maxStep) + int32 maxStep = std::max(50, (10000 / (m_PlayState.m_nGlobalVolumeRampAmount + 1))); + while(abs(step) > maxStep) { m_PlayState.m_nSamplesToGlobalVolRampDest += m_PlayState.m_nGlobalVolumeRampAmount; - step = delta / static_cast<long>(m_PlayState.m_nSamplesToGlobalVolRampDest); + step = delta / static_cast<int32>(m_PlayState.m_nSamplesToGlobalVolRampDest); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-07-09 10:22:36
|
Revision: 4186 http://sourceforge.net/p/modplug/code/4186 Author: manxorist Date: 2014-07-09 10:22:22 +0000 (Wed, 09 Jul 2014) Log Message: ----------- [Doc] libopenmpt: Clarify optional dependencies and update README.md . Modified Paths: -------------- trunk/OpenMPT/README.md trunk/OpenMPT/libopenmpt/dox/quickstart.md Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-07-06 15:57:22 UTC (rev 4185) +++ trunk/OpenMPT/README.md 2014-07-09 10:22:22 UTC (rev 4186) @@ -110,14 +110,20 @@ For sound output in openmpt123, PortAudio or SDL is required. openmpt123 can optionally use libflac, libwavpack and libsndfile to render PCM files to disk. - When using gcc, you should simply do: + When using gcc, run: - make + make CONFIG=gcc When using clang, it is recommended to do: make CONFIG=clang + Otherwise, simply run + + make + + which will try to guess the compiler based on your operating system. + The `Makefile` supports some customizations. You might want to read the top which should get you some possible make settings, like e.g. `make DYNLINK=0` or similar. Cross compiling or different compiler would Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-07-06 15:57:22 UTC (rev 4185) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-07-09 10:22:22 UTC (rev 4186) @@ -9,12 +9,12 @@ - **GNU make** - **gcc >= 4.4** or **clang >= 3.0** - **pkg-config** + 2. *Optional*: + - **zlib** - **portaudio-v19** - - **zlib** - 2. *Optional*: + - **libSDL == 1.2.x** - **doxygen >= 1.8** - **help2man** - - **libSDL** - **libFLAC** - **libsndfile** - **WavPack** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-07-19 16:46:44
|
Revision: 4187 http://sourceforge.net/p/modplug/code/4187 Author: saga-games Date: 2014-07-19 16:46:30 +0000 (Sat, 19 Jul 2014) Log Message: ----------- [Imp] Pattern tab: Greatly improve syncing speed of small chip samples [Mod] OpenMPT: Version is now 1.23.04.05 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-07-09 10:22:22 UTC (rev 4186) +++ trunk/OpenMPT/common/versionNumber.h 2014-07-19 16:46:30 UTC (rev 4187) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 04 +#define VER_MINORMINOR 05 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-07-09 10:22:22 UTC (rev 4186) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-07-19 16:46:30 UTC (rev 4187) @@ -739,9 +739,15 @@ stopNote = true; } else { + const SmpLength loopLength = pChn->nLoopEnd - pChn->nLoopStart; + if(pChn->nPos >= pChn->nLoopEnd + loopLength) + { + const SmpLength overshoot = pChn->nPos - pChn->nLoopEnd; + pChn->nPos -= (overshoot / loopLength) * loopLength; + } while(pChn->nPos >= pChn->nLoopEnd) { - pChn->nPos -= (pChn->nLoopEnd - pChn->nLoopStart); + pChn->nPos -= loopLength; } } } else if(pChn->nPos >= pChn->nLength) @@ -4916,7 +4922,7 @@ return 6*12+36; } else { - for (UINT i=1; i<NOTE_MAX; i++) + for (UINT i=NOTE_MIN; i<NOTE_MAX; i++) { LONG n = GetPeriodFromNote(i, 0, 0); if ((n > 0) && (n <= (LONG)period)) return i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-07-30 08:27:16
|
Revision: 4192 http://sourceforge.net/p/modplug/code/4192 Author: manxorist Date: 2014-07-30 08:27:08 +0000 (Wed, 30 Jul 2014) Log Message: ----------- [Doc] build: Document emscripten support. [Doc] libopenmpt: Fix typo. Modified Paths: -------------- trunk/OpenMPT/README.md trunk/OpenMPT/build/android_ndk/README.AndroidNDK.txt trunk/OpenMPT/libopenmpt/dox/changelog.md Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-07-26 09:12:19 UTC (rev 4191) +++ trunk/OpenMPT/README.md 2014-07-30 08:27:08 UTC (rev 4192) @@ -124,6 +124,18 @@ which will try to guess the compiler based on your operating system. + - emscripten (on Unix-like systems): + + libopenmpt has been tested and verified to work with emscripten 1.21 or + later (earlier versions might or might not work). Run: + + make CONFIG=emscripten + + Running the test suite on the command line is also supported by using + node.js. Version 0.10.25 or greater has been tested. Earlier versions + might or might not work. Depending on how your distribution calls the + node.js you might have to edit `build/make/Makefile.config.emscripten`. + The `Makefile` supports some customizations. You might want to read the top which should get you some possible make settings, like e.g. `make DYNLINK=0` or similar. Cross compiling or different compiler would Modified: trunk/OpenMPT/build/android_ndk/README.AndroidNDK.txt =================================================================== --- trunk/OpenMPT/build/android_ndk/README.AndroidNDK.txt 2014-07-26 09:12:19 UTC (rev 4191) +++ trunk/OpenMPT/build/android_ndk/README.AndroidNDK.txt 2014-07-30 08:27:08 UTC (rev 4192) @@ -1,7 +1,7 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -This is preliminarily documentation. -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +This is preliminary documentation. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1. Copy the whole libopenmpt source tree below your jni directory. 2. Copy build/android_ndk/* into the root of libopenmpt, i.e. also into the Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-07-26 09:12:19 UTC (rev 4191) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-07-30 08:27:08 UTC (rev 4192) @@ -9,6 +9,7 @@ * openmpt123: SDL is now also used by default if availble, in addition to PortAudio. + * Support for emscripten is no longer experimental. ### 2014-06-15 - libopenmpt 0.2-beta5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-07-30 12:47:40
|
Revision: 4194 http://sourceforge.net/p/modplug/code/4194 Author: manxorist Date: 2014-07-30 12:47:24 +0000 (Wed, 30 Jul 2014) Log Message: ----------- [Ref] Add const_unaligned_ptr_le<T> helper class which allows unaligned memory access on all architectures (in particular on architectures where native unaligned memery access crashes or returns wrong data). This is no permanent solution but good enough to make it work until the remaining old loaders get rewritten. [Fix] MED loader: Convert to const_unaligned_ptr_le. [Fix] MDL loader: Convert to const_unaligned_ptr_le. [Fix] MT2 loader: Convert to const_unaligned_ptr_le. Modified Paths: -------------- trunk/OpenMPT/common/Endianness.h trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/dox/todo.md trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp Modified: trunk/OpenMPT/common/Endianness.h =================================================================== --- trunk/OpenMPT/common/Endianness.h 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/common/Endianness.h 2014-07-30 12:47:24 UTC (rev 4194) @@ -10,6 +10,7 @@ #pragma once +#include <algorithm> #if MPT_COMPILER_MSVC #include <intrin.h> #endif @@ -303,4 +304,48 @@ STATIC_ASSERT(sizeof(IEEE754binary32LE) == 4); STATIC_ASSERT(sizeof(IEEE754binary32BE) == 4); + +// Small helper class to support unaligned memory access on all platforms. +// This is only used to make old module loaders work everywhere. +// Do not use in new code. +template <typename T> +class const_unaligned_ptr_le +{ +public: + typedef T value_type; +private: + const uint8 *mem; + value_type Read() const + { + uint8 bytes[sizeof(value_type)]; + std::memcpy(bytes, mem, sizeof(value_type)); + #if defined(MPT_PLATFORM_BIG_ENDIAN) + std::reverse(bytes, bytes + sizeof(value_type)); + #endif + value_type val = value_type(); + std::memcpy(&val, bytes, sizeof(value_type)); + return val; + } +public: + const_unaligned_ptr_le() : mem(nullptr) {} + const_unaligned_ptr_le(const const_unaligned_ptr_le<value_type> & other) : mem(other.mem) {} + const_unaligned_ptr_le & operator = (const const_unaligned_ptr_le<value_type> & other) { mem = other.mem; return *this; } + explicit const_unaligned_ptr_le(const uint8 *mem) : mem(mem) {} + explicit const_unaligned_ptr_le(const int8 *mem) : mem(reinterpret_cast<const uint8*>(mem)) {} + explicit const_unaligned_ptr_le(const char *mem) : mem(reinterpret_cast<const uint8*>(mem)) {} + explicit const_unaligned_ptr_le(const void *mem) : mem(reinterpret_cast<const uint8*>(mem)) {} + const_unaligned_ptr_le & operator += (std::size_t count) { mem += count * sizeof(value_type); return *this; } + const_unaligned_ptr_le & operator -= (std::size_t count) { mem -= count * sizeof(value_type); return *this; } + const_unaligned_ptr_le & operator ++ () { mem += sizeof(value_type); return *this; } + const_unaligned_ptr_le & operator -- () { mem -= sizeof(value_type); return *this; } + const_unaligned_ptr_le operator ++ (int) { const_unaligned_ptr_le<value_type> result = *this; ++result; return result; } + const_unaligned_ptr_le operator -- (int) { const_unaligned_ptr_le<value_type> result = *this; --result; return result; } + const_unaligned_ptr_le operator + (std::size_t count) const { const_unaligned_ptr_le<value_type> result = *this; result += count; return result; } + const_unaligned_ptr_le operator - (std::size_t count) const { const_unaligned_ptr_le<value_type> result = *this; result -= count; return result; } + const value_type operator * () const { return Read(); } + const value_type operator [] (std::size_t i) const { return *((*this) + i); } + operator bool () const { return mem != nullptr; } +}; + + OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-07-30 12:47:24 UTC (rev 4194) @@ -11,6 +11,9 @@ PortAudio. * Support for emscripten is no longer experimental. + * [Bug] Fix all known crashes on platforms that do not support unaligned + memory access. + ### 2014-06-15 - libopenmpt 0.2-beta5 * Add unmo3 support for non-Windows builds. Modified: trunk/OpenMPT/libopenmpt/dox/todo.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/todo.md 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/libopenmpt/dox/todo.md 2014-07-30 12:47:24 UTC (rev 4194) @@ -12,8 +12,6 @@ Incomplete list of stuff that needs work / known bugs: * Complete the API documentation. - * There are most probably still problems on platforms that do not support - unaligned pointer access. * Test on more obscure platforms. * Build system, especially building shared libraries, needs work on Mac OS X and on probably all other systems that do not use the GNU linker. Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mdl.cpp 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/soundlib/Load_mdl.cpp 2014-07-30 12:47:24 UTC (rev 4194) @@ -208,13 +208,13 @@ //-------------------------------------------------------------------------------------------------------- { ModCommand cmd, *m = pat; - UINT len = *((WORD *)lpTracks); + UINT len = *(const_unaligned_ptr_le<WORD>(lpTracks)); UINT pos = 0, row = 0, i; lpTracks += 2; for (UINT ntrk=1; ntrk<nTrack; ntrk++) { lpTracks += len; - len = *((WORD *)lpTracks); + len = *(const_unaligned_ptr_le<WORD>(lpTracks)); lpTracks += 2; } cmd.note = cmd.instr = 0; @@ -324,8 +324,8 @@ while (dwMemPos+6 < dwMemLength) { - block = *((WORD *)(lpStream+dwMemPos)); - blocklen = *((DWORD *)(lpStream+dwMemPos+2)); + block = *(const_unaligned_ptr_le<WORD>(lpStream+dwMemPos)); + blocklen = *(const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos+2)); dwMemPos += 6; if (blocklen > dwMemLength - dwMemPos) { @@ -384,7 +384,7 @@ for (i=0; i<npatterns; i++) { - const WORD *pdata; + const_unaligned_ptr_le<WORD> pdata; UINT ch; if (dwPos+18 >= dwMemLength) break; @@ -395,11 +395,11 @@ patternLength[i] = pmpd->lastrow + 1; if (m_nChannels < pmpd->channels) m_nChannels = pmpd->channels; dwPos += 18 + 2*pmpd->channels; - pdata = pmpd->data; + pdata = const_unaligned_ptr_le<WORD>(reinterpret_cast<const uint8*>(pmpd->data)); ch = pmpd->channels; } else { - pdata = (const WORD *)(lpStream + dwPos); + pdata = const_unaligned_ptr_le<WORD>(lpStream + dwPos); //Patterns[i].Resize(64, false); if (m_nChannels < 32) m_nChannels = 32; dwPos += 2*32; @@ -417,7 +417,7 @@ Log("track data: %d bytes\n", blocklen); #endif if (dwTrackPos) break; - ntracks = *((WORD *)(lpStream+dwMemPos)); + ntracks = *(const_unaligned_ptr_le<WORD>(lpStream+dwMemPos)); dwTrackPos = dwMemPos+2; break; // II: Instruments @@ -621,7 +621,7 @@ dwPos += sampleIO.ReadSample(sample, chunk); } else { - DWORD dwLen = *((DWORD *)(lpStream+dwPos)); + DWORD dwLen = *(const_unaligned_ptr_le<DWORD>(lpStream+dwPos)); dwPos += 4; if ( (dwLen <= dwMemLength) && (dwPos <= dwMemLength - dwLen) && (dwLen > 4) ) { Modified: trunk/OpenMPT/soundlib/Load_med.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/soundlib/Load_med.cpp 2014-07-30 12:47:24 UTC (rev 4194) @@ -510,7 +510,7 @@ const MMD2SONGHEADER *pmsh2; const MMD0EXP *pmex; DWORD dwBlockArr, dwSmplArr, dwExpData, wNumBlocks; - DWORD *pdwTable; + const_unaligned_ptr_le<DWORD> pdwTable; int8 version; UINT deftempo; int playtransp = 0; @@ -702,7 +702,7 @@ if ((playseqtable) && (playseqtable < dwMemLength) && (nplayseq*4 < dwMemLength - playseqtable)) { - pseq = BigEndian(((DWORD*)(lpStream+playseqtable))[nplayseq]); + pseq = BigEndian((const_unaligned_ptr_le<DWORD>(lpStream+playseqtable))[nplayseq]); } if ((pseq) && (pseq < dwMemLength - sizeof(MMD2PLAYSEQ))) { @@ -772,7 +772,7 @@ DWORD trackinfo_ofs = BigEndian(pmex->trackinfo_ofs); if ((trackinfo_ofs) && (trackinfo_ofs < dwMemLength) && (m_nChannels * 4u < dwMemLength - trackinfo_ofs)) { - DWORD *ptrktags = (DWORD *)(lpStream + trackinfo_ofs); + const_unaligned_ptr_le<DWORD> ptrktags = const_unaligned_ptr_le<DWORD>(lpStream + trackinfo_ofs); for (UINT i=0; i<m_nChannels; i++) { DWORD trknameofs = 0, trknamelen = 0; @@ -781,9 +781,9 @@ { while (trktagofs+8 < dwMemLength) { - DWORD ntag = BigEndian(*(DWORD *)(lpStream + trktagofs)); + DWORD ntag = BigEndian(*const_unaligned_ptr_le<DWORD>(lpStream + trktagofs)); if (ntag == MMDTAG_END) break; - DWORD tagdata = BigEndian(*(DWORD *)(lpStream + trktagofs + 4)); + DWORD tagdata = BigEndian(*const_unaligned_ptr_le<DWORD>(lpStream + trktagofs + 4)); switch(ntag) { case MMDTAG_TRK_NAMELEN: trknamelen = tagdata; break; @@ -801,7 +801,7 @@ } // Reading samples if (dwSmplArr > dwMemLength - 4*m_nSamples) return true; - pdwTable = (DWORD*)(lpStream + dwSmplArr); + pdwTable = const_unaligned_ptr_le<DWORD>(lpStream + dwSmplArr); for (UINT iSmp=0; iSmp<m_nSamples; iSmp++) if (pdwTable[iSmp]) { UINT dwPos = BigEndian(pdwTable[iSmp]); @@ -851,7 +851,7 @@ } if (wNumBlocks > MAX_PATTERNS) wNumBlocks = MAX_PATTERNS; if ((!dwBlockArr) || (dwBlockArr > dwMemLength - 4*wNumBlocks)) return true; - pdwTable = (DWORD*)(lpStream + dwBlockArr); + pdwTable = const_unaligned_ptr_le<DWORD>(lpStream + dwBlockArr); playtransp += (version == '3') ? 24 : 48; for (PATTERNINDEX iBlk=0; iBlk<wNumBlocks; iBlk++) { @@ -922,7 +922,7 @@ DWORD cmdexttable = BigEndian(pbi->cmdexttable); if (cmdexttable < dwMemLength - 4) { - cmdexttable = BigEndian(*(DWORD *)(lpStream + cmdexttable)); + cmdexttable = BigEndian(*const_unaligned_ptr_le<DWORD>(lpStream + cmdexttable)); if ((cmdexttable) && (cmdexttable <= dwMemLength - lines*tracks)) { pcmdext = (BYTE *)(lpStream + cmdexttable); Modified: trunk/OpenMPT/soundlib/Load_mt2.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mt2.cpp 2014-07-30 10:05:15 UTC (rev 4193) +++ trunk/OpenMPT/soundlib/Load_mt2.cpp 2014-07-30 12:47:24 UTC (rev 4194) @@ -266,7 +266,7 @@ mpt::String::Read<mpt::String::maybeNullTerminated>(songName, pfh->szSongName); dwMemPos = sizeof(MT2FILEHEADER); - nDrumDataLen = *(WORD *)(lpStream + dwMemPos); + nDrumDataLen = *const_unaligned_ptr_le<WORD>(lpStream + dwMemPos); dwDrumDataPos = dwMemPos + 2; if (nDrumDataLen >= 2) pdd = (MT2DRUMSDATA *)(lpStream+dwDrumDataPos); dwMemPos += 2 + nDrumDataLen; @@ -276,9 +276,9 @@ Log("Drum Data: %d bytes @%04X\n", nDrumDataLen, dwDrumDataPos); #endif if (dwMemPos >= dwMemLength-12) return true; - if (!*(DWORD *)(lpStream+dwMemPos)) dwMemPos += 4; - if (!*(DWORD *)(lpStream+dwMemPos)) dwMemPos += 4; - nExtraDataLen = *(DWORD *)(lpStream+dwMemPos); + if (!*const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos)) dwMemPos += 4; + if (!*const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos)) dwMemPos += 4; + nExtraDataLen = *const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos); dwExtraDataPos = dwMemPos + 4; dwMemPos += 4; #ifdef MT2DEBUG @@ -287,8 +287,8 @@ if (dwMemPos + nExtraDataLen >= dwMemLength) return true; while (dwMemPos+8 < dwExtraDataPos + nExtraDataLen) { - DWORD dwId = *(DWORD *)(lpStream+dwMemPos); - DWORD dwLen = *(DWORD *)(lpStream+dwMemPos+4); + DWORD dwId = *const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos); + DWORD dwLen = *const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos+4); dwMemPos += 8; if (dwMemPos + dwLen > dwMemLength) return true; #ifdef MT2DEBUG @@ -311,7 +311,7 @@ case MAGIC4LE('T','R','K','S'): if (dwLen >= 2) { - m_nSamplePreAmp = LittleEndianW(*(uint16 *)(lpStream+dwMemPos)) >> 9; + m_nSamplePreAmp = LittleEndianW(*const_unaligned_ptr_le<uint16>(lpStream+dwMemPos)) >> 9; dwMemPos += 2; } for(CHANNELINDEX c = 0; c < GetNumChannels(); c++) @@ -319,7 +319,7 @@ ChnSettings[c].Reset(); if(dwMemPos + 1030 < dwMemLength) { - ChnSettings[c].nVolume = LittleEndianW(*(uint16 *)(lpStream+dwMemPos)) >> 9; + ChnSettings[c].nVolume = LittleEndianW(*const_unaligned_ptr_le<uint16>(lpStream+dwMemPos)) >> 9; LimitMax(ChnSettings[c].nVolume, uint16(64)); dwMemPos += 1030; } @@ -423,7 +423,7 @@ for (UINT iDrm=0; iDrm<pdd->wDrumPatterns; iDrm++) { if (dwMemPos > dwMemLength-2) return true; - UINT nLines = *(WORD *)(lpStream+dwMemPos); + UINT nLines = *const_unaligned_ptr_le<WORD>(lpStream+dwMemPos); #ifdef MT2DEBUG if (nLines != 64) Log("Drum Pattern %d: %d Lines @%04X\n", iDrm, nLines, dwMemPos); #endif @@ -490,7 +490,7 @@ pIns->nDCT = (pmi->wNNA>>8) & 3; pIns->nDNA = (pmi->wNNA>>12) & 3; MT2ENVELOPE *pehdr[4]; - WORD *pedata[4]; + const_unaligned_ptr_le<WORD> pedata[4]; if (pfh->wVersion <= 0x201) { @@ -498,9 +498,9 @@ pehdr[0] = (MT2ENVELOPE *)(lpStream+dwEnvPos); pehdr[1] = (MT2ENVELOPE *)(lpStream+dwEnvPos+8); pehdr[2] = pehdr[3] = NULL; - pedata[0] = (WORD *)(lpStream+dwEnvPos+16); - pedata[1] = (WORD *)(lpStream+dwEnvPos+16+64); - pedata[2] = pedata[3] = NULL; + pedata[0] = const_unaligned_ptr_le<WORD>(lpStream+dwEnvPos+16); + pedata[1] = const_unaligned_ptr_le<WORD>(lpStream+dwEnvPos+16+64); + pedata[2] = pedata[3] = const_unaligned_ptr_le<WORD>(); } else { DWORD dwEnvPos = dwMemPos + sizeof(MT2INSTRUMENT); @@ -509,12 +509,12 @@ if (pmi->wEnvFlags1 & (1<<i)) { pehdr[i] = (MT2ENVELOPE *)(lpStream+dwEnvPos); - pedata[i] = (WORD *)pehdr[i]->EnvData; + pedata[i] = const_unaligned_ptr_le<WORD>(pehdr[i]->EnvData); dwEnvPos += sizeof(MT2ENVELOPE); } else { pehdr[i] = NULL; - pedata[i] = NULL; + pedata[i] = const_unaligned_ptr_le<WORD>(); } } } @@ -551,7 +551,7 @@ // Envelope data if (pedata[iEnv]) { - WORD *psrc = pedata[iEnv]; + const_unaligned_ptr_le<WORD> psrc = pedata[iEnv]; for (UINT i=0; i<16; i++) { pEnv->Ticks[i] = psrc[i*2]; @@ -672,7 +672,7 @@ } else if (dwMemPos+4 < dwMemLength) { - UINT nNameLen = *(DWORD *)(lpStream+dwMemPos); + UINT nNameLen = *const_unaligned_ptr_le<DWORD>(lpStream+dwMemPos); dwMemPos += nNameLen + 16; } if (dwMemPos+4 >= dwMemLength) break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-07-30 13:55:23
|
Revision: 4198 http://sourceforge.net/p/modplug/code/4198 Author: manxorist Date: 2014-07-30 13:55:15 +0000 (Wed, 30 Jul 2014) Log Message: ----------- [Doc] build: List emscripten as supported compiler. Modified Paths: -------------- trunk/OpenMPT/README.md trunk/OpenMPT/libopenmpt/dox/dependencies.md Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-07-30 13:37:39 UTC (rev 4197) +++ trunk/OpenMPT/README.md 2014-07-30 13:55:15 UTC (rev 4198) @@ -110,6 +110,7 @@ For sound output in openmpt123, PortAudio or SDL is required. openmpt123 can optionally use libflac, libwavpack and libsndfile to render PCM files to disk. + When using gcc, run: make CONFIG=gcc @@ -127,14 +128,17 @@ - emscripten (on Unix-like systems): libopenmpt has been tested and verified to work with emscripten 1.21 or - later (earlier versions might or might not work). Run: + later (earlier versions might or might not work). + Run: + make CONFIG=emscripten Running the test suite on the command line is also supported by using node.js. Version 0.10.25 or greater has been tested. Earlier versions might or might not work. Depending on how your distribution calls the - node.js you might have to edit `build/make/Makefile.config.emscripten`. + `node.js` binary, you might have to edit + `build/make/Makefile.config.emscripten`. The `Makefile` supports some customizations. You might want to read the top which should get you some possible make settings, like e.g. Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-07-30 13:37:39 UTC (rev 4197) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-07-30 13:55:15 UTC (rev 4198) @@ -13,6 +13,7 @@ * **GCC 4.4** or higher * **Clang 3.0** or higher * **MinGW-W64 4.6** or higher + * **emscripten 1.21** or higher * Required compilers to use libopenmpt: * Any **C89** compatible compiler should work with the C API as long as a C99 compatible **stdint.h** is available. * Any **C++03** compatible compiler should work with the C++ API. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-07-31 11:32:22
|
Revision: 4199 http://sourceforge.net/p/modplug/code/4199 Author: saga-games Date: 2014-07-31 11:32:15 +0000 (Thu, 31 Jul 2014) Log Message: ----------- [Fix] After loading a new keybinding file, effect keys were no longer working until the user switched to a module with different effect keys (tx stinkbug). [Mod] OpenMPT: Version is now 1.23.04.06 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/CommandSet.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-07-30 13:55:15 UTC (rev 4198) +++ trunk/OpenMPT/common/versionNumber.h 2014-07-31 11:32:15 UTC (rev 4199) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 05 +#define VER_MINORMINOR 06 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-07-30 13:55:15 UTC (rev 4198) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-07-31 11:32:15 UTC (rev 4199) @@ -1437,6 +1437,7 @@ //----------------------------------------- { // copy constructors should take care of complexity (I hope) + oldSpecs = nullptr; for (size_t cmd = 0; cmd < CountOf(commands); cmd++) commands[cmd] = source->commands[cmd]; } @@ -1509,6 +1510,7 @@ int commentStart; int l=0; int fileVersion = 0; + oldSpecs = nullptr; // After clearing the key set, need to fix effect letters bool fillExistingSet = commandSet != nullptr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-08-10 07:44:28
|
Revision: 4204 http://sourceforge.net/p/modplug/code/4204 Author: manxorist Date: 2014-08-10 07:44:19 +0000 (Sun, 10 Aug 2014) Log Message: ----------- [Ref] Fix some GCC -pedantic warnings. Modified Paths: -------------- trunk/OpenMPT/common/mptString.cpp trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp trunk/OpenMPT/soundlib/MixerInterface.h Modified: trunk/OpenMPT/common/mptString.cpp =================================================================== --- trunk/OpenMPT/common/mptString.cpp 2014-08-07 13:42:14 UTC (rev 4203) +++ trunk/OpenMPT/common/mptString.cpp 2014-08-10 07:44:19 UTC (rev 4204) @@ -938,9 +938,9 @@ outbuf[i] = 0; } #ifdef MPT_PLATFORM_BIG_ENDIAN - outbuf[sizeof(wchar_t)-1 - 1] = 0xff; outbuf[sizeof(wchar_t)-1 - 0] = 0xfd; + outbuf[sizeof(wchar_t)-1 - 1] = uint8(0xff); outbuf[sizeof(wchar_t)-1 - 0] = uint8(0xfd); #else - outbuf[1] = 0xff; outbuf[0] = 0xfd; + outbuf[1] = uint8(0xff); outbuf[0] = uint8(0xfd); #endif outbuf += sizeof(wchar_t); outbytesleft -= sizeof(wchar_t); @@ -1181,12 +1181,12 @@ #if defined(MPT_WITH_CHARSET_LOCALE) std::string ToString(const std::wstring & x) { return mpt::ToLocale(x); } -std::string ToString(const wchar_t * const & x) { return mpt::ToLocale(x); }; +std::string ToString(const wchar_t * const & x) { return mpt::ToLocale(x); } std::string ToString(const char & x) { return std::string(1, x); } std::string ToString(const wchar_t & x) { return mpt::ToLocale(std::wstring(1, x)); } #else std::string ToString(const std::wstring & x) { return mpt::To(mpt::CharsetUTF8, x); } -std::string ToString(const wchar_t * const & x) { return mpt::To(mpt::CharsetUTF8, x); }; +std::string ToString(const wchar_t * const & x) { return mpt::To(mpt::CharsetUTF8, x); } std::string ToString(const char & x) { return std::string(1, x); } std::string ToString(const wchar_t & x) { return mpt::To(mpt::CharsetUTF8, std::wstring(1, x)); } #endif Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp 2014-08-07 13:42:14 UTC (rev 4203) +++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp 2014-08-10 07:44:19 UTC (rev 4204) @@ -110,7 +110,7 @@ UINT CSoundFile::gnAGC = 0; UINT CSoundFile::gnVolumeRampSamples = 0; UINT CSoundFile::gnVUMeter = 0; -UINT CSoundFile::gnCPUUsage = 0;; +UINT CSoundFile::gnCPUUsage = 0; LPSNDMIXHOOKPROC CSoundFile::gpSndMixHook = 0; PMIXPLUGINCREATEPROC CSoundFile::gpMixPluginCreateProc = 0; Modified: trunk/OpenMPT/soundlib/MixerInterface.h =================================================================== --- trunk/OpenMPT/soundlib/MixerInterface.h 2014-08-07 13:42:14 UTC (rev 4203) +++ trunk/OpenMPT/soundlib/MixerInterface.h 2014-08-10 07:44:19 UTC (rev 4204) @@ -99,7 +99,7 @@ c.nPos += smpPos >> 16; c.nPosLo = smpPos & 0xFFFF; -}; +} // Type of the SampleLoop function above typedef void (*MixFuncInterface)(ModChannel &, const CResampler &, mixsample_t *, int); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-08-16 14:48:34
|
Revision: 4205 http://sourceforge.net/p/modplug/code/4205 Author: saga-games Date: 2014-08-16 14:48:20 +0000 (Sat, 16 Aug 2014) Log Message: ----------- [New] Plugin editor positions are now stored in module files [Mod] OpenMPT: Version is now 1.23.04.07 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/plugins/PlugInterface.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/common/versionNumber.h 2014-08-16 14:48:20 UTC (rev 4205) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 06 +#define VER_MINORMINOR 07 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-08-16 14:48:20 UTC (rev 4205) @@ -41,6 +41,7 @@ ON_WM_MENUSELECT() ON_WM_ACTIVATE() ON_WM_DROPFILES() + ON_WM_MOVE() ON_COMMAND(ID_EDIT_COPY, OnCopyParameters) ON_COMMAND(ID_EDIT_PASTE, OnPasteParameters) ON_COMMAND(ID_PRESET_LOAD, OnLoadPreset) @@ -950,6 +951,57 @@ return m_nLearnMacro; } + +void CAbstractVstEditor::OnMove(int, int) +//--------------------------------------- +{ + if(IsWindowVisible()) + { + StoreWindowPos(); + } +} + + +void CAbstractVstEditor::StoreWindowPos() +//--------------------------------------- +{ + if(m_hWnd) + { + // Translate screen position into percentage (to make it independent of the actual screen resolution) + CRect rect; + GetWindowRect(&rect); + const int cxScreen = GetSystemMetrics(SM_CXSCREEN), cyScreen = GetSystemMetrics(SM_CYSCREEN); + int32 editorX = Util::muldivr(rect.left, 1 << 30, cxScreen); + int32 editorY = Util::muldivr(rect.top, 1 << 30, cyScreen); + m_VstPlugin.SetEditorPos(editorX, editorY); + } +} + + +void CAbstractVstEditor::RestoreWindowPos() +//----------------------------------------- +{ + // Restore previous editor position + int32 editorX, editorY; + m_VstPlugin.GetEditorPos(editorX, editorY); + + if((editorX >= 0) && (editorY >= 0)) + { + // Translate percentage into screen position (to make it independent of the actual screen resolution) + const int cxScreen = GetSystemMetrics(SM_CXSCREEN), cyScreen = GetSystemMetrics(SM_CYSCREEN); + editorX = Util::muldivr(editorX, cxScreen, 1 << 30); + editorY = Util::muldivr(editorY, cyScreen, 1 << 30); + + if((editorX + 8 < cxScreen) && (editorY + 8 < cyScreen)) + { + SetWindowPos(NULL, editorX, editorY, 0, 0, + SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); + } + } + +} + + #endif // NO_VST Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-08-16 14:48:20 UTC (rev 4205) @@ -67,6 +67,7 @@ afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM); afx_msg void OnDropFiles(HDROP hDropInfo); + afx_msg void OnMove(int x, int y); //Overridden methods: virtual void OnOK() = 0; @@ -103,6 +104,9 @@ afx_msg void OnInitMenu(CMenu* pMenu); void PrepareToLearnMacro(UINT nID); + void StoreWindowPos(); + void RestoreWindowPos(); + }; //end rewbs.defaultPlugGUI Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-08-16 14:48:20 UTC (rev 4205) @@ -409,21 +409,8 @@ CreateControls(); - // Restore previous editor position - int editorX, editorY; - m_VstPlugin.GetEditorPos(editorX, editorY); - - if((editorX >= 0) && (editorY >= 0)) - { - int cxScreen = GetSystemMetrics(SM_CXSCREEN); - int cyScreen = GetSystemMetrics(SM_CYSCREEN); - if((editorX + 8 < cxScreen) && (editorY + 8 < cyScreen)) - { - SetWindowPos(NULL, editorX, editorY, 0,0, - SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE); - } - } - + RestoreWindowPos(); + ShowWindow(SW_SHOW); return true; @@ -454,13 +441,7 @@ void CDefaultVstEditor::DoClose() //------------------------------- { - if(m_hWnd) - { - CRect rect; - GetWindowRect(&rect); - m_VstPlugin.SetEditorPos(rect.left, rect.top); - } - + StoreWindowPos(); m_VstPlugin.Dispatch(effEditClose, 0, 0, NULL, 0); DestroyWindow(); Modified: trunk/OpenMPT/mptrack/VSTEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.cpp 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/VSTEditor.cpp 2014-08-16 14:48:20 UTC (rev 4205) @@ -84,20 +84,7 @@ SetSize(rect.right - rect.left, rect.bottom - rect.top); } - // Restore previous editor position - int editorX, editorY; - m_VstPlugin.GetEditorPos(editorX, editorY); - - if((editorX >= 0) && (editorY >= 0)) - { - int cxScreen = GetSystemMetrics(SM_CXSCREEN); - int cyScreen = GetSystemMetrics(SM_CYSCREEN); - if((editorX + 8 < cxScreen) && (editorY + 8 < cyScreen)) - { - SetWindowPos(NULL, editorX, editorY, 0, 0, - SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); - } - } + RestoreWindowPos(); SetTitle(); m_VstPlugin.Dispatch(effEditTop, 0,0, NULL, 0); @@ -135,12 +122,7 @@ void COwnerVstEditor::DoClose() //----------------------------- { - if(m_hWnd) - { - CRect rect; - GetWindowRect(&rect); - m_VstPlugin.SetEditorPos(rect.left, rect.top); - } + StoreWindowPos(); m_VstPlugin.Dispatch(effEditClose, 0, 0, NULL, 0); if(m_hWnd) { Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2014-08-16 14:48:20 UTC (rev 4205) @@ -666,7 +666,6 @@ m_pNext = nullptr; m_pMixStruct = &mixStruct; m_pEditor = nullptr; - m_nEditorX = m_nEditorY = -1; m_pProcessFP = nullptr; m_MixState.dwFlags = 0; @@ -976,7 +975,6 @@ if (minParam == 0 && maxParam == 0) { maxParam = m_Effect.numParams; - } LimitMax(maxParam, PlugParamIndex(m_Effect.numParams)); Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/mptrack/Vstplug.h 2014-08-16 14:48:20 UTC (rev 4205) @@ -171,7 +171,6 @@ size_t m_nRefCount; uint32 m_nSampleRate; SNDMIXPLUGINSTATE m_MixState; - int32 m_nEditorX, m_nEditorY; double lastBarStartPos; float m_fGain; @@ -227,8 +226,8 @@ PLUGINDEX GetSlot(); void UpdateMixStructPtr(SNDMIXPLUGIN *); - void SetEditorPos(int x, int y) { m_nEditorX = x; m_nEditorY = y; } - void GetEditorPos(int &x, int &y) const { x = m_nEditorX; y = m_nEditorY; } + void SetEditorPos(int32 x, int32 y) { m_pMixStruct->editorX= x; m_pMixStruct->editorY = y; } + void GetEditorPos(int32 &x, int32 &y) const { x = m_pMixStruct->editorX; y = m_pMixStruct->editorY; } void SetCurrentProgram(VstInt32 nIndex); PlugParamValue GetParameter(PlugParamIndex nIndex); @@ -345,6 +344,9 @@ bool IsBypassed() const { return false; } bool IsSongPlaying() const { return false; } + void SetEditorPos(int32, int32) { } + void GetEditorPos(int32 &x, int32 &y) const { x = y = int32_min; } + #endif // NO_VST }; Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2014-08-16 14:48:20 UTC (rev 4205) @@ -1708,8 +1708,9 @@ } // rewbs.modularPlugData - DWORD MPTxPlugDataSize = 4 + (sizeof(m_MixPlugins[i].fDryRatio)) + //4 for ID and size of dryRatio - 4 + (sizeof(m_MixPlugins[i].defaultProgram)); //rewbs.plugDefaultProgram + DWORD MPTxPlugDataSize = 4 + (sizeof(m_MixPlugins[i].fDryRatio)) + // 4 for ID and size of dryRatio + 4 + (sizeof(m_MixPlugins[i].defaultProgram)) + // rewbs.plugDefaultProgram + 4 + 3 * sizeof(int32); // Editor data // for each extra entity, add 4 for ID, plus size of entity, plus optionally 4 for size of entity. nPluginSize += MPTxPlugDataSize + 4; //+4 is for size itself: sizeof(DWORD) is 4 @@ -1734,19 +1735,34 @@ fwrite(&MPTxPlugDataSize, 1, 4, f); - //write ID for this xPlugData chunk: + // Dry/Wet ratio memcpy(id, "DWRT", 4); fwrite(id, 1, 4, f); - // DWRT chunk does not include a size, so better make sure we always write 4 bytes here. - STATIC_ASSERT(sizeof(float) == 4); - fwrite(&(m_MixPlugins[i].fDryRatio), 1, sizeof(float), f); + uint32 ratio = IEEE754binary32LE(m_MixPlugins[i].fDryRatio).GetInt32(); + fwrite(&ratio, 1, sizeof(uint32), f); + // Default program memcpy(id, "PROG", 4); fwrite(id, 1, 4, f); // PROG chunk does not include a size, so better make sure we always write 4 bytes here. STATIC_ASSERT(sizeof(m_MixPlugins[i].defaultProgram) == sizeof(int32)); - fwrite(&(m_MixPlugins[i].defaultProgram), 1, sizeof(int32), f); + int32 prog = m_MixPlugins[i].defaultProgram; + SwapBytesLE(prog); + fwrite(&prog, 1, sizeof(int32), f); + // Editor window parameters + memcpy(id, "EWND", 4); + fwrite(id, 1, 4, f); + uint32 size = 2 * sizeof(int32); + SwapBytesLE(size); + fwrite(&size, sizeof(uint32), 1, f); + int32 x = m_MixPlugins[i].editorX, y = m_MixPlugins[i].editorY; + SwapBytesLE(x); + SwapBytesLE(y); + fwrite(&x, sizeof(int32), 1, f); + fwrite(&y, sizeof(int32), 1, f); + + // Please, if you add any more chunks here, don't repeat history (see above) and *do* add a size field for your chunk, mmmkay? } nTotalSize += nPluginSize + 8; } @@ -1816,6 +1832,7 @@ chunk.ReadConvertEndianness(m_MixPlugins[plug].Info); mpt::String::SetNullTerminator(m_MixPlugins[plug].Info.szName); mpt::String::SetNullTerminator(m_MixPlugins[plug].Info.szLibraryName); + m_MixPlugins[plug].editorX = m_MixPlugins[plug].editorY = int32_min; //data for VST setchunk? size lies just after standard plugin data. const uint32 pluginDataChunkSize = chunk.ReadUint32LE(); @@ -1842,19 +1859,26 @@ { // do we recognize this chunk? modularData.ReadArray(code); - //rewbs.dryRatio //TODO: turn this into a switch statement like for modular instrument data if(!memcmp(code, "DWRT", 4)) { m_MixPlugins[plug].fDryRatio = modularData.ReadFloatLE(); } - //end rewbs.dryRatio - //rewbs.plugDefaultProgram else if(!memcmp(code, "PROG", 4)) { m_MixPlugins[plug].defaultProgram = modularData.ReadUint32LE(); } - //end rewbs.plugDefaultProgram + else if(!memcmp(code, "MCRO", 4)) + { + // Read plugin-specific macros + //modularData.ReadStructPartial(m_MixPlugins[plug].macros, modularData.ReadUint32LE()); + } + else if(!memcmp(code, "EWND", 4)) + { + FileReader editorChunk = modularData.ReadChunk(modularData.ReadUint32LE()); + m_MixPlugins[plug].editorX = editorChunk.ReadInt32LE(); + m_MixPlugins[plug].editorY = editorChunk.ReadInt32LE(); + } //else if.. (add extra attempts to recognize chunks here) else // otherwise move forward a byte. { @@ -1950,7 +1974,7 @@ void CSoundFile::WriteInstrumentPropertyForAllInstruments(uint32 code, int16 size, FILE* f, UINT nInstruments) const //------------------------------------------------------------------------------------------------------------------ { - fwrite(&code, 1, sizeof(uint32), f); //write code + fwrite(&code, 1, sizeof(uint32), f); //write code fwrite(&size, 1, sizeof(int16), f); //write size for(UINT nins=1; nins<=nInstruments; nins++) //for all instruments... { Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.h =================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-08-10 07:44:19 UTC (rev 4204) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-08-16 14:48:20 UTC (rev 4205) @@ -71,6 +71,8 @@ virtual bool isInstrument() = 0; virtual bool CanRecieveMidiEvents() = 0; virtual void SetDryRatio(UINT param) = 0; + virtual void SetEditorPos(int32 x, int32 y) = 0; + virtual void GetEditorPos(int32 &x, int32 &y) const = 0; }; @@ -159,6 +161,7 @@ SNDMIXPLUGININFO Info; float fDryRatio; VstInt32 defaultProgram; + int32 editorX, editorY; const char *GetName() const { return Info.szName; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-08-21 14:20:15
|
Revision: 4209 http://sourceforge.net/p/modplug/code/4209 Author: saga-games Date: 2014-08-21 14:20:01 +0000 (Thu, 21 Aug 2014) Log Message: ----------- [Mod] Merge "Note Off/Cut/Fade" and "Note Off/Cut/Fade (without instrument number)". It's a bad idea to attach instrument numbers to note-offs (especially in XM), and there's no real reason to do it anyway. [Mod] OpenMPT: Version is now 1.23.04.08 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/common/versionNumber.h 2014-08-21 14:20:01 UTC (rev 4209) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 07 +#define VER_MINORMINOR 08 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-08-21 14:20:01 UTC (rev 4209) @@ -65,8 +65,8 @@ //------------------------------------------------------- // Helper function for setting up commands -void CCommandSet::DefineKeyCommand(CommandID kc, UINT uid, CString message, enmKcVisibility visibility, enmKcDummy dummy) -//----------------------------------------------------------------------------------------------------------------------- +void CCommandSet::DefineKeyCommand(CommandID kc, UINT uid, const TCHAR *message, enmKcVisibility visibility, enmKcDummy dummy) +//---------------------------------------------------------------------------------------------------------------------------- { commands[kc].UID = uid; commands[kc].isHidden = (visibility == kcHidden); @@ -483,8 +483,8 @@ DefineKeyCommand(kcClearFieldITStyle, 1664, _T("Clear field (IT Style)")); DefineKeyCommand(kcClearFieldStepITStyle, 1665, _T("Clear field and step (IT Style)")); DefineKeyCommand(kcSetFXextension, 1666, _T("Parameter Extension Command")); - DefineKeyCommand(kcNoteCutOld, 1667, _T("Note Cut (without instrument number)")); - DefineKeyCommand(kcNoteOffOld, 1668, _T("Note Off (without instrument number)")); + DefineKeyCommand(kcNoteCutOld, 1667, _T("Note Cut"), kcHidden); // Legacy + DefineKeyCommand(kcNoteOffOld, 1668, _T("Note Off"), kcHidden); // Legacy DefineKeyCommand(kcViewAddPlugin, 1669, _T("View Plugin Manager")); DefineKeyCommand(kcViewChannelManager, 1670, _T("View Channel Manager")); DefineKeyCommand(kcCopyAndLoseSelection, 1671, _T("Copy and lose selection")); @@ -546,7 +546,7 @@ DefineKeyCommand(kcNotePCS, 1789, _T("Parameter control(smooth)(MPTm only)")); DefineKeyCommand(kcSampleRemoveDCOffset, 1790, _T("Remove DC Offset")); DefineKeyCommand(kcNoteFade, 1791, _T("Note Fade")); - DefineKeyCommand(kcNoteFadeOld, 1792, _T("Note Fade (without instrument number)")); + DefineKeyCommand(kcNoteFadeOld, 1792, _T("Note Fade"), kcHidden); // Legacy DefineKeyCommand(kcEditPasteFlood, 1793, _T("Paste Flood")); DefineKeyCommand(kcOrderlistNavigateLeft, 1794, _T("Previous Order")); DefineKeyCommand(kcOrderlistNavigateRight, 1795, _T("Next Order")); @@ -1343,6 +1343,16 @@ } } + + // Legacy: Note off commands with and without instrument numbers are now the same. + commands[kcNoteCut].kcList.insert(commands[kcNoteCut].kcList.end(), commands[kcNoteCutOld].kcList.begin(), commands[kcNoteCutOld].kcList.end()); + commands[kcNoteCutOld].kcList.clear(); + commands[kcNoteOff].kcList.insert(commands[kcNoteOff].kcList.end(), commands[kcNoteOffOld].kcList.begin(), commands[kcNoteOffOld].kcList.end()); + commands[kcNoteOffOld].kcList.clear(); + commands[kcNoteFade].kcList.insert(commands[kcNoteFade].kcList.end(), commands[kcNoteFadeOld].kcList.begin(), commands[kcNoteFadeOld].kcList.end()); + commands[kcNoteFadeOld].kcList.clear(); + + /* if (enforceRule[krFoldEffectColumnAnd]) { if (inKc.ctx == kCtxViewPatternsFX) { Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/mptrack/CommandSet.h 2014-08-21 14:20:01 UTC (rev 4209) @@ -1230,17 +1230,6 @@ UINT UID; bool isDummy; bool isHidden; - - bool operator= (const CommandStruct &other) - { - UID = other.UID; - Message = other.Message; - isDummy = other.isDummy; - isHidden = other.isHidden; - kcList = other.kcList; - return true; - } - }; @@ -1282,7 +1271,7 @@ { protected: //util - inline void DefineKeyCommand(CommandID kc, UINT uid, CString message, enmKcVisibility visible = kcVisible, enmKcDummy dummy = kcNoDummy); + inline void DefineKeyCommand(CommandID kc, UINT uid, const TCHAR *message, enmKcVisibility visible = kcVisible, enmKcDummy dummy = kcNoDummy); void SetupCommands(); void SetupContextHierarchy(); bool IsDummyCommand(CommandID cmd); Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2014-08-21 14:20:01 UTC (rev 4209) @@ -2186,9 +2186,7 @@ case kcNextInstrument: OnNextInstrument(); return wParam; case kcEditCopy: OnEditCopy(); return wParam; case kcEditPaste: OnEditPaste(); return wParam; - case kcNoteOffOld: case kcNoteOff: PlayNote(NOTE_KEYOFF); return wParam; - case kcNoteCutOld: case kcNoteCut: PlayNote(NOTE_NOTECUT); return wParam; case kcInstrumentLoad: SendCtrlMessage(IDC_INSTRUMENT_OPEN); return wParam; case kcInstrumentSave: SendCtrlMessage(IDC_INSTRUMENT_SAVEAS); return wParam; Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-08-21 14:20:01 UTC (rev 4209) @@ -3906,7 +3906,7 @@ nVol = CMainFrame::ApplyVolumeRelatedSettings(dwMidiData, midivolume); if(nVol < 0) nVol = -1; else nVol = (nVol + 3) / 4; //Value from [0,256] to [0,64] - TempEnterNote(nNote, true, nVol, true); + TempEnterNote(nNote, nVol, true); // continue playing as soon as MIDI notes are being received (http://forum.openmpt.org/index.php?topic=2813.0) if(sndFile.IsPaused() && (TrackerSettings::Instance().m_dwMidiSetup & MIDISETUP_PLAYPATTERNONMIDIIN)) @@ -4407,12 +4407,9 @@ return wParam; case kcPatternGoto: OnEditGoto(); return wParam; - case kcNoteCut: TempEnterNote(NOTE_NOTECUT, false); return wParam; - case kcNoteCutOld: TempEnterNote(NOTE_NOTECUT, true); return wParam; - case kcNoteOff: TempEnterNote(NOTE_KEYOFF, false); return wParam; - case kcNoteOffOld: TempEnterNote(NOTE_KEYOFF, true); return wParam; - case kcNoteFade: TempEnterNote(NOTE_FADE, false); return wParam; - case kcNoteFadeOld: TempEnterNote(NOTE_FADE, true); return wParam; + case kcNoteCut: TempEnterNote(NOTE_NOTECUT); return wParam; + case kcNoteOff: TempEnterNote(NOTE_KEYOFF); return wParam; + case kcNoteFade: TempEnterNote(NOTE_FADE); return wParam; case kcNotePC: TempEnterNote(NOTE_PC); return wParam; case kcNotePCS: TempEnterNote(NOTE_PCS); return wParam; @@ -5058,8 +5055,8 @@ // Enter a note in the pattern -void CViewPattern::TempEnterNote(int note, bool oldStyle, int vol, bool fromMidi) -//------------------------------------------------------------------------------- +void CViewPattern::TempEnterNote(int note, int vol, bool fromMidi) +//---------------------------------------------------------------- { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); CModDoc *pModDoc = GetDocument(); @@ -5214,8 +5211,8 @@ } } - // -- old style note cut/off/fade: erase instrument number - if (oldStyle && newcmd.note >= NOTE_MIN_SPECIAL) + // Note cut/off/fade: erase instrument number + if(newcmd.note >= NOTE_MIN_SPECIAL) newcmd.instr = 0; } Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2014-08-19 08:51:34 UTC (rev 4208) +++ trunk/OpenMPT/mptrack/View_pat.h 2014-08-21 14:20:01 UTC (rev 4209) @@ -303,7 +303,7 @@ void CursorJump(DWORD distance, bool upwards, bool snap); - void TempEnterNote(int n, bool oldStyle = false, int vol = -1, bool fromMidi = false); + void TempEnterNote(int n, int vol = -1, bool fromMidi = false); void TempStopNote(int note, bool fromMidi = false, const bool bChordMode = false); void TempEnterChord(int n); void TempStopChord(int note) {TempStopNote(note, false, true);} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-08-31 08:34:55
|
Revision: 4221 http://sourceforge.net/p/modplug/code/4221 Author: manxorist Date: 2014-08-31 08:34:39 +0000 (Sun, 31 Aug 2014) Log Message: ----------- [New] libopenmpt: It looks like there are still many VS2008 users out there. Make libopenmpt at least compile with VS2008 (with msinttypes) and provide basic project files in build/vs2008 (note that this is not a full build system for libopenmpt but only enough to get VS2008 users started). Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/libopenmpt.hpp trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp trunk/OpenMPT/libopenmpt/libopenmpt_config.h trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp Added Paths: ----------- trunk/OpenMPT/build/vs2008/ trunk/OpenMPT/build/vs2008/libopenmpt/ trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj trunk/OpenMPT/build/vs2008/libopenmpt.sln trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/Makefile 2014-08-31 08:34:39 UTC (rev 4221) @@ -735,6 +735,7 @@ svn export ./include/foobar2000sdk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/foobar2000sdk --native-eol CRLF svn export ./include/winamp bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF svn export ./include/xmplay bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF + svn export ./include/msinttypes bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/msinttypes --native-eol CRLF cp bin/dist.mk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/dist.mk cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h cd bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../libopenmpt-$(DIST_LIBOPENMPT_VERSION)-windows.zip --compression-method deflate -9 * Index: trunk/OpenMPT/build/vs2008 =================================================================== --- trunk/OpenMPT/build/vs2008 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008 ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,4 ## +Debug +*.ncb +*.suo +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Index: trunk/OpenMPT/build/vs2008/libopenmpt =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008/libopenmpt 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,14 @@ +#pragma once +#if (_MSC_VER >= 1500) && (_MSC_VER < 1600) // VS2008 +#include "stdint.h" +namespace std { + typedef int8_t int8_t; + typedef int16_t int16_t; + typedef int32_t int32_t; + typedef int64_t int64_t; + typedef uint8_t uint8_t; + typedef uint16_t uint16_t; + typedef uint32_t uint32_t; + typedef uint64_t uint64_t; +} +#endif Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-chdr \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,816 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libopenmpt" + ProjectGUID="{D19450B0-4497-418C-B3EC-10D51967814E}" + RootNamespace="libopenmpt" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + PreprocessorDefinitions="LIBOPENMPT_BUILD" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + PreprocessorDefinitions="LIBOPENMPT_BUILD" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="common" + > + <File + RelativePath="..\..\..\common\AudioCriticalSection.cpp" + > + </File> + <File + RelativePath="..\..\..\common\AudioCriticalSection.h" + > + </File> + <File + RelativePath="..\..\..\common\BuildSettings.h" + > + </File> + <File + RelativePath="..\..\..\common\CompilerDetect.h" + > + </File> + <File + RelativePath="..\..\..\common\Endianness.h" + > + </File> + <File + RelativePath="..\..\..\common\FlagSet.h" + > + </File> + <File + RelativePath="..\..\..\common\Logging.cpp" + > + </File> + <File + RelativePath="..\..\..\common\Logging.h" + > + </File> + <File + RelativePath="..\..\..\common\misc_util.cpp" + > + </File> + <File + RelativePath="..\..\..\common\misc_util.h" + > + </File> + <File + RelativePath="..\..\..\common\mptFstream.h" + > + </File> + <File + RelativePath="..\..\..\common\mptPathString.cpp" + > + </File> + <File + RelativePath="..\..\..\common\mptPathString.h" + > + </File> + <File + RelativePath="..\..\..\common\mptString.cpp" + > + </File> + <File + RelativePath="..\..\..\common\mptString.h" + > + </File> + <File + RelativePath="..\..\..\common\mutex.h" + > + </File> + <File + RelativePath="..\..\..\common\Profiler.cpp" + > + </File> + <File + RelativePath="..\..\..\common\Profiler.h" + > + </File> + <File + RelativePath="..\..\..\common\serialization_utils.cpp" + > + </File> + <File + RelativePath="..\..\..\common\serialization_utils.h" + > + </File> + <File + RelativePath="..\..\..\common\stdafx.cpp" + > + </File> + <File + RelativePath="..\..\..\common\stdafx.h" + > + </File> + <File + RelativePath="..\..\..\common\StringFixer.h" + > + </File> + <File + RelativePath="..\..\..\common\thread.h" + > + </File> + <File + RelativePath="..\..\..\common\typedefs.cpp" + > + </File> + <File + RelativePath="..\..\..\common\typedefs.h" + > + </File> + <File + RelativePath="..\..\..\common\version.cpp" + > + </File> + <File + RelativePath="..\..\..\common\version.h" + > + </File> + <File + RelativePath="..\..\..\common\versionNumber.h" + > + </File> + </Filter> + <Filter + Name="soundlib" + > + <File + RelativePath="..\..\..\soundlib\AudioReadTarget.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ChunkReader.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dither.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dither.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dlsbank.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dlsbank.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Fastmix.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\FileReader.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\FloatMixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\IntMixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITCompression.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITCompression.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_669.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_amf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ams.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dbm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_digi.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dmf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dsm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_far.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_gdm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_imf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_it.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_itp.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\load_j2b.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mdl.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_med.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mid.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mo3.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mod.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mt2.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mtm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_okt.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_psm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ptm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_s3m.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_stm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ult.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_umx.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_wav.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_xm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Loaders.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Message.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Message.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIEvents.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIEvents.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIMacros.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIMacros.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Mixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerInterface.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerLoops.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerLoops.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerSettings.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerSettings.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Mmcmp.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\mod_specifications.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\mod_specifications.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModChannel.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModChannel.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\modcommand.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\modcommand.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModInstrument.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModInstrument.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSample.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSample.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSequence.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSequence.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\modsmp_ctrl.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\modsmp_ctrl.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\pattern.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\pattern.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\patternContainer.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\patternContainer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Resampler.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\RowVisitor.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\RowVisitor.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\S3MTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\S3MTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormat.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormatConverters.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormats.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleIO.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleIO.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_defs.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_flt.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_fx.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndfile.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndfile.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndmix.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SoundFilePlayConfig.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SoundFilePlayConfig.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tables.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tables.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tagging.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tagging.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuning.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuning.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningbase.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningbase.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningCollection.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningcollection.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Wav.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\WAVTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\WAVTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\WindowedFIR.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\WindowedFIR.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\XMTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\XMTools.h" + > + </File> + </Filter> + <Filter + Name="libopenmpt" + > + <File + RelativePath="..\..\..\libopenmpt\libopenmpt.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_c.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_config.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_cxx.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_ext.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_ext.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_impl.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_impl.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_internal.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_stream_callbacks_fd.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_stream_callbacks_file.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_version.h" + > + </File> + </Filter> + <Filter + Name="include" + > + <Filter + Name="miniz" + > + <File + RelativePath="..\..\..\include\miniz\miniz.c" + > + </File> + </Filter> + <Filter + Name="msinttypes" + > + <Filter + Name="stdint" + > + <File + RelativePath="..\..\..\include\msinttypes\stdint\stdint.h" + > + </File> + </Filter> + <Filter + Name="inttypes" + > + <File + RelativePath="..\..\..\include\msinttypes\inttypes\inttypes.h" + > + </File> + </Filter> + </Filter> + </Filter> + <Filter + Name="build" + > + <Filter + Name="vs2008" + > + <Filter + Name="libopenmt" + > + <File + RelativePath=".\cstdint.h" + > + </File> + </Filter> + </Filter> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-vcproj \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt.sln =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt.sln (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt.sln 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt", "libopenmpt\libopenmpt.vcproj", "{D19450B0-4497-418C-B3EC-10D51967814E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "..\gen\portaudio.vcproj", "{189B867F-FF4B-45A1-B741-A97492EE69AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_example_c.c", "libopenmpt_example_c.c\libopenmpt_example_c.c.vcproj", "{89D1117D-7787-45C1-9240-A24AACF4A414}" + ProjectSection(ProjectDependencies) = postProject + {189B867F-FF4B-45A1-B741-A97492EE69AF} = {189B867F-FF4B-45A1-B741-A97492EE69AF} + {D19450B0-4497-418C-B3EC-10D51967814E} = {D19450B0-4497-418C-B3EC-10D51967814E} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D19450B0-4497-418C-B3EC-10D51967814E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Debug|Win32.Build.0 = Debug|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Release|Win32.ActiveCfg = Release|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Release|Win32.Build.0 = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.Build.0 = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.ActiveCfg = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.Build.0 = Release|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Debug|Win32.ActiveCfg = Debug|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Debug|Win32.Build.0 = Debug|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Release|Win32.ActiveCfg = Release|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt.sln ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-sln \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Index: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +Debug +*.user +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libopenmpt_example_c.c" + ProjectGUID="{89D1117D-7787-45C1-9240-A24AACF4A414}" + RootNamespace="libopenmpt_example_cc" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="..\..\..\libopenmpt\examples\libopenmpt_example_c.c" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-vcproj \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/common/typedefs.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -426,11 +426,11 @@ // openmpt assumes these type have exact WIN32 semantics namespace mpt { namespace Legacy { -typedef std::uint8_t BYTE; -typedef std::uint16_t WORD; -typedef std::uint32_t DWORD; -typedef std::int32_t LONG; -typedef std::uint32_t UINT; +typedef uint8 BYTE; +typedef uint16 WORD; +typedef uint32 DWORD; +typedef int32 LONG; +typedef uint32 UINT; } } // namespace mpt::Legacy using namespace mpt::Legacy; Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-08-31 08:34:39 UTC (rev 4221) @@ -10,6 +10,7 @@ * openmpt123: SDL is now also used by default if availble, in addition to PortAudio. * Support for emscripten is no longer experimental. + * libopenmpt itself can now also be compiled with VS2008. * [Bug] Fix all known crashes on platforms that do not support unaligned memory access. Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -20,7 +20,11 @@ #include <string> #include <vector> +#ifdef MPT_ANCIENT_VS2008 +#include "cstdint.h" +#else #include <cstdint> +#endif /*! * \page libopenmpt_cpp_overview C++ API Modified: trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -265,7 +265,11 @@ double openmpt_could_open_propability( openmpt_stream_callbacks stream_callbacks, void * stream, double effort, openmpt_log_func logfunc, void * user ) { try { openmpt::callbacks_istream istream( stream_callbacks, stream ); +#ifdef MPT_ANCIENT_VS2008 + return openmpt::module_impl::could_open_propability( istream, effort, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( logfunc ? logfunc : openmpt_log_func_default, user ) ) ); +#else return openmpt::module_impl::could_open_propability( istream, effort, std::make_shared<openmpt::logfunc_logger>( logfunc ? logfunc : openmpt_log_func_default, user ) ); +#endif } OPENMPT_INTERFACE_CATCH_TO_LOG_FUNC; return 0.0; } @@ -291,7 +295,11 @@ } } openmpt::callbacks_istream istream( stream_callbacks, stream ); +#ifdef MPT_ANCIENT_VS2008 + mod->impl = new openmpt::module_impl( istream, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( mod->logfunc, mod->user ) ), ctls_map ); +#else mod->impl = new openmpt::module_impl( istream, std::make_shared<openmpt::logfunc_logger>( mod->logfunc, mod->user ), ctls_map ); +#endif return mod; } OPENMPT_INTERFACE_CATCH_TO_MOD_LOG_FUNC; delete mod->impl; @@ -322,7 +330,11 @@ } } } +#ifdef MPT_ANCIENT_VS2008 + mod->impl = new openmpt::module_impl( filedata, filesize, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( mod->logfunc, mod->user ) ), ctls_map ); +#else mod->impl = new openmpt::module_impl( filedata, filesize, std::make_shared<openmpt::logfunc_logger>( mod->logfunc, mod->user ), ctls_map ); +#endif return mod; } OPENMPT_INTERFACE_CATCH_TO_MOD_LOG_FUNC; delete mod->impl; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_config.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_config.h 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_config.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -95,6 +95,12 @@ @} */ +#if defined(_MSC_VER) +#if (_MSC_VER >= 1500) && (_MSC_VER < 1600) // VS2008 +#define MPT_ANCIENT_VS2008 +#endif +#endif + #include "libopenmpt_version.h" #endif /* LIBOPENMPT_CONFIG_H */ Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -77,7 +77,11 @@ } double could_open_propability( std::istream & stream, double effort, std::ostream & log ) { +#ifdef MPT_ANCIENT_VS2008 + return openmpt::module_impl::could_open_propability( stream, effort, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ) ); +#else return openmpt::module_impl::could_open_propability( stream, effort, std::make_shared<std_ostream_log>( log ) ); +#endif } module::module( const module & ) { @@ -97,35 +101,67 @@ } module::module( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( stream, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( stream, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::vector<std::uint8_t> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::uint8_t * beg, const std::uint8_t * end, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( beg, end - beg, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( beg, end - beg, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::uint8_t * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const char * beg, const char * end, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( beg, end - beg, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( beg, end - beg, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::~module() { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -29,16 +29,32 @@ { public: +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( stream, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( stream, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -172,9 +172,17 @@ class log_forwarder : public ILog { private: +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_interface> destination; +#else std::shared_ptr<log_interface> destination; +#endif public: +#ifdef MPT_ANCIENT_VS2008 + log_forwarder( std::tr1::shared_ptr<log_interface> dest ) : destination(dest) { +#else log_forwarder( std::shared_ptr<log_interface> dest ) : destination(dest) { +#endif return; } virtual ~log_forwarder() { @@ -294,9 +302,21 @@ set_render_param( module::RENDER_STEREOSEPARATION_PERCENT, 100 ); } void module_impl::init( const std::map< std::string, std::string > & ctls ) { +#ifdef MPT_ANCIENT_VS2008 + m_sndFile = std::tr1::shared_ptr<CSoundFile>(new CSoundFile()); +#else m_sndFile = std::unique_ptr<CSoundFile>(new CSoundFile()); +#endif +#ifdef MPT_ANCIENT_VS2008 + m_Dither = std::tr1::shared_ptr<Dither>(new Dither()); +#else m_Dither = std::unique_ptr<Dither>(new Dither()); +#endif +#ifdef MPT_ANCIENT_VS2008 + m_LogForwarder = std::tr1::shared_ptr<log_forwarder>(new log_forwarder(m_Log)); +#else m_LogForwarder = std::unique_ptr<log_forwarder>(new log_forwarder(m_Log)); +#endif m_sndFile->SetCustomLog( m_LogForwarder.get() ); m_currentPositionSeconds = 0.0; m_Gain = 1.0f; @@ -412,9 +432,21 @@ std::transform( lowercase_ext.begin(), lowercase_ext.end(), lowercase_ext.begin(), tolower ); return std::find( extensions.begin(), extensions.end(), lowercase_ext ) != extensions.end(); } +#ifdef MPT_ANCIENT_VS2008 +double module_impl::could_open_propability( std::istream & stream, double effort, std::tr1::shared_ptr<log_interface> log ) { +#else double module_impl::could_open_propability( std::istream & stream, double effort, std::shared_ptr<log_interface> log ) { +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<CSoundFile> sndFile( new CSoundFile() ); +#else std::unique_ptr<CSoundFile> sndFile( new CSoundFile() ); +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_forwarder> logForwarder( new log_forwarder( log ) ); +#else std::unique_ptr<log_forwarder> logForwarder( new log_forwarder( log ) ); +#endif sndFile->SetCustomLog( logForwarder.get() ); try { @@ -447,32 +479,64 @@ } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( std::istream & stream, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( std::istream & stream, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( &stream ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::vector<std::uint8_t> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::vector<std::uint8_t> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); +#ifdef MPT_ANCIENT_VS2008 + load( FileReader( &(data[0]), data.size() ) ); +#else load( FileReader( data.data(), data.size() ) ); +#endif apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::vector<char> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::vector<char> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); +#ifdef MPT_ANCIENT_VS2008 + load( FileReader( &(data[0]), data.size() ) ); +#else load( FileReader( data.data(), data.size() ) ); +#endif apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::uint8_t * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::uint8_t * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const char * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const char * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const void * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const void * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -54,11 +54,27 @@ class module_impl { protected: +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_interface> m_Log; +#else std::shared_ptr<log_interface> m_Log; +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_forwarder> m_LogForwarder; +#else std::unique_ptr<log_forwarder> m_LogForwarder; +#endif double m_currentPositionSeconds; +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<OpenMPT::CSoundFile> m_sndFile; +#else std::unique_ptr<OpenMPT::CSoundFile> m_sndFile; +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<OpenMPT::Dither> m_Dither; +#else std::unique_ptr<OpenMPT::Dither> m_Dither; +#endif float m_Gain; bool m_ctl_load_skip_samples; bool m_ctl_load_skip_patterns; @@ -82,13 +98,41 @@ public: static std::vector<std::string> get_supported_extensions(); static bool is_extension_supported( const std::string & extension ); +#ifdef MPT_ANCIENT_VS2008 + static double could_open_propability( std::istream & stream, double effort, std::tr1::shared_ptr<log_interface> log ); +#else static double could_open_propability( std::istream & stream, double effort, std::shared_ptr<log_interface> log ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( std::istream & stream, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( std::istream & stream, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::vector<std::uint8_t> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::vector<std::uint8_t> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::vector<char> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::vector<char> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::uint8_t * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::uint8_t * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const char * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const char * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const void * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const void * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif ~module_impl(); public: void select_subsong( std::int32_t subsong ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-08-31 16:02:54
|
Revision: 4222 http://sourceforge.net/p/modplug/code/4222 Author: saga-games Date: 2014-08-31 16:02:44 +0000 (Sun, 31 Aug 2014) Log Message: ----------- [Fix] Sample tab: Possible crashes when using undo/redo, most notably when sample undo is disabled completely (http://bugs.openmpt.org/view.php?id=584). [Mod] OpenMPT: Version is now 1.23.04.09 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Undo.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-08-31 08:34:39 UTC (rev 4221) +++ trunk/OpenMPT/common/versionNumber.h 2014-08-31 16:02:44 UTC (rev 4222) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 08 +#define VER_MINORMINOR 09 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2014-08-31 08:34:39 UTC (rev 4221) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2014-08-31 16:02:44 UTC (rev 4222) @@ -797,9 +797,13 @@ void COptionsSampleEditor::RecalcUndoSize() //----------------------------------------- { - uint32 sizeMB = mpt::saturate_cast<uint32>(SampleUndoBufferSize(GetDlgItemInt(IDC_EDIT_UNDOSIZE)).GetSizeInBytes() >> 20); - CString text; - text.Format("%% of physical memory (%u MiB)", sizeMB); + UINT sizePercent = GetDlgItemInt(IDC_EDIT_UNDOSIZE); + uint32 sizeMB = mpt::saturate_cast<uint32>(SampleUndoBufferSize(sizePercent).GetSizeInBytes() >> 20); + CString text = _T("% of physical memory ("); + if(sizePercent) + text.AppendFormat(_T("%u MiB)"), sizeMB); + else + text.Append(_T("disabled)")); SetDlgItemText(IDC_UNDOSIZE, text); } Modified: trunk/OpenMPT/mptrack/Undo.cpp =================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp 2014-08-31 08:34:39 UTC (rev 4221) +++ trunk/OpenMPT/mptrack/Undo.cpp 2014-08-31 16:02:44 UTC (rev 4222) @@ -308,6 +308,11 @@ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { if(smp == 0 || smp >= MAX_SAMPLES) return false; + if(!TrackerSettings::Instance().m_SampleUndoBufferSize.Get().GetSizeInBytes()) + { + // Undo/Redo is disabled + return false; + } if(smp > buffer.size()) { buffer.resize(smp); @@ -424,8 +429,9 @@ CSoundFile &sndFile = modDoc.GetrSoundFile(); - // Select most recent undo slot - UndoInfo &undo = fromBuf[smp - 1].back(); + // Select most recent undo slot and temporarily remove it from the buffer so that it won't get deleted by possible buffer size restrictions in PrepareBuffer() + UndoInfo undo = fromBuf[smp - 1].back(); + fromBuf[smp - 1].pop_back(); // When turning an undo point into a redo point (and vice versa), some action types need to be adjusted. sampleUndoTypes redoType = undo.changeType; @@ -510,6 +516,7 @@ } sample.PrecomputeLoops(sndFile, true); + fromBuf[smp - 1].push_back(undo); DeleteStep(fromBuf, smp, fromBuf[smp - 1].size() - 1); modDoc.UpdateAllViews(NULL, HINT_UNDO); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-06 12:12:37
|
Revision: 4238 http://sourceforge.net/p/modplug/code/4238 Author: saga-games Date: 2014-09-06 12:12:20 +0000 (Sat, 06 Sep 2014) Log Message: ----------- [Mod] Changed sourceforge installer to use the Inno Download Plugin because the InnoTools Downloader is not compatible with unicode InnoSetup. [Mod] Updated release notes documents. [Mod] OpenMPT: Version is now 1.23.05.00 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/installer/install-unmo3-free.iss trunk/OpenMPT/mptrack/manual_generator/run.cmd trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-09-06 06:56:06 UTC (rev 4237) +++ trunk/OpenMPT/common/versionNumber.h 2014-09-06 12:12:20 UTC (rev 4238) @@ -18,8 +18,8 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 -#define VER_MINOR 04 -#define VER_MINORMINOR 09 +#define VER_MINOR 05 +#define VER_MINORMINOR 00 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/installer/install-unmo3-free.iss =================================================================== --- trunk/OpenMPT/installer/install-unmo3-free.iss 2014-09-06 06:56:06 UTC (rev 4237) +++ trunk/OpenMPT/installer/install-unmo3-free.iss 2014-09-06 12:12:20 UTC (rev 4238) @@ -6,17 +6,19 @@ ; This file is provided for creating an install package without the proprietary unmo3.dll (for example for the SourceForge package). ; Instead of including the file in the setup package, the user instead has the possibility to automatically download unmo3.dll from ; our servers. -; The download code requires the ISTool IDE with its downloader extension. -; You can download ISTool from http://www.istool.org/ -; This installer is deprecated. Use install-unmo3-free-itd.iss instead. +; The download code requires the Inno Download Plugin from https://code.google.com/p/inno-download-plugin/ +; Uncomment one of following lines, if you haven't checked "Add IDP include path to ISPPBuiltins.iss" option during IDP installation: +;#pragma include __INCLUDE__ + ";" + ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir") +;#pragma include __INCLUDE__ + ";" + "C:\Program Files (x86)\Inno Download Plugin" + #define DOWNLOAD_MO3 #define BaseNameAddition "_sf" +#include <idp.iss> #include "win32.iss" -[_ISToolDownload] -Source: http://openmpt.org/files/unmo3/2.4.0.5/win-x86/unmo3.dll; DestDir: {tmp}; DestName: openmpt-unmo3.dll.tmp; Tasks: downloadmo3 [Code] + // Verify checksum of downloaded file, and if it is OK, copy it to the app directory. procedure VerifyUNMO3Checksum(); begin @@ -33,8 +35,23 @@ end; end; -// Function generated by ISTool. -function NextButtonClick(CurPage: Integer): Boolean; +[Code] +procedure InitializeWizard(); begin - Result := istool_download(CurPage); + idpDownloadAfter(wpReady); end; + +procedure CurPageChanged(CurPageID: Integer); +begin + if CurPageID = wpReady then + begin + // User can navigate to 'Ready to install' page several times, so we + // need to clear file list to ensure that only needed files are added. + idpClearFiles; + if(IsTaskSelected('downloadmo3')) then + begin + idpAddFile('http://openmpt.org/files/unmo3/2.4.0.5/win-x86/unmo3.dll', ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')); + idpAddMirror('http://openmpt.org/files/unmo3/2.4.0.5/win-x86/unmo3.dll', 'ftp://ftp.untergrund.net/users/sagamusix/openmpt/archive/unmo3/2.4.0.5/win-x86/unmo3.dll'); + end; + end; +end; \ No newline at end of file Modified: trunk/OpenMPT/mptrack/manual_generator/run.cmd =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/run.cmd 2014-09-06 06:56:06 UTC (rev 4237) +++ trunk/OpenMPT/mptrack/manual_generator/run.cmd 2014-09-06 12:12:20 UTC (rev 4238) @@ -1,5 +1,5 @@ -REM del /s html -REM mkdir html +del /s html +mkdir html REM wiki.py copy source\*.* html\ "%ProgramFiles%\7-zip\7z" x html.tgz Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2014-09-06 06:56:06 UTC (rev 4237) +++ trunk/OpenMPT/packageTemplate/History.txt 2014-09-06 12:12:20 UTC (rev 4238) @@ -25,6 +25,70 @@ <ks> coda / Ken Snyder +v1.23.05.00 (6 September 2014, revision 4238) +--------------------------------------------- +Pattern tab + [Imp] <js> "Edit Plugin assigned to PC Event" shortcut is now "Toggle PC Event/instrument plugin editor" (can now also be used to toggle the editor of the plugin assigned to the currently selected instrument). + [Imp] <js> Deleting and inserting items in the order list automatically adjusts playback, sequence override and play lock positions. + [Imp] <js> Greatly improve seek speed when "Maintain sample sync on seek" is enabled and there are samples with very small loops. + [Imp] <js> When inserting a new pattern while a +++ or --- pattern is focussed in the order list, use the currently edited pattern for determining the new pattern's length. + [Fix] <js> In windowed mode, the note properties dialog was not always visible. + [Fix] <js> The order list's scrollbar's "Right Edge" menu entry was not working (http://bugs.openmpt.org/view.php?id=567). + +Sample tab + [Fix] <js> Enabling a sample loop when there were no loop points didn't update the loop point display. + [Fix] <js> Silencing samples was slightly broken (http://bugs.openmpt.org/view.php?id=555). + [Fix] <js> Undo could crash in some situations when the total undo buffer size previously exceeded the configured buffer limit. + [Fix] <js> It was impossible to call the save dialog for a sample / instrument with a pipe character in the name (also applies to instrument tab, http://bugs.openmpt.org/view.php?id=564) + [Fix] <js> Fixed possible crashes when using undo / redo, most notably when sample undo was disabled completely (http://bugs.openmpt.org/view.php?id=584). + +Instrument tab + [Imp] <js> In the sample map editor, show faint red dots for notes that are already assigned to another sample (http://forum.openmpt.org/index.php?topic=4112.msg37495#msg37495). + [Fix] <js> Trying to play notes above B-9 caused a crash (http://bugs.openmpt.org/view.php?id=549). + +Tree view + [Fix] <js> Stopped voices sometimes still contributed to the active sample / instrument list (http://bugs.openmpt.org/view.php?id=568). + +VST / DMO Plugins + [New] <js> Plugin editor positions are now stored in module files. + [Imp] <js> Allow drag and drop actions on plugin editors to drop preset files from Explorer. + [Fix] <js> Program names starting with non-ASCII characters were not formatted properly. + [Reg] <js> Partly reverted the behaviour introduced in OpenMPT 1.23.03.00 to only re-send patch numbers if they're not bank 1 patch 1, to fix legacy module playback. + +IT::Compatible Playback Mode + [Fix] <js> Tone portamento target is now completely cleared with new notes, so that subsequent Gxx effects have no effect. + +XM + [Fix] <js> Clear MIDI macros for XM files made with FT2 to prevent Zxx effects from doing anything. + [Fix] <js> Correct nominal dB values for FT2 pan law mix mode. + +XM::Compatible Playback Mode + [Fix] <js> Tentatively fix arpeggio after pitch slide behaviour (http://bugs.openmpt.org/view.php?id=542). + +MOD + [Fix] <js> ProTracker applies instrument changes on the first tick, even if there's a note delay. This is now emulated in ProTracker 1/2 mode. (http://bugs.openmpt.org/view.php?id=574). + [Fix] <js> Properly implemented ProTracker-style sample swapping in ProTracker 1/2 mode, which is only supposed to happend at the end of the sample and not instantly. + [Fix] <js> Correctly handle a few more edge cases of ProTracker-style 9xx offset handling in ProTracker 1/2 mode. + +Playback + [Mod] <js> When resuming paused (not stopped) playback, previously playing samples are continued. + [Fix] <js> "Maintain sample sync on seek" should now also work when playback was previously stopped. + [Fix] <js> Glissando in semitones mode didn't take finetune into account (http://bugs.openmpt.org/view.php?id=585). + +Other + [New] <jh> Add hidden setting [Misc] ShowSettingsOnNewVersion (default true) which can permanently disable showing of the settings dialog on new versions, in addition to the one-time commandline switch /noSettingsOnNewVersion . + [Imp] <js> Add support for 64-bit vorbis library builds from mingw-w64 with slightly different file names. + [Imp] <js> When adding a new shortcut that conflicts with an existing shortcut, do not automatically delete the existing shortcut but rather ask the user what to do. + [Imp] <js> Add global dummy shortcut keybinding to prevent default keybindings from doing anything into if you don't like them (http://bugs.openmpt.org/view.php?id=550). + [Imp] <js> Slightly improved icons for systems with 32-bit display mode but mysteriously missing alpha channel (http://bugs.openmpt.org/view.php?id=520). + [Mod] <js> Merge "Note Off/Cut/Fade" and "Note Off/Cut/Fade (without instrument number)" to never write an instrument number next to those events. + [Mod] <js> Update UnRAR library to version 5.1.6. + [Fix] <js> Scale main toolbar elements according to DPI settings (http://bugs.openmpt.org/view.php?id=513). + [Fix] <js> Setting the default MIDI volume behaviour for new instruments in the Options dialog was broken. + [Fix] <js> Potential fix for DDE error when launching OpenMPT through an associated file from Explorer (http://bugs.openmpt.org/view.php?id=461). + [Fix] <js> After loading a new keybinding file, effect keys were no longer working until the user switched to a module with different effect keys (tx stinkbug). + + v1.23.04.00 (14 June 2014, revision 4113) ----------------------------------------- Pattern tab @@ -33,7 +97,7 @@ [Fix] <js> With overflow paste, marking the pasted pattern area was not working when the paste ended exactly in the last pattern row (broke in OpenMPT 1.23.02.00). [Fix] <js> Select / Copy Select keys should no longer interfere with mouse dragging (tx coda). [Fix] <js> Don't crash when the module doesn't have any patterns. - [Fix] <jh> Fix flickering of current-row highlight in pattern view on Wine (http://bugs.openmpt.org/view.php?id=522). + [Fix] <jh> Fixed flickering of current-row highlight in pattern view on Wine (http://bugs.openmpt.org/view.php?id=522). Sample tab [Fix] <js> Setting sustain loop points by typing the values in didn't update the waveform display. Modified: trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html =================================================================== --- trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html 2014-09-06 06:56:06 UTC (rev 4237) +++ trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html 2014-09-06 12:12:20 UTC (rev 4238) @@ -150,6 +150,7 @@ <li>OpenMPT should no longer "forget" plugins randomly.</li> <li>Plugins with same internal ID should no longer confuse OpenMPT's plugin cache.</li> <li>The MIDI Input / Output Plugin can now <strong>compensate for OpenMPT's audio output latency</strong> by delaying the MIDI output accordingly.</li> + <li>Plugin editor positions are now stored in module files.</li> <li>Support for up to 250 plugins per song!</li> </ul> @@ -168,6 +169,7 @@ <h3>File Format Support</h3> <ul> <li>A great bunch of <strong>playback fixes for XM</strong> files in compatible mode.</li> + <li>ProTracker-style 9xx offset command emulation.</li> <li>Various fixes in other format loaders, especially DBM.</li> </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-06 23:50:43
|
Revision: 4244 http://sourceforge.net/p/modplug/code/4244 Author: saga-games Date: 2014-09-06 23:50:34 +0000 (Sat, 06 Sep 2014) Log Message: ----------- [Mod] Disallow "attack" setting to be used in IT and XM files. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/soundlib/ModInstrument.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-09-06 13:17:05 UTC (rev 4243) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-09-06 23:50:34 UTC (rev 4244) @@ -1168,8 +1168,8 @@ ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT10), bITandXM); ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT11), bITandXM); ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT7), bITandXM); - ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2), bITandXM); - m_SliderAttack.EnableWindow(bITandXM); + ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2), bMPTOnly || (pIns && pIns->nVolRampUp)); + m_SliderAttack.EnableWindow(bMPTOnly || (pIns && pIns->nVolRampUp)); // For legacy modules, keep the attack setting enabled. Otherwise, only allow it in MPTM files. m_EditName.EnableWindow(bITandXM); m_EditFileName.EnableWindow(bITandMPT); m_CbnMidiCh.EnableWindow(bITandXM); Modified: trunk/OpenMPT/soundlib/ModInstrument.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModInstrument.cpp 2014-09-06 13:17:05 UTC (rev 4243) +++ trunk/OpenMPT/soundlib/ModInstrument.cpp 2014-09-06 23:50:34 UTC (rev 4244) @@ -227,6 +227,7 @@ wPitchToTempoLock = 0; nCutSwing = nResSwing = 0; nFilterMode = FLTMODE_UNCHANGED; + nVolRampUp = 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 06:28:00
|
Revision: 4246 http://sourceforge.net/p/modplug/code/4246 Author: manxorist Date: 2014-09-07 06:27:42 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [Ref] build: Cleanup the svn_version.h mess: [Ref] build: For MSVC projects, add a batch file that gets called in each project that needs svn_version.h in order to avoid duplicating the exact commandline. [Ref] build: For MSVC projects, move svn_version.h to the intermediate build directory for all projects. [Ref] build: Move default svn_version.h to buil/dsvn_version/svn_version.h . [Ref] build: Adjust tarball generation. [Ref] build: Related cleanups and refactoring. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/android_ndk/Android.mk trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj trunk/OpenMPT/common/version.cpp trunk/OpenMPT/libopenmpt/in_openmpt.cpp trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters Added Paths: ----------- trunk/OpenMPT/build/svn_version/ trunk/OpenMPT/build/svn_version/svn_version.h trunk/OpenMPT/build/svn_version/svn_version.template.subwcrev.h trunk/OpenMPT/build/svn_version/update_svn_version_vs.cmd Removed Paths: ------------- trunk/OpenMPT/common/svn_version_default/ trunk/OpenMPT/common/svn_version_subwcrev/ trunk/OpenMPT/common/svn_version_svnversion/ trunk/OpenMPT/mptrack/svn_version/ Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/Makefile 2014-09-07 06:27:42 UTC (rev 4246) @@ -375,25 +375,24 @@ -include build/dist.mk -ifeq ($(BUILD_SVNVERSION),) +CPPFLAGS += -Ibuild/svn_version +ifeq ($(MPT_SVNVERSION),) SVN_INFO:=$(shell svn info . > /dev/null 2>&1 ; echo $$? ) ifeq ($(SVN_INFO),0) # in svn checkout -BUILD_SVNVERSION := $(shell svnversion -n . | tr ':' '-' ) -CPPFLAGS += -Icommon/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\" -DIST_OPENMPT_VERSION:=r$(BUILD_SVNVERSION) -DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR).$(BUILD_SVNVERSION) +MPT_SVNVERSION := $(shell svnversion -n . | tr ':' '-' ) +CPPFLAGS += -D MPT_SVNVERSION=\"$(MPT_SVNVERSION)\" +DIST_OPENMPT_VERSION:=r$(MPT_SVNVERSION) +DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR).$(MPT_SVNVERSION) else # not in svn checkout -CPPFLAGS += -Icommon/svn_version_default DIST_OPENMPT_VERSION:=rUNKNOWN DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR) endif else # in dist package -CPPFLAGS += -Icommon/svn_version_default -DIST_OPENMPT_VERSION:=r$(BUILD_SVNVERSION) -DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR).$(BUILD_SVNVERSION) +DIST_OPENMPT_VERSION:=r$(MPT_SVNVERSION) +DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR).$(MPT_SVNVERSION) endif @@ -690,7 +689,7 @@ .PHONY: bin/dist.mk bin/dist.mk: rm -rf $@ - echo 'BUILD_SVNVERSION=$(BUILD_SVNVERSION)' > $@.tmp + echo 'MPT_SVNVERSION=$(MPT_SVNVERSION)' > $@.tmp mv $@.tmp $@ .PHONY: bin/svn_version_dist.h @@ -698,9 +697,9 @@ rm -rf $@ echo > $@.tmp echo '#pragma once' >> $@.tmp - echo '#define BUILD_SVNVERSION "$(BUILD_SVNVERSION)"' >> $@.tmp - echo '#define BUILD_PACKAGE true' >> $@.tmp - echo '#include "../svn_version_svnversion/svn_version.h"' >> $@.tmp + echo '#define OPENMPT_VERSION_SVNVERSION "$(MPT_SVNVERSION)"' >> $@.tmp + echo '#define OPENMPT_VERSION_IS_PACKAGE true' >> $@.tmp + echo >> $@.tmp mv $@.tmp $@ .PHONY: bin/dist-doc/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION).tar @@ -731,7 +730,7 @@ svn export ./include/miniz bin/dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/miniz svn export ./include/modplug bin/dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/modplug cp bin/dist.mk bin/dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/dist.mk - cp bin/svn_version_dist.h bin/dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h + cp bin/svn_version_dist.h bin/dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/svn_version/svn_version.h cd bin/dist-tar/ && tar cv libopenmpt-$(DIST_LIBOPENMPT_VERSION) > libopenmpt-$(DIST_LIBOPENMPT_VERSION).tar .PHONY: bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)-windows.zip @@ -760,7 +759,7 @@ svn export ./include/xmplay bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF svn export ./include/msinttypes bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/msinttypes --native-eol CRLF cp bin/dist.mk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/dist.mk - cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h + cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/svn_version/svn_version.h cd bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../libopenmpt-$(DIST_LIBOPENMPT_VERSION)-windows.zip --compression-method deflate -9 * .PHONY: bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip Modified: trunk/OpenMPT/build/android_ndk/Android.mk =================================================================== --- trunk/OpenMPT/build/android_ndk/Android.mk 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/build/android_ndk/Android.mk 2014-09-07 06:27:42 UTC (rev 4246) @@ -8,7 +8,7 @@ LOCAL_CPP_FEATURES += exceptions LOCAL_CPP_FEATURES += rtti -LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/common $(LOCAL_PATH)/common/svn_version_default +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/common $(LOCAL_PATH)/build/svn_version LOCAL_CFLAGS := -fvisibility=hidden -DLIBOPENMPT_BUILD -DMPT_WITH_ZLIB LOCAL_CPPFLAGS := -std=c++11 -fvisibility=hidden -DLIBOPENMPT_BUILD -DMPT_WITH_ZLIB Index: trunk/OpenMPT/build/svn_version =================================================================== --- trunk/OpenMPT/build/svn_version 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/build/svn_version 2014-09-07 06:27:42 UTC (rev 4246) Property changes on: trunk/OpenMPT/build/svn_version ___________________________________________________________________ Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Copied: trunk/OpenMPT/build/svn_version/svn_version.h (from rev 4111, trunk/OpenMPT/common/svn_version_svnversion/svn_version.h) =================================================================== --- trunk/OpenMPT/build/svn_version/svn_version.h (rev 0) +++ trunk/OpenMPT/build/svn_version/svn_version.h 2014-09-07 06:27:42 UTC (rev 4246) @@ -0,0 +1,12 @@ + +#pragma once + +#if defined(MPT_PACKAGE) +#define OPENMPT_VERSION_IS_PACKAGE true +#else +#define OPENMPT_VERSION_IS_PACKAGE false +#endif + +#if defined(MPT_SVNVERSION) +#define OPENMPT_VERSION_SVNVERSION MPT_SVNVERSION +#endif Copied: trunk/OpenMPT/build/svn_version/svn_version.template.subwcrev.h (from rev 4245, trunk/OpenMPT/common/svn_version_subwcrev/svn_version.template.h) =================================================================== --- trunk/OpenMPT/build/svn_version/svn_version.template.subwcrev.h (rev 0) +++ trunk/OpenMPT/build/svn_version/svn_version.template.subwcrev.h 2014-09-07 06:27:42 UTC (rev 4246) @@ -0,0 +1,12 @@ + +#pragma once + +#define OPENMPT_VERSION_URL "$WCURL$" +#define OPENMPT_VERSION_REVISION $WCREV$ + +#define OPENMPT_VERSION_DIRTY $WCMODS?true:false$ +#define OPENMPT_VERSION_MIXEDREVISIONS $WCMIXED?true:false$ + +#define OPENMPT_VERSION_IS_PACKAGE false + +#define OPENMPT_VERSION_DATE "$WCNOW=%Y-%m-%d %H:%M:%S$" Added: trunk/OpenMPT/build/svn_version/update_svn_version_vs.cmd =================================================================== --- trunk/OpenMPT/build/svn_version/update_svn_version_vs.cmd (rev 0) +++ trunk/OpenMPT/build/svn_version/update_svn_version_vs.cmd 2014-09-07 06:27:42 UTC (rev 4246) @@ -0,0 +1,5 @@ +@echo off +set INTDIR=%1% +mkdir %INTDIR%svn_version +subwcrev .. ..\build\svn_version\svn_version.template.subwcrev.h %INTDIR%svn_version\svn_version.h || del %INTDIR%svn_version\svn_version.h || exit 0 +exit 0 Property changes on: trunk/OpenMPT/build/svn_version/update_svn_version_vs.cmd ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-cmd \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Modified: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -40,7 +40,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../build/svn_version;../../../include" PreprocessorDefinitions="LIBOPENMPT_BUILD" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -103,7 +103,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../build/svn_version;../../../include" PreprocessorDefinitions="LIBOPENMPT_BUILD" RuntimeLibrary="0" EnableFunctionLevelLinking="true" Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/common/version.cpp 2014-09-07 06:27:42 UTC (rev 4246) @@ -13,6 +13,7 @@ #include <iomanip> #include <locale> #include <sstream> +#include <string> #include "versionNumber.h" #include "svn_version.h" @@ -117,6 +118,37 @@ { #if defined(OPENMPT_VERSION_REVISION) return OPENMPT_VERSION_REVISION; + #elif defined(OPENMPT_VERSION_SVNVERSION) + std::string svnversion = OPENMPT_VERSION_SVNVERSION; + if(svnversion.length() == 0) + { + return 0; + } + if(svnversion.find(":") != std::string::npos) + { + svnversion = svnversion.substr(svnversion.find(":") + 1); + } + if(svnversion.find("-") != std::string::npos) + { + svnversion = svnversion.substr(svnversion.find("-") + 1); + } + if(svnversion.find("M") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("M")); + } + if(svnversion.find("S") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("S")); + } + if(svnversion.find("P") != std::string::npos) + { + svnversion = svnversion.substr(0, svnversion.find("P")); + } + int revision = 0; + std::istringstream s( svnversion ); + s.imbue(std::locale::classic()); + s >> revision; + return revision; #else return 0; #endif @@ -126,6 +158,17 @@ { #if defined(OPENMPT_VERSION_DIRTY) return OPENMPT_VERSION_DIRTY; + #elif defined(OPENMPT_VERSION_SVNVERSION) + std::string svnversion = OPENMPT_VERSION_SVNVERSION; + if(svnversion.length() == 0) + { + return false; + } + if(svnversion.find("M") != std::string::npos) + { + return true; + } + return false; #else return false; #endif @@ -135,6 +178,29 @@ { #if defined(OPENMPT_VERSION_MIXEDREVISIONS) return OPENMPT_VERSION_MIXEDREVISIONS; + #elif defined(OPENMPT_VERSION_SVNVERSION) + std::string svnversion = OPENMPT_VERSION_SVNVERSION; + if(svnversion.length() == 0) + { + return false; + } + if(svnversion.find(":") != std::string::npos) + { + return true; + } + if(svnversion.find("-") != std::string::npos) + { + return true; + } + if(svnversion.find("S") != std::string::npos) + { + return true; + } + if(svnversion.find("P") != std::string::npos) + { + return true; + } + return false; #else return false; #endif @@ -169,7 +235,11 @@ std::string GetBuildDateString() { - return OPENMPT_VERSION_DATE; + #if defined(OPENMPT_VERSION_DATE) + return OPENMPT_VERSION_DATE; + #else + return __DATE__ " " __TIME__ ; + #endif } std::string GetBuildFlagsString() Modified: trunk/OpenMPT/libopenmpt/in_openmpt.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/in_openmpt.cpp 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/in_openmpt.cpp 2014-09-07 06:27:42 UTC (rev 4246) @@ -24,7 +24,11 @@ #include "libopenmpt_settings.hpp" #include "svn_version.h" +#if defined(OPENMPT_VERSION_REVISION) static char * in_openmpt_string = "in_openmpt " OPENMPT_API_VERSION_STRING "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_VERSION_REVISION); +#else +static char * in_openmpt_string = "in_openmpt " OPENMPT_API_VERSION_STRING; +#endif #define NOMINMAX #include <windows.h> Modified: trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -48,14 +48,14 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalDependencies>..\include\foobar2000sdk\foobar2000\shared\shared.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> @@ -67,7 +67,7 @@ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <AdditionalIncludeDirectories>$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -76,7 +76,7 @@ <AdditionalDependencies>..\include\foobar2000sdk\foobar2000\shared\shared.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -89,7 +89,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -97,7 +97,7 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <Lib> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> @@ -107,7 +107,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -115,7 +115,7 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <Lib> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> @@ -130,7 +130,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -142,7 +142,7 @@ <OptimizeReferences>true</OptimizeReferences> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <Lib> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> @@ -157,7 +157,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -169,7 +169,7 @@ <OptimizeReferences>true</OptimizeReferences> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <Lib> <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions> @@ -191,8 +191,6 @@ <ClInclude Include="..\common\serialization_utils.h" /> <ClInclude Include="..\common\stdafx.h" /> <ClInclude Include="..\common\StringFixer.h" /> - <ClInclude Include="..\common\svn_version_default\svn_version.h" /> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h" /> <ClInclude Include="..\common\thread.h" /> <ClInclude Include="..\common\typedefs.h" /> <ClInclude Include="..\common\version.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-09-07 06:27:42 UTC (rev 4246) @@ -179,9 +179,6 @@ <ClInclude Include="libopenmpt_version.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_default\svn_version.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\common\version.h"> <Filter>Header Files\common</Filter> </ClInclude> @@ -206,9 +203,6 @@ <ClInclude Include="..\soundlib\S3MTools.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\soundlib\Dither.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -89,7 +89,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -99,7 +99,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -110,7 +110,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -120,7 +120,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -136,7 +136,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -151,7 +151,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> @@ -164,7 +164,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -179,7 +179,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> @@ -199,8 +199,6 @@ <ClInclude Include="..\common\serialization_utils.h" /> <ClInclude Include="..\common\stdafx.h" /> <ClInclude Include="..\common\StringFixer.h" /> - <ClInclude Include="..\common\svn_version_default\svn_version.h" /> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h" /> <ClInclude Include="..\common\thread.h" /> <ClInclude Include="..\common\typedefs.h" /> <ClInclude Include="..\common\version.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-09-07 06:27:42 UTC (rev 4246) @@ -179,9 +179,6 @@ <ClInclude Include="libopenmpt_version.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_default\svn_version.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\common\version.h"> <Filter>Header Files\common</Filter> </ClInclude> @@ -206,9 +203,6 @@ <ClInclude Include="..\soundlib\S3MTools.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\soundlib\Dither.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -89,7 +89,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;$(IntDir);../common/svn_version_default;../include/modplug/include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../include/modplug/include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -99,7 +99,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -110,7 +110,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../include/modplug/include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -120,7 +120,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -136,7 +136,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;$(IntDir);../common/svn_version_default;../include/modplug/include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../include/modplug/include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -151,7 +151,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> @@ -164,7 +164,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../include/modplug/include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -179,7 +179,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -85,7 +85,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -95,7 +95,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -106,7 +106,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <PreprocessorDefinitions>LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -116,7 +116,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent> <Command> @@ -132,7 +132,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -147,7 +147,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> @@ -160,7 +160,7 @@ <MultiProcessorCompilation>true</MultiProcessorCompilation> <FloatingPointModel>Fast</FloatingPointModel> <PreprocessorDefinitions>LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..;../common;../include;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> @@ -175,7 +175,7 @@ </DelayLoadDLLs> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> <PostBuildEvent /> </ItemDefinitionGroup> @@ -195,8 +195,6 @@ <ClInclude Include="..\common\serialization_utils.h" /> <ClInclude Include="..\common\stdafx.h" /> <ClInclude Include="..\common\StringFixer.h" /> - <ClInclude Include="..\common\svn_version_default\svn_version.h" /> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h" /> <ClInclude Include="..\common\thread.h" /> <ClInclude Include="..\common\typedefs.h" /> <ClInclude Include="..\common\version.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-09-07 06:27:42 UTC (rev 4246) @@ -179,9 +179,6 @@ <ClInclude Include="libopenmpt_version.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_default\svn_version.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\common\version.h"> <Filter>Header Files\common</Filter> </ClInclude> @@ -206,9 +203,6 @@ <ClInclude Include="..\soundlib\S3MTools.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\soundlib\Dither.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2014-09-07 06:27:42 UTC (rev 4246) @@ -27,7 +27,11 @@ #include "libopenmpt_settings.hpp" #include "svn_version.h" +#if defined(OPENMPT_VERSION_REVISION) static const char * xmp_openmpt_string = "OpenMPT (" OPENMPT_API_VERSION_STRING "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_VERSION_REVISION) ")"; +#else +static const char * xmp_openmpt_string = "OpenMPT (" OPENMPT_API_VERSION_STRING ")"; +#endif #define EXPERIMENTAL_VIS Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -48,14 +48,14 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(IntDir);../common/svn_version_default;../include;../include/pugixml/src</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>../include;../include/pugixml/src;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalDependencies>..\include\foobar2000sdk\foobar2000\shared\shared.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> @@ -67,7 +67,7 @@ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <AdditionalIncludeDirectories>$(IntDir);../common/svn_version_default;../include;../include/pugixml/src</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>../include;../include/pugixml/src;$(IntDir)svn_version;../build/svn_version</AdditionalIncludeDirectories> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -76,7 +76,7 @@ <AdditionalDependencies>..\include\foobar2000sdk\foobar2000\shared\shared.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -30,7 +30,7 @@ > <Tool Name="VCPreBuildEventTool" - CommandLine="subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true" + CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\" /> <Tool Name="VCCustomBuildTool" @@ -52,7 +52,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" + AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" @@ -130,7 +130,7 @@ > <Tool Name="VCPreBuildEventTool" - CommandLine="subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true" + CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\" /> <Tool Name="VCCustomBuildTool" @@ -152,7 +152,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" + AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" @@ -231,7 +231,7 @@ > <Tool Name="VCPreBuildEventTool" - CommandLine="subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true" + CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\" /> <Tool Name="VCCustomBuildTool" @@ -254,7 +254,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="2" - AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" + AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" @@ -331,7 +331,7 @@ > <Tool Name="VCPreBuildEventTool" - CommandLine="subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true" + CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\" /> <Tool Name="VCCustomBuildTool" @@ -354,7 +354,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="2" - AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" + AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" @@ -1514,14 +1514,6 @@ > </File> <File - RelativePath="..\common\svn_version_default\svn_version.h" - > - </File> - <File - RelativePath=".\svn_version\svn_version.h" - > - </File> - <File RelativePath=".\Tables.h" > </File> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-07 06:27:42 UTC (rev 4246) @@ -124,7 +124,7 @@ <ClCompile> <AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> @@ -163,7 +163,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -175,7 +175,7 @@ <ClCompile> <AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> @@ -214,7 +214,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> @@ -227,7 +227,7 @@ <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -271,7 +271,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -283,7 +283,7 @@ <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -327,7 +327,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'"> @@ -340,7 +340,7 @@ <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -384,7 +384,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'"> @@ -396,7 +396,7 @@ <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -440,7 +440,7 @@ <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> </Manifest> <PreBuildEvent> - <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\mptrack\svn_version\svn_version.h || del ..\mptrack\svn_version\svn_version.h || true</Command> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> @@ -653,7 +653,6 @@ <ClInclude Include="..\common\Profiler.h" /> <ClInclude Include="..\common\serialization_utils.h" /> <ClInclude Include="..\common\StringFixer.h" /> - <ClInclude Include="..\common\svn_version_default\svn_version.h" /> <ClInclude Include="..\common\thread.h" /> <ClInclude Include="..\common\typedefs.h" /> <ClInclude Include="..\common\version.h" /> @@ -789,7 +788,6 @@ <ClInclude Include="StreamEncoderOpus.h" /> <ClInclude Include="StreamEncoderVorbis.h" /> <ClInclude Include="StreamEncoderWAV.h" /> - <ClInclude Include="svn_version\svn_version.h" /> <ClInclude Include="TrackerSettings.h" /> <ClInclude Include="TuningDialog.h" /> <ClInclude Include="tuningRatioMapWnd.h" /> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-07 06:11:46 UTC (rev 4245) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-07 06:27:42 UTC (rev 4246) @@ -864,9 +864,6 @@ <ClInclude Include="Reporting.h"> <Filter>Header Files\mptrack</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version_default\svn_version.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="resource.h"> <Filter>Header Files</Filter> </ClInclude> @@ -957,9 +954,6 @@ <ClInclude Include="Settings.h"> <Filter>Header Files\mptrack</Filter> </ClInclude> - <ClInclude Include="svn_version\svn_version.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\common\mptFstream.h"> <Filter>Header Files\common</Filter> </ClInclude> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 07:25:44
|
Revision: 4247 http://sourceforge.net/p/modplug/code/4247 Author: manxorist Date: 2014-09-07 07:25:36 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [Fix] build: The distributed windows source .zip file did not include pugixml sources. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/dox/changelog.md Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-07 06:27:42 UTC (rev 4246) +++ trunk/OpenMPT/Makefile 2014-09-07 07:25:36 UTC (rev 4247) @@ -755,6 +755,7 @@ svn export ./include/portaudio bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/portaudio --native-eol CRLF svn export ./include/modplug bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/modplug --native-eol CRLF svn export ./include/foobar2000sdk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/foobar2000sdk --native-eol CRLF + svn export ./include/pugixml bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/pugixml --native-eol CRLF svn export ./include/winamp bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF svn export ./include/xmplay bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF svn export ./include/msinttypes bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/msinttypes --native-eol CRLF Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-09-07 06:27:42 UTC (rev 4246) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-09-07 07:25:36 UTC (rev 4247) @@ -5,6 +5,10 @@ For fully detailed change log, please see the source repository directly. This is just a high-level summary. +### libopenmpt svn + + * [Bug] The distributed windows .zip file did not include pugixml. + ### 2014-09-06 - libopenmpt 0.2-beta6 * openmpt123: SDL is now also used by default if availble, in addition to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 07:44:05
|
Revision: 4249 http://sourceforge.net/p/modplug/code/4249 Author: manxorist Date: 2014-09-07 07:43:55 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [Reg] openmpt123: Remove support for writing WavPack files. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/README.md trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123.vcxproj trunk/OpenMPT/openmpt123/openmpt123.vcxproj.filters Removed Paths: ------------- trunk/OpenMPT/openmpt123/openmpt123_wavpack.hpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/Makefile 2014-09-07 07:43:55 UTC (rev 4249) @@ -61,7 +61,6 @@ # NO_SDL=1 Avoid using SDL, even if found # NO_PORTAUDIO=1 Avoid using PortAudio, even if found # NO_FLAC=1 Avoid using FLAC, even if found -# NO_WAVPACK=1 Avoid using WavPack, even if found # NO_SNDFILE=1 Avoid using libsndfile, even if found # # @@ -312,18 +311,6 @@ endif endif -ifeq ($(NO_WAVPACK),1) -else -#LDLIBS += -lwavpack -ifeq ($(shell pkg-config --exists wavpack && echo yes),yes) -CPPFLAGS_WAVPACK := $(shell pkg-config --cflags-only-I wavpack ) -DMPT_WITH_WAVPACK -LDFLAGS_WAVPACK := $(shell pkg-config --libs-only-L wavpack ) $(shell pkg-config --libs-only-other wavpack ) -LDLIBS_WAVPACK := $(shell pkg-config --libs-only-l wavpack ) -else -NO_WAVPACK:=1 -endif -endif - ifeq ($(NO_SNDFILE),1) else #LDLIBS += -lsndfile @@ -340,9 +327,9 @@ LDFLAGS += $(LDFLAGS_ZLIB) $(LDFLAGS_MO3) LDLIBS += $(LDLIBS_ZLIB) $(LDLIBS_MO3) -CPPFLAGS_OPENMPT123 += $(CPPFLAGS_SDL) $(CPPFLAGS_PORTAUDIO) $(CPPFLAGS_FLAC) $(CPPFLAGS_WAVPACK) $(CPPFLAGS_SNDFILE) -LDFLAGS_OPENMPT123 += $(LDFLAGS_SDL) $(LDFLAGS_PORTAUDIO) $(LDFLAGS_FLAC) $(LDFLAGS_WAVPACK) $(LDFLAGS_SNDFILE) -LDLIBS_OPENMPT123 += $(LDLIBS_SDL) $(LDLIBS_PORTAUDIO) $(LDLIBS_FLAC) $(LDLIBS_WAVPACK) $(LDLIBS_SNDFILE) +CPPFLAGS_OPENMPT123 += $(CPPFLAGS_SDL) $(CPPFLAGS_PORTAUDIO) $(CPPFLAGS_FLAC) $(CPPFLAGS_SNDFILE) +LDFLAGS_OPENMPT123 += $(LDFLAGS_SDL) $(LDFLAGS_PORTAUDIO) $(LDFLAGS_FLAC) $(LDFLAGS_SNDFILE) +LDLIBS_OPENMPT123 += $(LDLIBS_SDL) $(LDLIBS_PORTAUDIO) $(LDLIBS_FLAC) $(LDLIBS_SNDFILE) %: %.o Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/README.md 2014-09-07 07:43:55 UTC (rev 4249) @@ -108,8 +108,8 @@ The Makefile requires pkg-config for native builds. For sound output in openmpt123, PortAudio or SDL is required. - openmpt123 can optionally use libflac, libwavpack and libsndfile to - render PCM files to disk. + openmpt123 can optionally use libflac and libsndfile to render PCM + files to disk. When using gcc, run: Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-09-07 07:43:55 UTC (rev 4249) @@ -9,6 +9,15 @@ * [Bug] The distributed windows .zip file did not include pugixml. + * [Regression] openmpt123: Support for writing WavPack (.wv) files has been + removed. + Reasoning: + 1. WavPack support was incomplete and did not include support for writing + WavPack metadata at all. + 2. openmpt123 already supports libSndFile which can be used to write + uncompressed lossless WAV files which can then be encoded to whatever + format the user desires with other tools. + ### 2014-09-06 - libopenmpt 0.2-beta6 * openmpt123: SDL is now also used by default if availble, in addition to Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 07:43:55 UTC (rev 4249) @@ -56,7 +56,6 @@ * Rendering to PCM files can use: * **FLAC 1.2** or higher * **libsndfile** - * **WavPack** * **Win32** for WAVE * raw PCM has no external dependencies * **help2man** is required to build the documentation. Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 07:43:55 UTC (rev 4249) @@ -17,7 +17,6 @@ - **help2man** - **libFLAC** - **libsndfile** - - **WavPack** 3. Run: svn checkout http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/ openmpt-trunk Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 07:43:55 UTC (rev 4249) @@ -91,7 +91,6 @@ #include "openmpt123_portaudio.hpp" #include "openmpt123_sdl.hpp" #include "openmpt123_waveout.hpp" -#include "openmpt123_wavpack.hpp" namespace openmpt123 { @@ -179,10 +178,6 @@ } else if ( flags.output_extension == "flac" ) { impl = new flac_stream_raii( filename, flags, log ); #endif -#ifdef MPT_WITH_WAVPACK - } else if ( flags.output_extension == "wv" ) { - impl = new wavpack_stream_raii( filename, flags, log ); -#endif #ifdef MPT_WITH_SNDFILE } else { impl = new sndfile_stream_raii( filename, flags, log ); @@ -361,11 +356,6 @@ sndfile_info[127] = '\0'; log << " libsndfile " << sndfile_info << " <http://mega-nerd.com/libsndfile/>" << std::endl; #endif -#ifdef MPT_WITH_WAVPACK - std::ostringstream wpver; - wpver << std::hex << std::setfill('0') << std::setw(8) << WavpackGetLibraryVersion(); - log << " WavPack " << WavpackGetLibraryVersionString() << " (" << wpver.str() << ") (http://wavpack.com/)" << std::endl; -#endif log << std::endl; } Modified: trunk/OpenMPT/openmpt123/openmpt123.vcxproj =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.vcxproj 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/openmpt123/openmpt123.vcxproj 2014-09-07 07:43:55 UTC (rev 4249) @@ -171,7 +171,6 @@ <ClInclude Include="openmpt123_sndfile.hpp" /> <ClInclude Include="openmpt123_stdout.hpp" /> <ClInclude Include="openmpt123_waveout.hpp" /> - <ClInclude Include="openmpt123_wavpack.hpp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> Modified: trunk/OpenMPT/openmpt123/openmpt123.vcxproj.filters =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.vcxproj.filters 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/openmpt123/openmpt123.vcxproj.filters 2014-09-07 07:43:55 UTC (rev 4249) @@ -37,9 +37,6 @@ <ClInclude Include="openmpt123_mmio.hpp"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="openmpt123_wavpack.hpp"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="openmpt123_waveout.hpp"> <Filter>Header Files</Filter> </ClInclude> Deleted: trunk/OpenMPT/openmpt123/openmpt123_wavpack.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_wavpack.hpp 2014-09-07 07:28:20 UTC (rev 4248) +++ trunk/OpenMPT/openmpt123/openmpt123_wavpack.hpp 2014-09-07 07:43:55 UTC (rev 4249) @@ -1,127 +0,0 @@ -/* - * openmpt123_wavpack.hpp - * ---------------------- - * Purpose: libopenmpt command line player - * Notes : (currently none) - * Authors: OpenMPT Devs - * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. - */ - -#ifndef OPENMPT123_WAVPACK_HPP -#define OPENMPT123_WAVPACK_HPP - -#include "openmpt123_config.hpp" -#include "openmpt123.hpp" - -#if defined(MPT_WITH_WAVPACK) - -#include <wavpack/wavpack.h> - -namespace openmpt123 { - -#define CHECKED(x) do { \ - int err = x ; \ - if ( !err ) { \ - throw exception( WavpackGetErrorMessage( wpc ) ); \ - } \ -} while(0) - -class wavpack_stream_raii : public file_audio_stream_base { -private: - commandlineflags flags; - std::ofstream file; - WavpackContext * wpc; - WavpackConfig wpconfig; - bool first_block_seen; - std::streampos first_block_pos; - std::vector<char> first_block; - std::vector<int32_t> interleaved_buffer; - static int write_block( void * id, void * data, int32_t length ) { - return reinterpret_cast<wavpack_stream_raii*>(id)->write_block( reinterpret_cast<const char*>(data), length ) ? 1 : 0; - } - bool write_block( const char * data, std::size_t length ) { - if ( !first_block_seen ) { - first_block_pos = file.tellp(); - first_block = std::vector<char>( data, data + length ); - first_block_seen = true; - } - file.write( data, length ); - if ( !file ) { - return false; - } - return true; - } -public: - wavpack_stream_raii( const std::string & filename, const commandlineflags & flags_, std::ostream & /*log*/ ) - : flags(flags_) - , file(filename.c_str(), std::ios::binary | std::ios::trunc) - , wpc(NULL) - , wpconfig() - , first_block_seen(false) - , first_block_pos(0) - { - wpc = WavpackOpenFileOutput( write_block, this, NULL ); - wpconfig.bytes_per_sample = flags.use_float ? 4 : 2; - wpconfig.bits_per_sample = flags.use_float ? 32 : 16; - if ( flags.channels == 1 ) { - wpconfig.channel_mask = (1<<2); - } else if ( flags.channels == 2 ) { - wpconfig.channel_mask = (1<<0)|(1<<1); - } else if ( flags.channels == 3 ) { - wpconfig.channel_mask = (1<<0)|(1<<1)|(1<<8); - } else if ( flags.channels == 4 ) { - wpconfig.channel_mask = (1<<0)|(1<<1)|(1<<4)|(1<<5); - } else { - wpconfig.channel_mask = 0; - } - wpconfig.num_channels = flags.channels; - wpconfig.sample_rate = flags.samplerate; - wpconfig.flags = flags.use_float ? CONFIG_SKIP_WVX : 0; - wpconfig.float_norm_exp = flags.use_float ? 127 : 0; - CHECKED( WavpackSetConfiguration( wpc, &wpconfig, -1 ) ); - CHECKED( WavpackPackInit( wpc ) ); - } - ~wavpack_stream_raii() { - CHECKED( WavpackFlushSamples( wpc ) ); - if ( first_block_seen ) { - WavpackUpdateNumSamples( wpc, reinterpret_cast<void*>( first_block.data() ) ); - std::streampos endpos = file.tellp(); - file.seekp( first_block_pos ); - file.write( first_block.data(), first_block.size() ); - file.seekp( endpos ); - } - WavpackCloseFile( wpc ); - wpc = NULL; - } - void write( const std::vector<float*> buffers, std::size_t frames ) { - interleaved_buffer.clear(); - for ( std::size_t frame = 0; frame < frames; frame++ ) { - for ( std::size_t channel = 0; channel < buffers.size(); channel++ ) { - union { - std::uint32_t i; - float f; - } conv; - conv.f = buffers[channel][frame]; - interleaved_buffer.push_back( conv.i ); - } - } - CHECKED( WavpackPackSamples( wpc, interleaved_buffer.data(), frames ) ); - } - void write( const std::vector<std::int16_t*> buffers, std::size_t frames ) { - interleaved_buffer.clear(); - for ( std::size_t frame = 0; frame < frames; frame++ ) { - for ( std::size_t channel = 0; channel < buffers.size(); channel++ ) { - interleaved_buffer.push_back( buffers[channel][frame] ); - } - } - CHECKED( WavpackPackSamples( wpc, interleaved_buffer.data(), frames ) ); - } -}; - -#undef CHECKED - -} // namespace openmpt123 - -#endif // MPT_WITH_WAVPACK - -#endif // OPENMPT123_WAVPACK_HPP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 08:55:13
|
Revision: 4250 http://sourceforge.net/p/modplug/code/4250 Author: manxorist Date: 2014-09-07 08:55:03 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [New] build: Add autotools-based build system for libopenmpt. [Ref] test: Support 'srcdir' environment variable (required by autotools support). [Ref] test: Support separate directories for the test data and test temporary files (required by autotools support). [Ref] test: Remove temporary files after running the tests (required by autotools support). [Ref] openmpt123: Add separate --man-version and --man-help command line options that output a format suitable for generating the man page. [New] build: Add build/auto/dist.sh script that builds all distribution archives with a single invocation. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/README.md trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/libopenmpt/Doxyfile trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123_config.hpp trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h Added Paths: ----------- trunk/OpenMPT/build/auto/dist.sh trunk/OpenMPT/build/autotools/ trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/build/autotools/autoconfiscate.sh trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 trunk/OpenMPT/build/autotools/configure.ac trunk/OpenMPT/libopenmpt/libopenmpt.pc.in Property Changed: ---------------- trunk/OpenMPT/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT 2014-09-07 08:55:03 UTC (rev 4250) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:auto-props ## -10,6 +10,9 ## *.h = svn:mime-type=text/x-chdr;svn:eol-style=native *.rc = svn:mime-type=text/x-rc;svn:eol-style=CRLF +*.ac = svn:mime-type=text/x-autoconf;svn:eol-style=native +*.am = svn:mime-type=text/x-automake;svn:eol-style=native +*.in = svn:mime-type=text/x-autotools;svn:eol-style=native *.vcproj = svn:mime-type=text/x-ms-vcproj;svn:eol-style=CRLF *.vcxproj = svn:mime-type=text/x-ms-vcproj;svn:eol-style=CRLF Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/Makefile 2014-09-07 08:55:03 UTC (rev 4250) @@ -526,11 +526,13 @@ DIST_OUTPUTS += bin/dist-tar.tar DIST_OUTPUTS += bin/dist-zip.tar DIST_OUTPUTS += bin/dist-doc.tar +DIST_OUTPUTS += bin/dist-autotools.tar DIST_OUTPUTDIRS += bin/dist DIST_OUTPUTDIRS += bin/dist-doc DIST_OUTPUTDIRS += bin/dist-tar DIST_OUTPUTDIRS += bin/dist-zip +DIST_OUTPUTDIRS += bin/dist-autotools @@ -776,7 +778,7 @@ bin/openmpt123.1: bin/openmpt123$(EXESUFFIX) $(INFO) [HELP2MAN] $@ - $(SILENT)help2man --no-discard-stderr --no-info $< > $@ + $(SILENT)help2man --no-discard-stderr --no-info --version-option=--man-version --help-option=--man-help $< > $@ openmpt123/openmpt123.o: openmpt123/openmpt123.cpp $(INFO) [CXX] $< Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/README.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -53,6 +53,15 @@ ### libopenmpt and openmpt123 + - Autotools + + Grab a `libopenmpt-VERSION-autotools.tar.gz` tarball. + + ./configure + make + make check + sudo make install + - Visual Studio 2010 (express version should work, but this is not tested): - The libopenmpt solution is in `libopenmpt/libopenmpt.sln`. Added: trunk/OpenMPT/build/auto/dist.sh =================================================================== --- trunk/OpenMPT/build/auto/dist.sh (rev 0) +++ trunk/OpenMPT/build/auto/dist.sh 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -e + +# +# Dist script for libopenmpt. +# +# This is meant to be run by the libopenmpt maintainers. +# +# WARNING: The script expects the be run from the root of an OpenMPT svn +# checkout. The invests no effort in verifying this precondition. +# + +# We want ccache +export PATH="/usr/lib/ccache:$PATH" + +# Clean dist +make clean-dist + +# Check the build +make clean +make +make check +make clean + +# Build Unix-like tarball, Windows zipfile and docs tarball +make dist + +# Clean +make clean + +# Build autoconfiscated tarball +./build/autotools/autoconfiscate.sh + Property changes on: trunk/OpenMPT/build/auto/dist.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-sh \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/Makefile.am =================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am (rev 0) +++ trunk/OpenMPT/build/autotools/Makefile.am 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,476 @@ +ACLOCAL_AMFLAGS = -I m4 --install +EXTRA_DIST = +EXTRA_DIST += m4/emptydir +EXTRA_DIST += libopenmpt/libopenmpt.pc.in +EXTRA_DIST += LICENSE +EXTRA_DIST += README.md +EXTRA_DIST += Doxyfile.in +EXTRA_DIST += libopenmpt/dox/changelog.md +EXTRA_DIST += libopenmpt/dox/dependencies.md +EXTRA_DIST += libopenmpt/dox/index.dox +EXTRA_DIST += libopenmpt/dox/quickstart.md +EXTRA_DIST += libopenmpt/dox/tests.md +EXTRA_DIST += libopenmpt/dox/todo.md +EXTRA_DIST += test/test.xm +EXTRA_DIST += test/test.s3m +EXTRA_DIST += test/test.mptm +EXTRA_DIST += man/openmpt123.1 +MOSTLYCLEANFILES = + +dist_doc_DATA = +dist_doc_DATA += LICENSE +dist_doc_DATA += README.md +dist_doc_DATA += TODO +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_cxx.cpp +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c_mem.c +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c.c +dist_doc_DATA += libopenmpt/examples/libopenmpt_example_c_stdout.c + +bin_PROGRAMS = +check_PROGRAMS = +TESTS = libopenmpttest + +check_PROGRAMS += libopenmpt_example_c_stdout +if HAVE_PORTAUDIO +check_PROGRAMS += libopenmpt_example_c +check_PROGRAMS += libopenmpt_example_c_mem +check_PROGRAMS += libopenmpt_example_cxx +endif + +libopenmpt_example_c_stdout_SOURCES = libopenmpt/examples/libopenmpt_example_c_stdout.c +if HAVE_PORTAUDIO +libopenmpt_example_c_SOURCES = libopenmpt/examples/libopenmpt_example_c.c +libopenmpt_example_c_mem_SOURCES = libopenmpt/examples/libopenmpt_example_c_mem.c +libopenmpt_example_cxx_SOURCES = libopenmpt/examples/libopenmpt_example_cxx.cpp +endif + +libopenmpt_example_c_stdout_CPPFLAGS = +if HAVE_PORTAUDIO +libopenmpt_example_c_CPPFLAGS = $(PORTAUDIO_CFLAGS) +libopenmpt_example_c_mem_CPPFLAGS = $(PORTAUDIO_CFLAGS) +libopenmpt_example_cxx_CPPFLAGS = $(PORTAUDIO_CFLAGS) +endif + +libopenmpt_example_c_stdout_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +if HAVE_PORTAUDIO +libopenmpt_example_c_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +libopenmpt_example_c_mem_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +libopenmpt_example_cxx_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) +endif + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libopenmpt/libopenmpt.pc + +lib_LTLIBRARIES = libopenmpt.la +libopenmpt_la_LDFLAGS = -version-info 0:6:0 +nobase_include_HEADERS = libopenmpt/libopenmpt.h libopenmpt/libopenmpt.hpp libopenmpt/libopenmpt_version.h libopenmpt/libopenmpt_config.h libopenmpt/libopenmpt_stream_callbacks_fd.h libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpt_la_CPPFLAGS = -DLIBOPENMPT_BUILD -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) +libopenmpt_la_CXXFLAGS = $(ZLIB_CFLAGS) +libopenmpt_la_CFLAGS = $(ZLIB_CFLAGS) +libopenmpt_la_LIBADD = $(ZLIB_LIBS) +libopenmpt_la_SOURCES = +libopenmpt_la_SOURCES += build/svn_version/svn_version.h +libopenmpt_la_SOURCES += common/AudioCriticalSection.cpp +libopenmpt_la_SOURCES += common/AudioCriticalSection.h +libopenmpt_la_SOURCES += common/BuildSettings.h +libopenmpt_la_SOURCES += common/CompilerDetect.h +libopenmpt_la_SOURCES += common/Endianness.h +libopenmpt_la_SOURCES += common/FlagSet.h +libopenmpt_la_SOURCES += common/Logging.cpp +libopenmpt_la_SOURCES += common/Logging.h +libopenmpt_la_SOURCES += common/misc_util.cpp +libopenmpt_la_SOURCES += common/misc_util.h +libopenmpt_la_SOURCES += common/mptFstream.h +libopenmpt_la_SOURCES += common/mptPathString.cpp +libopenmpt_la_SOURCES += common/mptPathString.h +libopenmpt_la_SOURCES += common/mptString.cpp +libopenmpt_la_SOURCES += common/mptString.h +libopenmpt_la_SOURCES += common/mutex.h +libopenmpt_la_SOURCES += common/Profiler.cpp +libopenmpt_la_SOURCES += common/Profiler.h +libopenmpt_la_SOURCES += common/serialization_utils.cpp +libopenmpt_la_SOURCES += common/serialization_utils.h +libopenmpt_la_SOURCES += common/stdafx.cpp +libopenmpt_la_SOURCES += common/stdafx.h +libopenmpt_la_SOURCES += common/StringFixer.h +libopenmpt_la_SOURCES += common/thread.h +libopenmpt_la_SOURCES += common/typedefs.cpp +libopenmpt_la_SOURCES += common/typedefs.h +libopenmpt_la_SOURCES += common/version.cpp +libopenmpt_la_SOURCES += common/version.h +libopenmpt_la_SOURCES += common/versionNumber.h +libopenmpt_la_SOURCES += soundlib/AudioReadTarget.h +libopenmpt_la_SOURCES += soundlib/ChunkReader.h +libopenmpt_la_SOURCES += soundlib/Dither.cpp +libopenmpt_la_SOURCES += soundlib/Dither.h +libopenmpt_la_SOURCES += soundlib/Dlsbank.cpp +libopenmpt_la_SOURCES += soundlib/Dlsbank.h +libopenmpt_la_SOURCES += soundlib/Fastmix.cpp +libopenmpt_la_SOURCES += soundlib/FileReader.h +libopenmpt_la_SOURCES += soundlib/FloatMixer.h +libopenmpt_la_SOURCES += soundlib/IntMixer.h +libopenmpt_la_SOURCES += soundlib/ITCompression.cpp +libopenmpt_la_SOURCES += soundlib/ITCompression.h +libopenmpt_la_SOURCES += soundlib/ITTools.cpp +libopenmpt_la_SOURCES += soundlib/ITTools.h +libopenmpt_la_SOURCES += soundlib/Load_669.cpp +libopenmpt_la_SOURCES += soundlib/Load_amf.cpp +libopenmpt_la_SOURCES += soundlib/Load_ams.cpp +libopenmpt_la_SOURCES += soundlib/Load_dbm.cpp +libopenmpt_la_SOURCES += soundlib/Load_digi.cpp +libopenmpt_la_SOURCES += soundlib/Load_dmf.cpp +libopenmpt_la_SOURCES += soundlib/Load_dsm.cpp +libopenmpt_la_SOURCES += soundlib/Loaders.h +libopenmpt_la_SOURCES += soundlib/Load_far.cpp +libopenmpt_la_SOURCES += soundlib/Load_gdm.cpp +libopenmpt_la_SOURCES += soundlib/Load_imf.cpp +libopenmpt_la_SOURCES += soundlib/Load_it.cpp +libopenmpt_la_SOURCES += soundlib/Load_itp.cpp +libopenmpt_la_SOURCES += soundlib/load_j2b.cpp +libopenmpt_la_SOURCES += soundlib/Load_mdl.cpp +libopenmpt_la_SOURCES += soundlib/Load_med.cpp +libopenmpt_la_SOURCES += soundlib/Load_mid.cpp +libopenmpt_la_SOURCES += soundlib/Load_mo3.cpp +libopenmpt_la_SOURCES += soundlib/Load_mod.cpp +libopenmpt_la_SOURCES += soundlib/Load_mt2.cpp +libopenmpt_la_SOURCES += soundlib/Load_mtm.cpp +libopenmpt_la_SOURCES += soundlib/Load_okt.cpp +libopenmpt_la_SOURCES += soundlib/Load_psm.cpp +libopenmpt_la_SOURCES += soundlib/Load_ptm.cpp +libopenmpt_la_SOURCES += soundlib/Load_s3m.cpp +libopenmpt_la_SOURCES += soundlib/Load_stm.cpp +libopenmpt_la_SOURCES += soundlib/Load_ult.cpp +libopenmpt_la_SOURCES += soundlib/Load_umx.cpp +libopenmpt_la_SOURCES += soundlib/Load_wav.cpp +libopenmpt_la_SOURCES += soundlib/Load_xm.cpp +libopenmpt_la_SOURCES += soundlib/Message.cpp +libopenmpt_la_SOURCES += soundlib/Message.h +libopenmpt_la_SOURCES += soundlib/MIDIEvents.cpp +libopenmpt_la_SOURCES += soundlib/MIDIEvents.h +libopenmpt_la_SOURCES += soundlib/MIDIMacros.cpp +libopenmpt_la_SOURCES += soundlib/MIDIMacros.h +libopenmpt_la_SOURCES += soundlib/Mixer.h +libopenmpt_la_SOURCES += soundlib/MixerInterface.h +libopenmpt_la_SOURCES += soundlib/MixerLoops.cpp +libopenmpt_la_SOURCES += soundlib/MixerLoops.h +libopenmpt_la_SOURCES += soundlib/MixerSettings.cpp +libopenmpt_la_SOURCES += soundlib/MixerSettings.h +libopenmpt_la_SOURCES += soundlib/Mmcmp.cpp +libopenmpt_la_SOURCES += soundlib/ModChannel.cpp +libopenmpt_la_SOURCES += soundlib/ModChannel.h +libopenmpt_la_SOURCES += soundlib/modcommand.cpp +libopenmpt_la_SOURCES += soundlib/modcommand.h +libopenmpt_la_SOURCES += soundlib/ModInstrument.cpp +libopenmpt_la_SOURCES += soundlib/ModInstrument.h +libopenmpt_la_SOURCES += soundlib/ModSample.cpp +libopenmpt_la_SOURCES += soundlib/ModSample.h +libopenmpt_la_SOURCES += soundlib/ModSequence.cpp +libopenmpt_la_SOURCES += soundlib/ModSequence.h +libopenmpt_la_SOURCES += soundlib/modsmp_ctrl.cpp +libopenmpt_la_SOURCES += soundlib/modsmp_ctrl.h +libopenmpt_la_SOURCES += soundlib/mod_specifications.cpp +libopenmpt_la_SOURCES += soundlib/mod_specifications.h +libopenmpt_la_SOURCES += soundlib/patternContainer.cpp +libopenmpt_la_SOURCES += soundlib/patternContainer.h +libopenmpt_la_SOURCES += soundlib/pattern.cpp +libopenmpt_la_SOURCES += soundlib/pattern.h +libopenmpt_la_SOURCES += soundlib/Resampler.h +libopenmpt_la_SOURCES += soundlib/RowVisitor.cpp +libopenmpt_la_SOURCES += soundlib/RowVisitor.h +libopenmpt_la_SOURCES += soundlib/S3MTools.cpp +libopenmpt_la_SOURCES += soundlib/S3MTools.h +libopenmpt_la_SOURCES += soundlib/SampleFormatConverters.h +libopenmpt_la_SOURCES += soundlib/SampleFormat.h +libopenmpt_la_SOURCES += soundlib/SampleFormats.cpp +libopenmpt_la_SOURCES += soundlib/SampleIO.cpp +libopenmpt_la_SOURCES += soundlib/SampleIO.h +libopenmpt_la_SOURCES += soundlib/Snd_defs.h +libopenmpt_la_SOURCES += soundlib/Sndfile.cpp +libopenmpt_la_SOURCES += soundlib/Sndfile.h +libopenmpt_la_SOURCES += soundlib/Snd_flt.cpp +libopenmpt_la_SOURCES += soundlib/Snd_fx.cpp +libopenmpt_la_SOURCES += soundlib/Sndmix.cpp +libopenmpt_la_SOURCES += soundlib/SoundFilePlayConfig.cpp +libopenmpt_la_SOURCES += soundlib/SoundFilePlayConfig.h +libopenmpt_la_SOURCES += soundlib/Tables.cpp +libopenmpt_la_SOURCES += soundlib/Tables.h +libopenmpt_la_SOURCES += soundlib/Tagging.cpp +libopenmpt_la_SOURCES += soundlib/Tagging.h +libopenmpt_la_SOURCES += soundlib/tuningbase.cpp +libopenmpt_la_SOURCES += soundlib/tuningbase.h +libopenmpt_la_SOURCES += soundlib/tuningCollection.cpp +libopenmpt_la_SOURCES += soundlib/tuningcollection.h +libopenmpt_la_SOURCES += soundlib/tuning.cpp +libopenmpt_la_SOURCES += soundlib/tuning.h +libopenmpt_la_SOURCES += soundlib/Wav.h +libopenmpt_la_SOURCES += soundlib/WAVTools.cpp +libopenmpt_la_SOURCES += soundlib/WAVTools.h +libopenmpt_la_SOURCES += soundlib/WindowedFIR.cpp +libopenmpt_la_SOURCES += soundlib/WindowedFIR.h +libopenmpt_la_SOURCES += soundlib/XMTools.cpp +libopenmpt_la_SOURCES += soundlib/XMTools.h +libopenmpt_la_SOURCES += soundlib/plugins/PlugInterface.h +libopenmpt_la_SOURCES += soundlib/Tunings/built-inTunings.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_c.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_cxx.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_ext.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_impl.cpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_config.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_ext.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_impl.hpp +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_internal.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_stream_callbacks_fd.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpt_la_SOURCES += libopenmpt/libopenmpt_version.h + +check_PROGRAMS += libopenmpttest +libopenmpttest_CPPFLAGS = -DLIBOPENMPT_BUILD -DLIBOPENMPT_BUILD_TEST -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) +libopenmpttest_CXXFLAGS = $(ZLIB_CFLAGS) +libopenmpttest_CFLAGS = $(ZLIB_CFLAGS) +libopenmpttest_LDADD = $(ZLIB_LIBS) +libopenmpttest_SOURCES = +libopenmpttest_SOURCES += libopenmpt/libopenmpt_test.cpp +libopenmpttest_SOURCES += test/test.cpp +libopenmpttest_SOURCES += test/test.h +libopenmpttest_SOURCES += test/TestTools.h +libopenmpttest_SOURCES += test/TestToolsLib.cpp +libopenmpttest_SOURCES += test/TestToolsLib.h +libopenmpttest_SOURCES += test/TestToolsTracker.h +libopenmpttest_SOURCES += build/svn_version/svn_version.h +libopenmpttest_SOURCES += common/AudioCriticalSection.cpp +libopenmpttest_SOURCES += common/AudioCriticalSection.h +libopenmpttest_SOURCES += common/BuildSettings.h +libopenmpttest_SOURCES += common/CompilerDetect.h +libopenmpttest_SOURCES += common/Endianness.h +libopenmpttest_SOURCES += common/FlagSet.h +libopenmpttest_SOURCES += common/Logging.cpp +libopenmpttest_SOURCES += common/Logging.h +libopenmpttest_SOURCES += common/misc_util.cpp +libopenmpttest_SOURCES += common/misc_util.h +libopenmpttest_SOURCES += common/mptFstream.h +libopenmpttest_SOURCES += common/mptPathString.cpp +libopenmpttest_SOURCES += common/mptPathString.h +libopenmpttest_SOURCES += common/mptString.cpp +libopenmpttest_SOURCES += common/mptString.h +libopenmpttest_SOURCES += common/mutex.h +libopenmpttest_SOURCES += common/Profiler.cpp +libopenmpttest_SOURCES += common/Profiler.h +libopenmpttest_SOURCES += common/serialization_utils.cpp +libopenmpttest_SOURCES += common/serialization_utils.h +libopenmpttest_SOURCES += common/stdafx.cpp +libopenmpttest_SOURCES += common/stdafx.h +libopenmpttest_SOURCES += common/StringFixer.h +libopenmpttest_SOURCES += common/thread.h +libopenmpttest_SOURCES += common/typedefs.cpp +libopenmpttest_SOURCES += common/typedefs.h +libopenmpttest_SOURCES += common/version.cpp +libopenmpttest_SOURCES += common/version.h +libopenmpttest_SOURCES += common/versionNumber.h +libopenmpttest_SOURCES += soundlib/AudioReadTarget.h +libopenmpttest_SOURCES += soundlib/ChunkReader.h +libopenmpttest_SOURCES += soundlib/Dither.cpp +libopenmpttest_SOURCES += soundlib/Dither.h +libopenmpttest_SOURCES += soundlib/Dlsbank.cpp +libopenmpttest_SOURCES += soundlib/Dlsbank.h +libopenmpttest_SOURCES += soundlib/Fastmix.cpp +libopenmpttest_SOURCES += soundlib/FileReader.h +libopenmpttest_SOURCES += soundlib/FloatMixer.h +libopenmpttest_SOURCES += soundlib/IntMixer.h +libopenmpttest_SOURCES += soundlib/ITCompression.cpp +libopenmpttest_SOURCES += soundlib/ITCompression.h +libopenmpttest_SOURCES += soundlib/ITTools.cpp +libopenmpttest_SOURCES += soundlib/ITTools.h +libopenmpttest_SOURCES += soundlib/Load_669.cpp +libopenmpttest_SOURCES += soundlib/Load_amf.cpp +libopenmpttest_SOURCES += soundlib/Load_ams.cpp +libopenmpttest_SOURCES += soundlib/Load_dbm.cpp +libopenmpttest_SOURCES += soundlib/Load_digi.cpp +libopenmpttest_SOURCES += soundlib/Load_dmf.cpp +libopenmpttest_SOURCES += soundlib/Load_dsm.cpp +libopenmpttest_SOURCES += soundlib/Loaders.h +libopenmpttest_SOURCES += soundlib/Load_far.cpp +libopenmpttest_SOURCES += soundlib/Load_gdm.cpp +libopenmpttest_SOURCES += soundlib/Load_imf.cpp +libopenmpttest_SOURCES += soundlib/Load_it.cpp +libopenmpttest_SOURCES += soundlib/Load_itp.cpp +libopenmpttest_SOURCES += soundlib/load_j2b.cpp +libopenmpttest_SOURCES += soundlib/Load_mdl.cpp +libopenmpttest_SOURCES += soundlib/Load_med.cpp +libopenmpttest_SOURCES += soundlib/Load_mid.cpp +libopenmpttest_SOURCES += soundlib/Load_mo3.cpp +libopenmpttest_SOURCES += soundlib/Load_mod.cpp +libopenmpttest_SOURCES += soundlib/Load_mt2.cpp +libopenmpttest_SOURCES += soundlib/Load_mtm.cpp +libopenmpttest_SOURCES += soundlib/Load_okt.cpp +libopenmpttest_SOURCES += soundlib/Load_psm.cpp +libopenmpttest_SOURCES += soundlib/Load_ptm.cpp +libopenmpttest_SOURCES += soundlib/Load_s3m.cpp +libopenmpttest_SOURCES += soundlib/Load_stm.cpp +libopenmpttest_SOURCES += soundlib/Load_ult.cpp +libopenmpttest_SOURCES += soundlib/Load_umx.cpp +libopenmpttest_SOURCES += soundlib/Load_wav.cpp +libopenmpttest_SOURCES += soundlib/Load_xm.cpp +libopenmpttest_SOURCES += soundlib/Message.cpp +libopenmpttest_SOURCES += soundlib/Message.h +libopenmpttest_SOURCES += soundlib/MIDIEvents.cpp +libopenmpttest_SOURCES += soundlib/MIDIEvents.h +libopenmpttest_SOURCES += soundlib/MIDIMacros.cpp +libopenmpttest_SOURCES += soundlib/MIDIMacros.h +libopenmpttest_SOURCES += soundlib/Mixer.h +libopenmpttest_SOURCES += soundlib/MixerInterface.h +libopenmpttest_SOURCES += soundlib/MixerLoops.cpp +libopenmpttest_SOURCES += soundlib/MixerLoops.h +libopenmpttest_SOURCES += soundlib/MixerSettings.cpp +libopenmpttest_SOURCES += soundlib/MixerSettings.h +libopenmpttest_SOURCES += soundlib/Mmcmp.cpp +libopenmpttest_SOURCES += soundlib/ModChannel.cpp +libopenmpttest_SOURCES += soundlib/ModChannel.h +libopenmpttest_SOURCES += soundlib/modcommand.cpp +libopenmpttest_SOURCES += soundlib/modcommand.h +libopenmpttest_SOURCES += soundlib/ModInstrument.cpp +libopenmpttest_SOURCES += soundlib/ModInstrument.h +libopenmpttest_SOURCES += soundlib/ModSample.cpp +libopenmpttest_SOURCES += soundlib/ModSample.h +libopenmpttest_SOURCES += soundlib/ModSequence.cpp +libopenmpttest_SOURCES += soundlib/ModSequence.h +libopenmpttest_SOURCES += soundlib/modsmp_ctrl.cpp +libopenmpttest_SOURCES += soundlib/modsmp_ctrl.h +libopenmpttest_SOURCES += soundlib/mod_specifications.cpp +libopenmpttest_SOURCES += soundlib/mod_specifications.h +libopenmpttest_SOURCES += soundlib/patternContainer.cpp +libopenmpttest_SOURCES += soundlib/patternContainer.h +libopenmpttest_SOURCES += soundlib/pattern.cpp +libopenmpttest_SOURCES += soundlib/pattern.h +libopenmpttest_SOURCES += soundlib/Resampler.h +libopenmpttest_SOURCES += soundlib/RowVisitor.cpp +libopenmpttest_SOURCES += soundlib/RowVisitor.h +libopenmpttest_SOURCES += soundlib/S3MTools.cpp +libopenmpttest_SOURCES += soundlib/S3MTools.h +libopenmpttest_SOURCES += soundlib/SampleFormatConverters.h +libopenmpttest_SOURCES += soundlib/SampleFormat.h +libopenmpttest_SOURCES += soundlib/SampleFormats.cpp +libopenmpttest_SOURCES += soundlib/SampleIO.cpp +libopenmpttest_SOURCES += soundlib/SampleIO.h +libopenmpttest_SOURCES += soundlib/Snd_defs.h +libopenmpttest_SOURCES += soundlib/Sndfile.cpp +libopenmpttest_SOURCES += soundlib/Sndfile.h +libopenmpttest_SOURCES += soundlib/Snd_flt.cpp +libopenmpttest_SOURCES += soundlib/Snd_fx.cpp +libopenmpttest_SOURCES += soundlib/Sndmix.cpp +libopenmpttest_SOURCES += soundlib/SoundFilePlayConfig.cpp +libopenmpttest_SOURCES += soundlib/SoundFilePlayConfig.h +libopenmpttest_SOURCES += soundlib/Tables.cpp +libopenmpttest_SOURCES += soundlib/Tables.h +libopenmpttest_SOURCES += soundlib/Tagging.cpp +libopenmpttest_SOURCES += soundlib/Tagging.h +libopenmpttest_SOURCES += soundlib/tuningbase.cpp +libopenmpttest_SOURCES += soundlib/tuningbase.h +libopenmpttest_SOURCES += soundlib/tuningCollection.cpp +libopenmpttest_SOURCES += soundlib/tuningcollection.h +libopenmpttest_SOURCES += soundlib/tuning.cpp +libopenmpttest_SOURCES += soundlib/tuning.h +libopenmpttest_SOURCES += soundlib/Wav.h +libopenmpttest_SOURCES += soundlib/WAVTools.cpp +libopenmpttest_SOURCES += soundlib/WAVTools.h +libopenmpttest_SOURCES += soundlib/WindowedFIR.cpp +libopenmpttest_SOURCES += soundlib/WindowedFIR.h +libopenmpttest_SOURCES += soundlib/XMTools.cpp +libopenmpttest_SOURCES += soundlib/XMTools.h +libopenmpttest_SOURCES += soundlib/plugins/PlugInterface.h +libopenmpttest_SOURCES += soundlib/Tunings/built-inTunings.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_c.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_cxx.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_ext.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_impl.cpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_config.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_ext.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_impl.hpp +libopenmpttest_SOURCES += libopenmpt/libopenmpt_internal.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_stream_callbacks_fd.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_stream_callbacks_file.h +libopenmpttest_SOURCES += libopenmpt/libopenmpt_version.h + +bin_PROGRAMS += openmpt123 +openmpt123_CPPFLAGS = -I$(srcdir)/src/openmpt123 $(PORTAUDIO_CFLAGS) $(SDL_CFLAGS) $(SNDFILE_CFLAGS) $(FLAC_CFLAGS) +openmpt123_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) +openmpt123_SOURCES = +openmpt123_SOURCES += src/openmpt123/openmpt123_config.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123.cpp +openmpt123_SOURCES += src/openmpt123/openmpt123_flac.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_mmio.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_portaudio.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_raw.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_sdl.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_sndfile.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_stdout.hpp +openmpt123_SOURCES += src/openmpt123/openmpt123_waveout.hpp +#bin_PROGRAMS += openmpt123 +#openmpt123_CPPFLAGS = -I$(srcdir)/src/openmpt123 $(PORTAUDIO_CFLAGS) $(SDL_CFLAGS) $(SNDFILE_CFLAGS) $(FLAC_CFLAGS) +#openmpt123_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) +#openmpt123_SOURCES = +#openmpt123_SOURCES += openmpt123/openmpt123_config.hpp +#openmpt123_SOURCES += openmpt123/openmpt123.cpp +#openmpt123_SOURCES += openmpt123/openmpt123_flac.hpp +#openmpt123_SOURCES += openmpt123/openmpt123.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_mmio.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_portaudio.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_raw.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_sdl.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_sndfile.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_stdout.hpp +#openmpt123_SOURCES += openmpt123/openmpt123_waveout.hpp + +man1_MANS = man/openmpt123.1 + +#$(man3_MANS): doxygen-doc +MOSTLYCLEANFILES += $(DX_CLEANFILES) + +if DX_COND_doc + +all-local: @DX_DOCDIR@/@PACKAGE@.tag + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(docdir)/html/search + ( cd @DX_DOCDIR@ && \ + for f in `find html -type f \! -name "installdox"`; do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ + done ) + +clean-local: + $(RM) -r html + $(RM) -r man + $(RM) @DX_DOCDIR@/@PACKAGE@.tag + +uninstall-local: + $(RM) -r $(DESTDIR)$(docdir)/html + +if DX_COND_html +DX_CLEAN_HTML = @DX_DOCDIR@/html +endif DX_COND_html + +if DX_COND_man +DX_CLEAN_MAN = @DX_DOCDIR@/man +endif DX_COND_man + +.PHONY: doxygen-run doxygen-doc + +.INTERMEDIATE: doxygen-run + +doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag + +doxygen-doc: doxygen-run + +@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) + rm -rf @DX_DOCDIR@ + $(DX_ENV) $(DX_DOXYGEN) $(DX_CONFIG) + touch $@ + +DX_CLEANFILES = @DX_DOCDIR@/@PACKAGE@.tag -r $(DX_CLEAN_HTML) $(DX_CLEAN_MAN) + +endif DX_COND_doc + Property changes on: trunk/OpenMPT/build/autotools/Makefile.am ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-makefile \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/autoconfiscate.sh =================================================================== --- trunk/OpenMPT/build/autotools/autoconfiscate.sh (rev 0) +++ trunk/OpenMPT/build/autotools/autoconfiscate.sh 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +set -e + +# +# This script autoconficates the libopenmpt source tree and builds an +# autotools-based release tarball. +# +# WARNING: The script expects the be run from the root of an OpenMPT svn +# checkout. The invests no effort in verifying this precondition. +# + +echo "Cleaning local buid ..." +make clean + +echo "Cleaning dist-autotools.tar ..." +rm -rf bin/dist-autotools.tar || true + +echo "Cleaning tmp directory ..." +if [ -e bin/dist-autotools ]; then + chmod -R u+rw bin/dist-autotools || true +fi +rm -rf bin/dist-autotools || true + +echo "Making tmp directory ..." +mkdir bin/dist-autotools + +echo "Exporting svn ..." +svn export ./LICENSE bin/dist-autotools/LICENSE +svn export ./README.md bin/dist-autotools/README.md +svn export ./TODO bin/dist-autotools/TODO +svn export ./common bin/dist-autotools/common +svn export ./soundlib bin/dist-autotools/soundlib +svn export ./test bin/dist-autotools/test +svn export ./libopenmpt bin/dist-autotools/libopenmpt +mkdir bin/dist-autotools/src +svn export ./openmpt123 bin/dist-autotools/src/openmpt123 +#svn export ./openmpt123 bin/dist-autotools/openmpt123 +mkdir bin/dist-autotools/build +mkdir bin/dist-autotools/build/svn_version +svn export ./build/svn_version/svn_version.h bin/dist-autotools/build/svn_version/svn_version.h +mkdir bin/dist-autotools/m4 +touch bin/dist-autotools/m4/emptydir +svn export ./build/autotools/configure.ac bin/dist-autotools/configure.ac +svn export ./build/autotools/Makefile.am bin/dist-autotools/Makefile.am +svn export ./build/autotools/ax_cxx_compile_stdcxx_11.m4 bin/dist-autotools/m4/ax_cxx_compile_stdcxx_11.m4 + +echo "Querying svn version ..." +BUILD_SVNVERSION="$(svnversion -n . | tr ':' '-' )" + +echo "Building man pages ..." +make bin/openmpt123.1 + +echo "Copying man pages ..." +mkdir bin/dist-autotools/man +cp bin/openmpt123.1 bin/dist-autotools/man/openmpt123.1 + +echo "Cleaning local buid ..." +make clean + +echo "Changing to autotools package directory ..." +OLDDIR="$(pwd)" +cd bin/dist-autotools/ + +echo "Setting version in configure.ac ..." +cat configure.ac | sed "s/!!MPT_SVNVERSION!!/${BUILD_SVNVERSION}/g" > configure.ac.tmp && mv configure.ac.tmp configure.ac +cat configure.ac | sed "s/!!MPT_PACKAGE!!/true/g" > configure.ac.tmp && mv configure.ac.tmp configure.ac + +echo "Generating 'Doxyfile.in' ..." +( cat libopenmpt/Doxyfile | grep -v '^PROJECT_NUMBER' | sed 's/INPUT += /INPUT += @top_srcdir@\//g' > Doxyfile.in ) && ( echo "PROJECT_NUMBER = @PACKAGE_VERSION@" >> Doxyfile.in ) && rm libopenmpt/Doxyfile +echo "OUTPUT_DIRECTORY = doxygen-doc" >> Doxyfile.in + +echo "Running 'autoreconf -i' ..." +autoreconf -i + +echo "Running './configure' ..." +./configure + +echo "Running 'make dist' ..." +make dist + +echo "Running 'make distcheck' ..." +make distcheck + +echo "Running 'make' ..." +make + +echo "Running 'make check' ..." +make check + +echo "Building dist-autotools.tar ..." +cd "$OLDDIR" +cd bin/dist-autotools +tar cvf dist-autotools.tar *.tar.gz +cd ../.. +mv bin/dist-autotools/dist-autotools.tar bin/ + Property changes on: trunk/OpenMPT/build/autotools/autoconfiscate.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-sh \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 =================================================================== --- trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 (rev 0) +++ trunk/OpenMPT/build/autotools/ax_cxx_compile_stdcxx_11.m4 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,142 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the C++11 +# standard; if necessary, add switches to CXXFLAGS to enable support. +# +# The first argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The second argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline C++11 support is required and that the macro +# should error out if no mode with that support is found. If specified +# 'optional', then configuration proceeds regardless, after defining +# HAVE_CXX11 if and only if a supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik <bk...@re...> +# Copyright (c) 2012 Zack Weinberg <za...@pa...> +# Copyright (c) 2013 Roy Stogner <roy...@ic...> +# Copyright (c) 2014 Alexey Sokolov <so...@go...> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template <typename T> + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() override {} + }; + + typedef check<check<bool>> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check<int> check_type; + check_type c; + check_type&& cr = static_cast<check_type&&>(c); + + auto d = a; + auto l = [](){}; +]]) + +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl + m4_if([$1], [], [], + [$1], [ext], [], + [$1], [noext], [], + [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl + m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], + [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], + [$2], [optional], [ax_cxx_compile_cxx11_required=false], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + m4_if([$1], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++11 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + + m4_if([$1], [ext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) + fi + else + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) + fi +]) Added: trunk/OpenMPT/build/autotools/configure.ac =================================================================== --- trunk/OpenMPT/build/autotools/configure.ac (rev 0) +++ trunk/OpenMPT/build/autotools/configure.ac 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,90 @@ +AC_INIT([libopenmpt], [0.2.!!MPT_SVNVERSION!!-autotools], [http://bugs.openmpt.org/], [libopenmpt], [http://lib.openmpt.org/]) +AC_PREREQ([2.68]) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_FILES([Makefile libopenmpt/libopenmpt.pc Doxyfile]) + +AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign subdir-objects]) + +AM_PROG_AR + +LT_INIT + +AC_SYS_LARGEFILE + +PKG_PROG_PKG_CONFIG([0.24]) +AC_PROG_CC +#AM_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_INSTALL + +AC_DEFINE([MPT_SVNVERSION], ["!!MPT_SVNVERSION!!"], [svn version]) +AC_DEFINE([MPT_PACKAGE], [!!MPT_PACKAGE!!], [is package]) + +# Required libopenmpt dependency: zlib +PKG_CHECK_MODULES([ZLIB], [zlib], AC_DEFINE([MPT_WITH_ZLIB], [], [with libz])) + +# Optional openmpt123 dependency: PortAudio, try SDL if PortAudio is unavailable +PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0], + [ + have_portaudio=1 + AC_DEFINE([MPT_WITH_PORTAUDIO], [], [with libportaudio]) + ], + [ + have_portaudio=0 + PKG_CHECK_MODULES([SDL], [sdl], + [AC_DEFINE([MPT_WITH_SDL], [], [with libsdl])], + [AC_MSG_WARN([Neither PORTAUDIO nor SDL is available. openmpt123 will be built without realtime audio output.])] + ) + ] +) +AM_CONDITIONAL([HAVE_PORTAUDIO], [test x$have_portaudio = x1]) + +# Optional openmpt123 dependency: libsndfile +PKG_CHECK_MODULES([SNDFILE], [sndfile], [AC_DEFINE([MPT_WITH_SNDFILE], [], [with libsndfile])], [AC_MSG_NOTICE([SNDFILE not found])]) + +# Optional openmpt123 dependency: libFLAC +PKG_CHECK_MODULES([FLAC], [flac], [AC_DEFINE([MPT_WITH_FLAC], [], [with libflac])], [AC_MSG_NOTICE([FLAC not found])]) + +# We want a modern C compiler +AC_PROG_CC_STDC +#AC_PROG_CC_C99 +#AC_LANG_PUSH([C]) +#AX_CHECK_COMPILE_FLAG([-std=c++0x], [CFLAGS="$CFLAGS -std=c99"]) +#AC_LANG_POP([C]) + +# We need basic C++11 support (implementing C++03TR2 features in namespace std::) +AX_CXX_COMPILE_STDCXX_11([noext],[optional]) +AC_LANG_PUSH([C++]) +# Even if AX_CXX_COMPILE_STDCXX_11 fails, std=c++0x on older GCC and Clang compilers enables enough of C++11 for libopenmpt to build. +AS_IF([test "x$HAVE_CXX11" = x0], [AX_CHECK_COMPILE_FLAG([-std=c++0x], [CXXFLAGS="$CXXFLAGS -std=c++0x"])]) +AC_LANG_POP([C++]) + +AC_LANG_PUSH([C]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CFLAGS="$CFLAGS -fvisibility=hidden"]) +AX_CFLAGS_WARN_ALL +AC_LANG_POP([C]) + +AC_LANG_PUSH([C++]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CXXFLAGS="$CXXFLAGS -fvisibility=hidden"]) +AX_CXXFLAGS_WARN_ALL +AC_LANG_POP([C++]) + +DX_DOXYGEN_FEATURE(ON) +DX_DOT_FEATURE(OFF) +DX_HTML_FEATURE(ON) +DX_MAN_FEATURE(ON) + +DX_CHM_FEATURE(OFF) +DX_CHI_FEATURE(OFF) +DX_RTF_FEATURE(OFF) +DX_XML_FEATURE(OFF) +DX_PDF_FEATURE(OFF) +DX_PS_FEATURE(OFF) + +DX_INIT_DOXYGEN([libopenmpt], [Doxyfile], [doxygen-doc]) + +AC_OUTPUT + Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/common/BuildSettings.h 2014-09-07 08:55:03 UTC (rev 4250) @@ -147,6 +147,11 @@ #elif defined(LIBOPENMPT_BUILD) +#if defined(HAVE_CONFIG_H) +// wrapper for autoconf macros +#include "config.h" +#endif // HAVE_CONFIG_H + #if defined(LIBOPENMPT_BUILD_TEST) #define ENABLE_TESTS #else Modified: trunk/OpenMPT/libopenmpt/Doxyfile =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/Doxyfile 2014-09-07 08:55:03 UTC (rev 4250) @@ -733,21 +733,20 @@ # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = \ - libopenmpt/dox/index.dox \ - libopenmpt/dox/quickstart.md \ - README.md \ - libopenmpt/dox/dependencies.md \ - libopenmpt/dox/tests.md \ - libopenmpt/dox/changelog.md \ - libopenmpt/dox/todo.md \ - libopenmpt/libopenmpt.hpp \ - libopenmpt/libopenmpt.h \ - libopenmpt/libopenmpt_stream_callbacks_fd.h \ - libopenmpt/libopenmpt_stream_callbacks_file.h \ - libopenmpt/libopenmpt_config.h \ - libopenmpt/libopenmpt_version.h \ - +INPUT = +INPUT += libopenmpt/dox/index.dox +INPUT += libopenmpt/dox/quickstart.md +INPUT += README.md +INPUT += libopenmpt/dox/dependencies.md +INPUT += libopenmpt/dox/tests.md +INPUT += libopenmpt/dox/changelog.md +INPUT += libopenmpt/dox/todo.md +INPUT += libopenmpt/libopenmpt.hpp +INPUT += libopenmpt/libopenmpt.h +INPUT += libopenmpt/libopenmpt_stream_callbacks_fd.h +INPUT += libopenmpt/libopenmpt_stream_callbacks_file.h +INPUT += libopenmpt/libopenmpt_config.h +INPUT += libopenmpt/libopenmpt_version.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1022,7 +1021,7 @@ # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = +HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -23,6 +23,10 @@ * Building on Unix-like systems requires: * **GNU make** * **pkg-config** + * The Autotools-based build system requires: + * **pkg-config 0.24** or higher + * **zlib** + * **doxygen** ### openmpt123 Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2014-09-07 08:55:03 UTC (rev 4250) @@ -3,6 +3,38 @@ =========== +### Autotools-based + + 1. Grab a `libopenmpt-autotools.VERSION.tar.gz` tarball. + 2. Get dependencies: + - **gcc >= 4.4** or **clang >= 3.0** + - **pkg-config >= 0.24** + - **zlib** + - **doxygen >= 1.8** + 3. *Optional*: + - **portaudio-v19** + - **libSDL == 1.2.x** + - **libFLAC** + - **libsndfile** + 4. Run: + + ./configure + make + make check + sudo make install + +### Windows + + 1. Get dependencies: + - **Microsoft Visual Studio 2010** + 2. *Optionally* get dependencies: + - **Winamp SDK** + - **XMPlay SDK** + 3. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . + 4. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. + 5. Select appropriate configuration and build. Binaries are generated in `bin\` + 6. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. + ### Unix-like 1. Get dependencies: @@ -29,15 +61,3 @@ sudo make install-doc # installs into /usr/local by default openmpt123 $SOMEMODULE -### Windows - - 1. Get dependencies: - - **Microsoft Visual Studio 2010** - 2. *Optionally* get dependencies: - - **Winamp SDK** - - **XMPlay SDK** - 3. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . - 4. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. - 5. Select appropriate configuration and build. Binaries are generated in `bin\` - 6. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. - Added: trunk/OpenMPT/libopenmpt/libopenmpt.pc.in =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.pc.in (rev 0) +++ trunk/OpenMPT/libopenmpt/libopenmpt.pc.in 2014-09-07 08:55:03 UTC (rev 4250) @@ -0,0 +1,12 @@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: libopenmpt +Description: Tracker module player based on OpenMPT +Version: @VERSION@ +Libs: -L${libdir} -lopenmpt +Libs.private: zlib +Cflags: -I${includedir} Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -18,6 +18,7 @@ #include <locale> #include <clocale> +#include <cstdlib> using namespace OpenMPT; @@ -28,20 +29,29 @@ // mingw64 does only default to special C linkage for "main", but not for "wmain". extern "C" #endif -int wmain( int /*wargc*/, wchar_t * /*wargv*/ [] ) { +int wmain( int /*argc*/ , wchar_t * /*argv*/ [] ) { #else -int main( int /*argc*/, char * /*argv*/ [] ) { +int main( int /*argc*/ , char * /*argv*/ [] ) { #endif try { + + // prefix for test suite + std::string pathprefix = std::string(); + + // set path prefix for test files (if provided) + std::string env_srcdir = std::getenv( "srcdir" ) ? std::getenv( "srcdir" ) : std::string(); + if ( !env_srcdir.empty() ) { + pathprefix = env_srcdir; + } // run test with "C" / classic() locale - Test::DoTests(); + Test::DoTests( pathprefix ); // try setting the C locale to the user locale setlocale( LC_ALL, "" ); // run all tests again with a set C locale - Test::DoTests(); + Test::DoTests( pathprefix ); // try to set the C and C++ locales to the user locale try { @@ -52,7 +62,7 @@ } // and now, run all tests once again - Test::DoTests(); + Test::DoTests( pathprefix ); } catch ( const std::exception & e ) { std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl; Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -106,6 +106,14 @@ show_credits_exception() throw() { } }; +struct show_man_version_exception : public std::exception { + show_man_version_exception() throw() { } +}; + +struct show_man_help_exception : public std::exception { + show_man_help_exception() throw() { } +}; + struct show_short_version_number_exception : public std::exception { show_short_version_number_exception() throw() { } }; @@ -359,6 +367,10 @@ log << std::endl; } +static void show_man_version( textout & log ) { + log << "openmpt123" << " v" << OPENMPT123_VERSION_STRING << ", " << "Copyright (c) 2013-2014 OpenMPT developers <http://openmpt.org/>" << std::endl; +} + static void show_short_version( textout & log ) { log << OPENMPT123_VERSION_STRING << " / " << openmpt::string::get( openmpt::string::library_version ) << " / " << openmpt::string::get( openmpt::string::core_version ) << std::endl; log.writeout(); @@ -404,8 +416,10 @@ return str.str(); } -static void show_help( textout & log, bool longhelp = false, const std::string & message = std::string() ) { - show_info( log, false ); +static void show_help( textout & log, bool with_info = true, bool longhelp = false, const std::string & message = std::string() ) { + if ( with_info ) { + show_info( log, false ); + } { log << "Usage: openmpt123 [options] [--] file1 [file2] ..." << std::endl; log << std::endl; @@ -1434,6 +1448,10 @@ flags.quiet = true; } else if ( arg == "-v" || arg == "--verbose" ) { flags.verbose = true; + } else if ( arg == "--man-version" ) { + throw show_man_version_exception(); + } else if ( arg == "--man-help" ) { + throw show_man_help_exception(); } else if ( arg == "--version" ) { throw show_version_number_exception(); } else if ( arg == "--short-version" ) { @@ -1661,8 +1679,14 @@ } catch ( args_error_exception & ) { show_help( std_out ); return 1; + } catch ( show_man_help_exception & e ) { + show_help( std_out, false, true ); + return 0; + } catch ( show_man_version_exception & e ) { + show_man_version( std_out ); + return 0; } catch ( show_help_exception & e ) { - show_help( std_out, e.longhelp, e.message ); + show_help( std_out, true, e.longhelp, e.message ); if ( flags.verbose ) { show_credits( std_out ); } Modified: trunk/OpenMPT/openmpt123/openmpt123_config.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -10,6 +10,11 @@ #ifndef OPENMPT123_CONFIG_HPP #define OPENMPT123_CONFIG_HPP +#if defined(HAVE_CONFIG_H) +// wrapper for autoconf macros +#include "config.h" +#endif // HAVE_CONFIG_H + #if defined(_WIN32) #ifndef WIN32 #define WIN32 Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/test/test.cpp 2014-09-07 08:55:03 UTC (rev 4250) @@ -74,10 +74,31 @@ +static mpt::PathString *PathPrefix = nullptr; -void DoTests() -//------------ + + +static mpt::PathString GetPathPrefix() +//------------------------------------ { + if((*PathPrefix).empty()) + { + return MPT_PATHSTRING(""); + } + return *PathPrefix + MPT_PATHSTRING("/"); +} + + +void DoTests(std::string pathprefix) +//---------------------------------- +{ + + #if MPT_OS_WINDOWS + PathPrefix = new mpt::PathString(mpt::PathString::FromLocale(pathprefix)); + #else + PathPrefix = new mpt::PathString(mpt::PathString::FromNative(pathprefix)); + #endif + DO_TEST(TestVersion); DO_TEST(TestTypes); DO_TEST(TestMisc); @@ -91,9 +112,30 @@ DO_TEST(TestPCnoteSerialization); DO_TEST(TestLoadSaveFile); + delete PathPrefix; + PathPrefix = nullptr; } +void RemoveFile(const mpt::PathString &filename) +//---------------------------------------------- +{ + #if MPT_OS_WINDOWS + for(int retry=0; retry<10; retry++) + { + if(DeleteFileW(filename.AsNative().c_str()) != FALSE) + { + break; + } + // wait for windows virus scanners + Sleep(10); + } + #else + remove(filename.AsNative().c_str()); + #endif +} + + // Test if functions related to program version data work static noinline void TestVersion() //-------------------------------- @@ -1350,6 +1392,11 @@ return theFile; } +static mpt::PathString GetTempFilenameBase() +{ + return GetTestFilenameBase(); +} + typedef CModDoc *TSoundFileContainer; static CSoundFile &GetrSoundFile(TSoundFileContainer &sndFile) @@ -1398,9 +1445,14 @@ static mpt::PathString GetTestFilenameBase() { - return MPT_PATHSTRING("./test/test."); + return Test::GetPathPrefix() + MPT_PATHSTRING("./test/test."); } +static mpt::PathString GetTempFilenameBase() +{ + return MPT_PATHSTRING("./test."); +} + typedef std::shared_ptr<CSoundFile> TSoundFileContainer; static CSoundFile &GetrSoundFile(TSoundFileContainer &sndFile) @@ -1453,11 +1505,12 @@ { return; } - mpt::PathString filenameBase = GetTestFilenameBase(); + mpt::PathString filenameBaseSrc = GetTestFilenameBase(); + mpt::PathString filenameBase = GetTempFilenameBase(); // Test MPTM file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("mptm")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("mptm")); TestLoadMPTMFile(GetrSoundFile(sndFileContainer)); @@ -1477,12 +1530,14 @@ TestLoadMPTMFile(GetrSoundFile(sndFileContainer)); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.mptm")); } #endif // Test XM file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("xm")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("xm")); TestLoadXMFile(GetrSoundFile(sndFileContainer)); @@ -1510,12 +1565,14 @@ TestLoadXMFile(GetrSoundFile(sndFileContainer)); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.xm")); } #endif // Test S3M file loading { - TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBase + MPT_PATHSTRING("s3m")); + TSoundFileContainer sndFileContainer = CreateSoundFileContainer(filenameBaseSrc + MPT_PATHSTRING("s3m")); TestLoadS3MFile(GetrSoundFile(sndFileContainer), false); @@ -1535,6 +1592,8 @@ TestLoadS3MFile(GetrSoundFile(sndFileContainer), true); DestroySoundFileContainer(sndFileContainer); + + RemoveFile(filenameBase + MPT_PATHSTRING("saved.s3m")); } #endif } @@ -1543,7 +1602,7 @@ static void RunITCompressionTest(const std::vector<int8> &sampleData, ChannelFlags smpFormat, bool it215, int testcount) //---------------------------------------------------------------------------------------------------------------------- { - mpt::PathString filename = GetTestFilenameBase() + MPT_PATHSTRING("itcomp") + mpt::PathString::FromWide(StringifyW(testcount)) + MPT_PATHSTRING(".raw"); + mpt::PathString filename = GetTempFilenameBase() + MPT_PATHSTRING("itcomp") + mpt::PathString::FromWide(StringifyW(testcount)) + MPT_PATHSTRING(".raw"); ModSample smp; smp.uFlags = smpFormat; @@ -1571,19 +1630,7 @@ VERIFY_EQUAL_NONCONT(memcmp(&sampleData[0], &sampleDataNew[0], sampleData.size()), 0); fclose(f); } - #if MPT_OS_WINDOWS - for(int retry=0; retry<10; retry++) - { - if(DeleteFileW(filename.AsNative().c_str()) != FALSE) - { - break; - } - // wait for windows virus scanners - Sleep(10); - } - #else - remove(filename.AsNative().c_str()); - #endif + RemoveFile(filename); } Modified: trunk/OpenMPT/test/test.h =================================================================== --- trunk/OpenMPT/test/test.h 2014-09-07 07:43:55 UTC (rev 4249) +++ trunk/OpenMPT/test/test.h 2014-09-07 08:55:03 UTC (rev 4250) @@ -15,7 +15,7 @@ namespace Test { -void DoTests(); +void DoTests(std::string prefix = std::string()); } // namespace Test This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 09:04:20
|
Revision: 4253 http://sourceforge.net/p/modplug/code/4253 Author: manxorist Date: 2014-09-07 09:04:11 +0000 (Sun, 07 Sep 2014) Log Message: ----------- Merged revision(s) 4137 from branches/manx/msvc-linking: [Ref] Move selection of external MSVC/Windows libraries from the individual per-configuration project settings for VS2008 and VS2010 into a single MPTrackLink.cpp file by using linker pragmas in order to avoid unnecessary duplication of information and in order to make conditional selection of external libraries easier. ........ Modified Paths: -------------- trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters Added Paths: ----------- trunk/OpenMPT/mptrack/MPTrackLink.cpp Property Changed: ---------------- trunk/OpenMPT/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2014-09-07 09:02:21 UTC (rev 4252) +++ trunk/OpenMPT 2014-09-07 09:04:11 UTC (rev 4253) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:mergeinfo ## -6,6 +6,7 ## /branches/manx/lossy-export:2653-2654,2660,2664,2678,2681 /branches/manx/lossy-export-xiph:2663,2677,2680 /branches/manx/mptstring-stdstring-support:2204,2208,2212,2214,2217,2220,2224,2259,2261-2262,2264,2267 +/branches/manx/msvc-linking:4137 /branches/manx/nonglobal-mixer:1715-1841 /branches/manx/portaudio:2694-2705 /branches/manx/premake:2606,2609-2610,2614,2616,2621,2624,2641 \ No newline at end of property Copied: trunk/OpenMPT/mptrack/MPTrackLink.cpp (from rev 4137, branches/manx/msvc-linking/mptrack/MPTrackLink.cpp) =================================================================== --- trunk/OpenMPT/mptrack/MPTrackLink.cpp (rev 0) +++ trunk/OpenMPT/mptrack/MPTrackLink.cpp 2014-09-07 09:04:11 UTC (rev 4253) @@ -0,0 +1,44 @@ +/* + * MPTrackLink.cpp + * --------------- + * Purpose: Consolidated linking against MSVC/Windows libraries. + * Notes : (currently none) + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + +#include "stdafx.h" + + +OPENMPT_NAMESPACE_BEGIN + + +#if MPT_COMPILER_MSVC + +#pragma comment(lib, "delayimp.lib") +#pragma comment(lib, "version.lib") +#pragma comment(lib, "rpcrt4.lib") +#pragma comment(lib, "wininet.lib") +#pragma comment(lib, "htmlhelp.lib") + +#pragma comment(lib, "dmoguids.lib") +#pragma comment(lib, "strmiids.lib") + +#ifndef NO_DSOUND +#pragma comment(lib, "dsound.lib") +#endif +#pragma comment(lib, "winmm.lib") + +#pragma comment(lib, "ksuser.lib") +#if MPT_MSVC_BEFORE(2010,0) && defined(_M_X64) +// VS2008 x64 SDK has no ksguid.lib. Work-around in include\portaudio\src\os\win\pa_win_wdmks_utils.c . +#else +#pragma comment(lib, "ksguid.lib") +#endif + +#pragma comment(lib, "msacm32.lib") + +#endif // MPT_COMPILER_MSVC + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-07 09:02:21 UTC (rev 4252) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-07 09:04:11 UTC (rev 4253) @@ -82,7 +82,6 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" Version="5.0" LinkIncremental="2" SuppressStartupBanner="true" @@ -181,7 +180,6 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" Version="5.0" LinkIncremental="2" SuppressStartupBanner="true" @@ -282,7 +280,6 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" Version="5.0" LinkIncremental="1" SuppressStartupBanner="true" @@ -381,7 +378,6 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib dsound.lib msacm32.lib ksuser.lib htmlhelp.lib" Version="5.0" LinkIncremental="1" SuppressStartupBanner="true" @@ -680,6 +676,10 @@ > </File> <File + RelativePath=".\MPTrackLink.cpp" + > + </File> + <File RelativePath=".\MPTrackUtil.cpp" > </File> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-07 09:02:21 UTC (rev 4252) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-07 09:04:11 UTC (rev 4253) @@ -145,7 +145,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -196,7 +196,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -251,7 +251,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;wininet.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -307,7 +307,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;wininet.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -364,7 +364,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;wininet.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -420,7 +420,7 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>winmm.lib;strmiids.lib;dmoguids.lib;version.lib;Rpcrt4.lib;delayimp.lib;wininet.lib;dsound.lib;msacm32.lib;htmlhelp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <Version>5.0</Version> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -559,6 +559,7 @@ <ClCompile Include="Mpdlgs.cpp" /> <ClCompile Include="MPTHacks.cpp" /> <ClCompile Include="Mptrack.cpp" /> + <ClCompile Include="MPTrackLink.cpp" /> <ClCompile Include="MPTrackUtil.cpp" /> <ClCompile Include="Mpt_midi.cpp" /> <ClCompile Include="PatternClipboard.cpp" /> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-07 09:02:21 UTC (rev 4252) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-07 09:04:11 UTC (rev 4253) @@ -520,6 +520,9 @@ <ClCompile Include="AppendModule.cpp"> <Filter>Source Files\mptrack</Filter> </ClCompile> + <ClCompile Include="MPTrackLink.cpp"> + <Filter>Source Files\mptrack</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\soundlib\Loaders.h"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-07 09:18:33
|
Revision: 4255 http://sourceforge.net/p/modplug/code/4255 Author: manxorist Date: 2014-09-07 09:18:16 +0000 (Sun, 07 Sep 2014) Log Message: ----------- [Var] Fixup svn properties. Modified Paths: -------------- trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in Property Changed: ---------------- trunk/OpenMPT/build/autotools/configure.ac trunk/OpenMPT/include/lhasa/configure.ac trunk/OpenMPT/include/lhasa/liblhasa.pc.in trunk/OpenMPT/include/lhasa/pkg/config.make.in trunk/OpenMPT/include/lhasa/rpm.spec.in trunk/OpenMPT/include/portaudio/bindings/cpp/build/gnu/configure.ac trunk/OpenMPT/include/portaudio/bindings/cpp/configure.ac trunk/OpenMPT/include/portaudio/bindings/cpp/portaudiocpp.pc.in trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in trunk/OpenMPT/include/portaudio/configure.in trunk/OpenMPT/include/portaudio/portaudio-2.0.pc.in trunk/OpenMPT/include/soundtouch/configure.ac trunk/OpenMPT/include/soundtouch/soundtouch-1.4.pc.in trunk/OpenMPT/include/soundtouch/soundtouch.pc.in trunk/OpenMPT/libopenmpt/libopenmpt.pc.in Index: trunk/OpenMPT/build/autotools/configure.ac =================================================================== --- trunk/OpenMPT/build/autotools/configure.ac 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/build/autotools/configure.ac 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/build/autotools/configure.ac ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autoconf \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/lhasa/configure.ac =================================================================== --- trunk/OpenMPT/include/lhasa/configure.ac 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/lhasa/configure.ac 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/lhasa/configure.ac ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autoconf \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/lhasa/liblhasa.pc.in =================================================================== --- trunk/OpenMPT/include/lhasa/liblhasa.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/lhasa/liblhasa.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/lhasa/liblhasa.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/lhasa/pkg/config.make.in =================================================================== --- trunk/OpenMPT/include/lhasa/pkg/config.make.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/lhasa/pkg/config.make.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/lhasa/pkg/config.make.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/lhasa/rpm.spec.in =================================================================== --- trunk/OpenMPT/include/lhasa/rpm.spec.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/lhasa/rpm.spec.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/lhasa/rpm.spec.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/bindings/cpp/build/gnu/configure.ac =================================================================== --- trunk/OpenMPT/include/portaudio/bindings/cpp/build/gnu/configure.ac 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/bindings/cpp/build/gnu/configure.ac 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/portaudio/bindings/cpp/build/gnu/configure.ac ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autoconf \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/bindings/cpp/configure.ac =================================================================== --- trunk/OpenMPT/include/portaudio/bindings/cpp/configure.ac 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/bindings/cpp/configure.ac 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/portaudio/bindings/cpp/configure.ac ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autoconf \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/bindings/cpp/portaudiocpp.pc.in =================================================================== --- trunk/OpenMPT/include/portaudio/bindings/cpp/portaudiocpp.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/bindings/cpp/portaudiocpp.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/portaudio/bindings/cpp/portaudiocpp.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in =================================================================== --- trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in 2014-09-07 09:18:16 UTC (rev 4255) @@ -1,31 +1,31 @@ -/* $Id: $ - - !!! @GENERATED_MESSAGE@ !!! - - Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via - preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain. - - The generated "options_cmake.h" should be included like so: - - #ifdef PORTAUDIO_CMAKE_GENERATED - #include "options_cmake.h" - #endif - - so that non-CMake build environments are left intact. - - Source template: cmake_support/options_cmake.h.in -*/ - -#ifdef _WIN32 -#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS) -#error "This header needs to be included before pa_hostapi.h!!" -#endif - -#cmakedefine01 PA_USE_ASIO -#cmakedefine01 PA_USE_DS -#cmakedefine01 PA_USE_WMME -#cmakedefine01 PA_USE_WASAPI -#cmakedefine01 PA_USE_WDMKS -#else -#error "Platform currently not supported by CMake script" -#endif +/* $Id: $ + + !!! @GENERATED_MESSAGE@ !!! + + Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via + preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain. + + The generated "options_cmake.h" should be included like so: + + #ifdef PORTAUDIO_CMAKE_GENERATED + #include "options_cmake.h" + #endif + + so that non-CMake build environments are left intact. + + Source template: cmake_support/options_cmake.h.in +*/ + +#ifdef _WIN32 +#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS) +#error "This header needs to be included before pa_hostapi.h!!" +#endif + +#cmakedefine01 PA_USE_ASIO +#cmakedefine01 PA_USE_DS +#cmakedefine01 PA_USE_WMME +#cmakedefine01 PA_USE_WASAPI +#cmakedefine01 PA_USE_WDMKS +#else +#error "Platform currently not supported by CMake script" +#endif Property changes on: trunk/OpenMPT/include/portaudio/cmake_support/options_cmake.h.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/configure.in =================================================================== --- trunk/OpenMPT/include/portaudio/configure.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/configure.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/portaudio/configure.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/portaudio-2.0.pc.in =================================================================== --- trunk/OpenMPT/include/portaudio/portaudio-2.0.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/portaudio/portaudio-2.0.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/portaudio/portaudio-2.0.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/soundtouch/configure.ac =================================================================== --- trunk/OpenMPT/include/soundtouch/configure.ac 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/soundtouch/configure.ac 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/soundtouch/configure.ac ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autoconf \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/soundtouch/soundtouch-1.4.pc.in =================================================================== --- trunk/OpenMPT/include/soundtouch/soundtouch-1.4.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/soundtouch/soundtouch-1.4.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/soundtouch/soundtouch-1.4.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/include/soundtouch/soundtouch.pc.in =================================================================== --- trunk/OpenMPT/include/soundtouch/soundtouch.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/include/soundtouch/soundtouch.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/include/soundtouch/soundtouch.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: trunk/OpenMPT/libopenmpt/libopenmpt.pc.in =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.pc.in 2014-09-07 09:05:13 UTC (rev 4254) +++ trunk/OpenMPT/libopenmpt/libopenmpt.pc.in 2014-09-07 09:18:16 UTC (rev 4255) Property changes on: trunk/OpenMPT/libopenmpt/libopenmpt.pc.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-autotools \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-08 08:10:24
|
Revision: 4265 http://sourceforge.net/p/modplug/code/4265 Author: manxorist Date: 2014-09-08 08:10:15 +0000 (Mon, 08 Sep 2014) Log Message: ----------- [New] build: Autotools: Add --enable-libopenmpt_modplug and --enable-libmodplug which build the emulation layer of the libmodplug interface. [Mod] build: Makefile: Do not install libopenmpt_modplug by default. Move it to its own target 'install-openmpt-modplug'. It is not of much use stand-alone and should not be installed by default. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/build/autotools/autoconfiscate.sh trunk/OpenMPT/build/autotools/configure.ac Added Paths: ----------- trunk/OpenMPT/include/modplug/include/libmodplug/libmodplug.pc.in Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-09-08 06:26:13 UTC (rev 4264) +++ trunk/OpenMPT/Makefile 2014-09-08 08:10:15 UTC (rev 4265) @@ -606,7 +606,6 @@ $(INSTALL_LIB) bin/libopenmpt$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libopenmpt$(SOSUFFIX) endif $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/lib - $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libopenmpt_modplug$(SOSUFFIX) endif ifeq ($(STATIC_LIB),1) $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/lib @@ -639,13 +638,22 @@ #$(INSTALL_DATA_DIR) bin/docs/man $(DESTDIR)$(PREFIX)/share/man endif +.PHONY: install-openmpt-modplug +install-openmpt-modplug: $(OUTPUTS) +ifeq ($(SHARED_LIB),1) + $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/lib + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libopenmpt_modplug$(SOSUFFIX) + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libopenmpt_modplug$(SOSUFFIX).0 + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libopenmpt_modplug$(SOSUFFIX).0.0.0 +endif + .PHONY: install-modplug install-modplug: $(OUTPUTS) ifeq ($(SHARED_LIB),1) $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/lib - $(INSTALL_DATA) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX) - $(INSTALL_DATA) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX).0 - $(INSTALL_DATA) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX).0.0.0 + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX) + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX).0 + $(INSTALL_LIB) bin/libopenmpt_modplug$(SOSUFFIX) $(DESTDIR)$(PREFIX)/lib/libmodplug$(SOSUFFIX).0.0.0 endif .PHONY: dist Modified: trunk/OpenMPT/build/autotools/Makefile.am =================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am 2014-09-08 06:26:13 UTC (rev 4264) +++ trunk/OpenMPT/build/autotools/Makefile.am 2014-09-08 08:10:15 UTC (rev 4265) @@ -2,6 +2,7 @@ EXTRA_DIST = EXTRA_DIST += m4/emptydir EXTRA_DIST += libopenmpt/libopenmpt.pc.in +EXTRA_DIST += libmodplug/libmodplug.pc.in EXTRA_DIST += LICENSE EXTRA_DIST += README.md EXTRA_DIST += Doxyfile.in @@ -28,6 +29,7 @@ bin_PROGRAMS = check_PROGRAMS = +lib_LTLIBRARIES = TESTS = libopenmpttest check_PROGRAMS += libopenmpt_example_c_stdout @@ -59,11 +61,13 @@ endif pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libopenmpt/libopenmpt.pc +pkgconfig_DATA = +nobase_include_HEADERS = -lib_LTLIBRARIES = libopenmpt.la +pkgconfig_DATA += libopenmpt/libopenmpt.pc +lib_LTLIBRARIES += libopenmpt.la libopenmpt_la_LDFLAGS = -version-info 0:7:0 -nobase_include_HEADERS = libopenmpt/libopenmpt.h libopenmpt/libopenmpt.hpp libopenmpt/libopenmpt_version.h libopenmpt/libopenmpt_config.h libopenmpt/libopenmpt_stream_callbacks_fd.h libopenmpt/libopenmpt_stream_callbacks_file.h +nobase_include_HEADERS += libopenmpt/libopenmpt.h libopenmpt/libopenmpt.hpp libopenmpt/libopenmpt_version.h libopenmpt/libopenmpt_config.h libopenmpt/libopenmpt_stream_callbacks_fd.h libopenmpt/libopenmpt_stream_callbacks_file.h libopenmpt_la_CPPFLAGS = -DLIBOPENMPT_BUILD -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) libopenmpt_la_CXXFLAGS = $(ZLIB_CFLAGS) libopenmpt_la_CFLAGS = $(ZLIB_CFLAGS) @@ -225,6 +229,32 @@ libopenmpt_la_SOURCES += libopenmpt/libopenmpt_stream_callbacks_file.h libopenmpt_la_SOURCES += libopenmpt/libopenmpt_version.h +if ENABLE_LIBOPENMPT_MODPLUG +lib_LTLIBRARIES += libopenmpt_modplug.la +libopenmpt_modplug_la_LDFLAGS = -version-info 1:0:0 +libopenmpt_modplug_la_CPPFLAGS = -I$(srcdir)/ +libopenmpt_modplug_la_CXXFLAGS = +libopenmpt_modplug_la_CFLAGS = +libopenmpt_modplug_la_LIBADD = libopenmpt.la +libopenmpt_modplug_la_SOURCES = +libopenmpt_modplug_la_SOURCES += libopenmpt/libopenmpt_modplug.c +libopenmpt_modplug_la_SOURCES += libopenmpt/libopenmpt_modplug_cpp.cpp +endif + +if ENABLE_LIBMODPLUG +pkgconfig_DATA += libmodplug/libmodplug.pc +lib_LTLIBRARIES += libmodplug.la +libmodplug_la_LDFLAGS = -version-info 1:0:0 +nobase_include_HEADERS += libmodplug/modplug.h libmodplug/sndfile.h libmodplug/stdafx.h +libmodplug_la_CPPFLAGS = -I$(srcdir)/ +libmodplug_la_CXXFLAGS = +libmodplug_la_CFLAGS = +libmodplug_la_LIBADD = libopenmpt.la +libmodplug_la_SOURCES = +libmodplug_la_SOURCES += libopenmpt/libopenmpt_modplug.c +libmodplug_la_SOURCES += libopenmpt/libopenmpt_modplug_cpp.cpp +endif + check_PROGRAMS += libopenmpttest libopenmpttest_CPPFLAGS = -DLIBOPENMPT_BUILD -DLIBOPENMPT_BUILD_TEST -I$(srcdir)/build/svn_version -I$(srcdir)/ -I$(srcdir)/common $(ZLIB_CFLAGS) libopenmpttest_CXXFLAGS = $(ZLIB_CFLAGS) @@ -396,7 +426,7 @@ bin_PROGRAMS += openmpt123 openmpt123_CPPFLAGS = -I$(srcdir)/src/openmpt123 $(PORTAUDIO_CFLAGS) $(SDL_CFLAGS) $(SNDFILE_CFLAGS) $(FLAC_CFLAGS) -openmpt123_LDADD = $(lib_LTLIBRARIES) $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) +openmpt123_LDADD = libopenmpt.la $(PORTAUDIO_LIBS) $(SDL_LIBS) $(SNDFILE_LIBS) $(FLAC_LIBS) openmpt123_SOURCES = openmpt123_SOURCES += src/openmpt123/openmpt123_config.hpp openmpt123_SOURCES += src/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/build/autotools/autoconfiscate.sh =================================================================== --- trunk/OpenMPT/build/autotools/autoconfiscate.sh 2014-09-08 06:26:13 UTC (rev 4264) +++ trunk/OpenMPT/build/autotools/autoconfiscate.sh 2014-09-08 08:10:15 UTC (rev 4265) @@ -35,6 +35,7 @@ mkdir bin/dist-autotools/src svn export ./openmpt123 bin/dist-autotools/src/openmpt123 #svn export ./openmpt123 bin/dist-autotools/openmpt123 +svn export ./include/modplug/include/libmodplug bin/dist-autotools/libmodplug mkdir bin/dist-autotools/build mkdir bin/dist-autotools/build/svn_version svn export ./build/svn_version/svn_version.h bin/dist-autotools/build/svn_version/svn_version.h Modified: trunk/OpenMPT/build/autotools/configure.ac =================================================================== --- trunk/OpenMPT/build/autotools/configure.ac 2014-09-08 06:26:13 UTC (rev 4264) +++ trunk/OpenMPT/build/autotools/configure.ac 2014-09-08 08:10:15 UTC (rev 4265) @@ -4,7 +4,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_FILES([Makefile libopenmpt/libopenmpt.pc Doxyfile]) +AC_CONFIG_FILES([Makefile libopenmpt/libopenmpt.pc libmodplug/libmodplug.pc Doxyfile]) AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign subdir-objects]) @@ -72,6 +72,17 @@ AX_CXXFLAGS_WARN_ALL AC_LANG_POP([C++]) +# libmodplug emulation +AC_ARG_ENABLE([libopenmpt_modplug], AS_HELP_STRING([--enable-libopenmpt_modplug], [Enable the libopenmpt_modplug emulation library of the libmodplug interface.])) +AM_CONDITIONAL([ENABLE_LIBOPENMPT_MODPLUG], [test "x$enable_libopenmpt_modplug" = "xyes"]) + +# libmodplug replacement +AC_ARG_ENABLE([libmodplug], AS_HELP_STRING([--enable-libmodplug], [Enable libmodplug replacement library based on libopenmpt. +WARNING: This will replace your current libmodplug installation. +CAUTION: The emulation of the libmodplug interface is not complete as libmodplug exposes lots of internal implementation details. If any of those is used by an application, the emulation via libopenmpt will fail and/or crash. +])) +AM_CONDITIONAL([ENABLE_LIBMODPLUG], [test "x$enable_libmodplug" = "xyes"]) + DX_DOXYGEN_FEATURE(ON) DX_DOT_FEATURE(OFF) DX_HTML_FEATURE(ON) Added: trunk/OpenMPT/include/modplug/include/libmodplug/libmodplug.pc.in =================================================================== --- trunk/OpenMPT/include/modplug/include/libmodplug/libmodplug.pc.in (rev 0) +++ trunk/OpenMPT/include/modplug/include/libmodplug/libmodplug.pc.in 2014-09-08 08:10:15 UTC (rev 4265) @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=${prefix}/include + +Name: libmodplug +Description: The ModPlug mod file playing library (emulated via libopenmpt). +Version: 0.8.8.5 +Requires: libopenmpt +Libs: +Libs.private: +Cflags: -I${includedir} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-09 08:28:44
|
Revision: 4268 http://sourceforge.net/p/modplug/code/4268 Author: manxorist Date: 2014-09-09 08:28:34 +0000 (Tue, 09 Sep 2014) Log Message: ----------- [Mod] OpenMPT: Version is now 1.24.00.02 Merged revision(s) 4128, 4132, 4135, 4146-4147, 4149-4150, 4177 from branches/manx/sounddev: [New] sounddev: Support per-device defaults. Only SampleFormat is changed per device for now. OpenMPT does not yet use these per-device defaults. ........ [Mod] sounddev: Gather device capacilities as soon as instanciating a particular ISoundDevice implementation. ........ [Mod] sounddev: Use per-device default settings in OpenMPT. ........ [Imp] sounddev: Increase precision of latency and updateinterval by using float seconds instead of integer milliseconds, thereby also allow for sub-millisecond latencies. ........ [New] sounddev: Support direct mode for WaveOut devices. This is nowadays mostly useful on Wine systems where it (for certain setups) prevents the Wine-internal resampler from kicking in. ........ [Mod] sounddev: Limit shown samplerates for direct mode WaveOut devices. ........ [Mod] sounddev: Query PortAudio for the default latency of PortAudio sound devices. ........ [Ref] sounddev: Move latency min/max and update interval min/max values to SoundDeviceCaps. [Fix] sounddev: Avoid sub-millisecond update intervals and latencies for all but ASIO devices. The risk of hanging systems is too high. ........ Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpdlgs.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.h trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.h trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp trunk/OpenMPT/sounddev/SoundDeviceWaveout.h Property Changed: ---------------- trunk/OpenMPT/ Index: trunk/OpenMPT =================================================================== --- trunk/OpenMPT 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT 2014-09-09 08:28:34 UTC (rev 4268) Property changes on: trunk/OpenMPT ___________________________________________________________________ Modified: svn:mergeinfo ## -16,7 +16,7 ## /branches/manx/serialization-utils-cleanup:2382-2386,2395,2979 /branches/manx/snddev:2780-2788 /branches/manx/snddev-fixes:1605-1713 -/branches/manx/sounddev:2923-2934 +/branches/manx/sounddev:2923-2934,4128,4132,4135,4146-4147,4149-4150,4177 /branches/manx/stdstring-names:2223,2228 /branches/manx/stdstring-song-name:2462-2463 /branches/manx/unarchiver:1887-1888 \ No newline at end of property Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/common/versionNumber.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 00 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -59,10 +59,37 @@ }; +static double ParseTime(CString str) +{ + return ConvertStrTo<double>(mpt::To(mpt::CharsetASCII, str)) / 1000.0; +} + + +static CString PrintTime(double seconds) +{ + int32 microseconds = Util::Round<int32>(seconds * 1000000.0); + int precision = 0; + if(microseconds < 1000) + { + precision = 3; + } else if(microseconds < 10000) + { + precision = 2; + } else if(microseconds < 100000) + { + precision = 1; + } else + { + precision = 0; + } + return mpt::ToCString(mpt::CharsetASCII, mpt::String::Print("%1 ms", mpt::fmt::fix(seconds * 1000.0, 0, precision))); +} + + BEGIN_MESSAGE_MAP(COptionsSoundcard, CPropertyPage) ON_WM_HSCROLL() ON_WM_VSCROLL() - ON_COMMAND(IDC_CHECK4, OnSettingsChanged) + ON_COMMAND(IDC_CHECK4, OnExclusiveModeChanged) ON_COMMAND(IDC_CHECK5, OnSettingsChanged) ON_COMMAND(IDC_CHECK7, OnSettingsChanged) ON_COMMAND(IDC_CHECK9, OnSettingsChanged) @@ -176,27 +203,34 @@ { // latency { - CHAR s[128]; + static const double latencies [] = { + 0.001, + 0.002, + 0.003, + 0.004, + 0.005, + 0.010, + 0.015, + 0.020, + 0.025, + 0.030, + 0.040, + 0.050, + 0.075, + 0.100, + 0.150, + 0.200, + 0.250 + }; m_CbnLatencyMS.ResetContent(); - wsprintf(s, "%d ms", m_Settings.LatencyMS); - m_CbnLatencyMS.SetWindowText(s); - m_CbnLatencyMS.AddString("1 ms"); - m_CbnLatencyMS.AddString("2 ms"); - m_CbnLatencyMS.AddString("3 ms"); - m_CbnLatencyMS.AddString("4 ms"); - m_CbnLatencyMS.AddString("5 ms"); - m_CbnLatencyMS.AddString("10 ms"); - m_CbnLatencyMS.AddString("15 ms"); - m_CbnLatencyMS.AddString("20 ms"); - m_CbnLatencyMS.AddString("25 ms"); - m_CbnLatencyMS.AddString("30 ms"); - m_CbnLatencyMS.AddString("40 ms"); - m_CbnLatencyMS.AddString("50 ms"); - m_CbnLatencyMS.AddString("75 ms"); - m_CbnLatencyMS.AddString("100 ms"); - m_CbnLatencyMS.AddString("150 ms"); - m_CbnLatencyMS.AddString("200 ms"); - m_CbnLatencyMS.AddString("250 ms"); + m_CbnLatencyMS.SetWindowText(PrintTime(m_Settings.Latency)); + for(std::size_t i = 0; i < CountOf(latencies); ++i) + { + if(m_CurrentDeviceCaps.LatencyMin <= latencies[i] && latencies[i] <= m_CurrentDeviceCaps.LatencyMax) + { + m_CbnLatencyMS.AddString(PrintTime(latencies[i])); + } + } } } @@ -206,18 +240,25 @@ { // update interval { - CHAR s[128]; + static const double updateIntervals [] = { + 0.001, + 0.002, + 0.005, + 0.010, + 0.015, + 0.020, + 0.025, + 0.050 + }; m_CbnUpdateIntervalMS.ResetContent(); - wsprintf(s, "%d ms", m_Settings.UpdateIntervalMS); - m_CbnUpdateIntervalMS.SetWindowText(s); - m_CbnUpdateIntervalMS.AddString("1 ms"); - m_CbnUpdateIntervalMS.AddString("2 ms"); - m_CbnUpdateIntervalMS.AddString("5 ms"); - m_CbnUpdateIntervalMS.AddString("10 ms"); - m_CbnUpdateIntervalMS.AddString("15 ms"); - m_CbnUpdateIntervalMS.AddString("20 ms"); - m_CbnUpdateIntervalMS.AddString("25 ms"); - m_CbnUpdateIntervalMS.AddString("50 ms"); + m_CbnUpdateIntervalMS.SetWindowText(PrintTime(m_Settings.UpdateInterval)); + for(std::size_t i = 0; i < CountOf(updateIntervals); ++i) + { + if(m_CurrentDeviceCaps.UpdateIntervalMin <= updateIntervals[i] && updateIntervals[i] <= m_CurrentDeviceCaps.UpdateIntervalMax) + { + m_CbnUpdateIntervalMS.AddString(PrintTime(updateIntervals[i])); + } + } } } @@ -491,6 +532,14 @@ } +void COptionsSoundcard::OnExclusiveModeChanged() +//---------------------------------------------- +{ + UpdateSampleRates(); + OnSettingsChanged(); +} + + void COptionsSoundcard::OnChannelsChanged() //----------------------------------------- { @@ -564,8 +613,16 @@ { m_CbnMixingFreq.ResetContent(); - std::vector<uint32> samplerates = m_CurrentDeviceDynamicCaps.supportedSampleRates; + std::vector<uint32> samplerates; + if(IsDlgButtonChecked(IDC_CHECK4)) + { + samplerates = m_CurrentDeviceDynamicCaps.supportedExclusiveSampleRates; + } else + { + samplerates = m_CurrentDeviceDynamicCaps.supportedSampleRates; + } + if(samplerates.empty()) { // We have no valid list of supported playback rates! Assume all rates supported by OpenMPT are possible... @@ -652,23 +709,21 @@ const SoundDeviceID dev = m_CurrentDeviceInfo.id; // Latency { - CHAR s[32]; - m_CbnLatencyMS.GetWindowText(s, sizeof(s)); - m_Settings.LatencyMS = atoi(s); + CString s; + m_CbnLatencyMS.GetWindowText(s); + m_Settings.Latency = ParseTime(s); //Check given value. - m_Settings.LatencyMS = Clamp(m_Settings.LatencyMS, SNDDEV_MINLATENCY_MS, SNDDEV_MAXLATENCY_MS); - wsprintf(s, "%d ms", m_Settings.LatencyMS); - m_CbnLatencyMS.SetWindowText(s); + m_Settings.Latency = Clamp(m_Settings.Latency, m_CurrentDeviceCaps.LatencyMin, m_CurrentDeviceCaps.LatencyMax); + m_CbnLatencyMS.SetWindowText(PrintTime(m_Settings.Latency)); } // Update Interval { - CHAR s[32]; - m_CbnUpdateIntervalMS.GetWindowText(s, sizeof(s)); - m_Settings.UpdateIntervalMS = atoi(s); + CString s; + m_CbnUpdateIntervalMS.GetWindowText(s); + m_Settings.UpdateInterval = ParseTime(s); //Check given value. - m_Settings.UpdateIntervalMS = Clamp(m_Settings.UpdateIntervalMS, SNDDEV_MINUPDATEINTERVAL_MS, SNDDEV_MAXUPDATEINTERVAL_MS); - wsprintf(s, "%d ms", m_Settings.UpdateIntervalMS); - m_CbnUpdateIntervalMS.SetWindowText(s); + m_Settings.UpdateInterval = Clamp(m_Settings.UpdateInterval, m_CurrentDeviceCaps.UpdateIntervalMin, m_CurrentDeviceCaps.UpdateIntervalMax); + m_CbnUpdateIntervalMS.SetWindowText(PrintTime(m_Settings.UpdateInterval)); } // Channel Mapping { Modified: trunk/OpenMPT/mptrack/Mpdlgs.h =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/mptrack/Mpdlgs.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -65,6 +65,7 @@ afx_msg void OnDeviceChanged(); afx_msg void OnSettingsChanged() { SetModified(TRUE); } + afx_msg void OnExclusiveModeChanged(); afx_msg void OnChannelsChanged(); afx_msg void OnSampleFormatChanged(); afx_msg void OnSoundCardRescan(); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -404,8 +404,8 @@ { m_SoundDeviceID_DEPRECATED = conf.Read<SoundDeviceID>("Sound Settings", "WaveDevice", SoundDeviceID()); Setting<uint32> m_BufferLength_DEPRECATED(conf, "Sound Settings", "BufferLength", 50); - Setting<uint32> m_LatencyMS(conf, "Sound Settings", "Latency", SoundDeviceSettings().LatencyMS); - Setting<uint32> m_UpdateIntervalMS(conf, "Sound Settings", "UpdateInterval", SoundDeviceSettings().UpdateIntervalMS); + Setting<uint32> m_LatencyMS(conf, "Sound Settings", "Latency", Util::Round<int32>(SoundDeviceSettings().Latency * 1000.0)); + Setting<uint32> m_UpdateIntervalMS(conf, "Sound Settings", "UpdateInterval", Util::Round<int32>(SoundDeviceSettings().UpdateInterval * 1000.0)); Setting<SampleFormat> m_SampleFormat(conf, "Sound Settings", "BitsPerSample", SoundDeviceSettings().sampleFormat); Setting<bool> m_SoundDeviceExclusiveMode(conf, "Sound Settings", "ExclusiveMode", SoundDeviceSettings().ExclusiveMode); Setting<bool> m_SoundDeviceBoostThreadPriority(conf, "Sound Settings", "BoostThreadPriority", SoundDeviceSettings().BoostThreadPriority); @@ -441,8 +441,8 @@ { m_SoundDeviceChannelMapping = SoundChannelMapping::BaseChannel(MixerOutputChannels, conf.Read<int>("Sound Settings", "ASIOBaseChannel", 0)); } - m_SoundDeviceSettingsDefaults.LatencyMS = m_LatencyMS; - m_SoundDeviceSettingsDefaults.UpdateIntervalMS = m_UpdateIntervalMS; + m_SoundDeviceSettingsDefaults.Latency = m_LatencyMS / 1000.0; + m_SoundDeviceSettingsDefaults.UpdateInterval = m_UpdateIntervalMS / 1000.0; m_SoundDeviceSettingsDefaults.Samplerate = MixerSamplerate; m_SoundDeviceSettingsDefaults.Channels = (uint8)MixerOutputChannels; m_SoundDeviceSettingsDefaults.sampleFormat = m_SampleFormat; @@ -584,11 +584,11 @@ public: - StoredSoundDeviceSettings(SettingsContainer &conf, const SoundDeviceInfo & deviceInfo, const SoundDeviceSettings &defaults = SoundDeviceSettings()) + StoredSoundDeviceSettings(SettingsContainer &conf, const SoundDeviceInfo & deviceInfo, const SoundDeviceSettings & defaults) : conf(conf) , deviceInfo(deviceInfo) - , LatencyUS(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"Latency", defaults.LatencyMS * 1000) - , UpdateIntervalUS(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"UpdateInterval", defaults.UpdateIntervalMS * 1000) + , LatencyUS(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"Latency", Util::Round<int32>(defaults.Latency * 1000000.0)) + , UpdateIntervalUS(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"UpdateInterval", Util::Round<int32>(defaults.UpdateInterval * 1000000.0)) , Samplerate(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"SampleRate", defaults.Samplerate) , Channels(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"Channels", defaults.Channels) , sampleFormat(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"SampleFormat", defaults.sampleFormat) @@ -599,7 +599,7 @@ , DitherType(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"DitherType", defaults.DitherType) , ChannelMapping(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"ChannelMapping", defaults.ChannelMapping) { - // store informational data (not read back, jsut to allow the user to mock with the raw ini file) + // store informational data (not read back, just to allow the user to mock with the raw ini file) conf.Write(L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"ID", deviceInfo.id); conf.Write(L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"InternalID", deviceInfo.internalID); conf.Write(L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"API", deviceInfo.apiName); @@ -608,8 +608,8 @@ StoredSoundDeviceSettings & operator = (const SoundDeviceSettings &settings) { - LatencyUS = settings.LatencyMS * 1000; - UpdateIntervalUS = settings.UpdateIntervalMS * 1000; + LatencyUS = Util::Round<int32>(settings.Latency * 1000000.0); + UpdateIntervalUS = Util::Round<int32>(settings.UpdateInterval * 1000000.0); Samplerate = settings.Samplerate; Channels = settings.Channels; sampleFormat = settings.sampleFormat; @@ -625,8 +625,8 @@ operator SoundDeviceSettings () const { SoundDeviceSettings settings; - settings.LatencyMS = LatencyUS / 1000; - settings.UpdateIntervalMS = UpdateIntervalUS / 1000; + settings.Latency = LatencyUS / 1000000.0; + settings.UpdateInterval = UpdateIntervalUS / 1000000.0; settings.Samplerate = Samplerate; settings.Channels = Channels; settings.sampleFormat = sampleFormat; @@ -665,9 +665,10 @@ const SoundDeviceInfo deviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(device); if(!deviceInfo.IsValid()) { - return GetSoundDeviceSettingsDefaults(); + return SoundDeviceSettings(); } - SoundDeviceSettings settings = StoredSoundDeviceSettings(conf, deviceInfo); + const SoundDeviceCaps deviceCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(device, CMainFrame::GetMainFrame()->gpSoundDevice); + SoundDeviceSettings settings = StoredSoundDeviceSettings(conf, deviceInfo, deviceCaps.DefaultSettings); settings.hWnd = CMainFrame::GetMainFrame()->m_hWnd; return settings; } @@ -680,7 +681,8 @@ { return; } - StoredSoundDeviceSettings(conf, deviceInfo) = settings; + const SoundDeviceCaps deviceCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(device, CMainFrame::GetMainFrame()->gpSoundDevice); + StoredSoundDeviceSettings(conf, deviceInfo, deviceCaps.DefaultSettings) = settings; } Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -132,8 +132,8 @@ , m_InternalID(internalID) { - m_BufferAttributes.Latency = m_Settings.LatencyMS / 1000.0; - m_BufferAttributes.UpdateInterval = m_Settings.UpdateIntervalMS / 1000.0; + m_BufferAttributes.Latency = m_Settings.Latency; + m_BufferAttributes.UpdateInterval = m_Settings.UpdateInterval; m_BufferAttributes.NumBuffers = 0; m_IsPlaying = false; @@ -152,14 +152,6 @@ } -SoundDeviceCaps ISoundDevice::GetDeviceCaps() -//------------------------------------------- -{ - SoundDeviceCaps result; - return result; -} - - SoundDeviceDynamicCaps ISoundDevice::GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates) //--------------------------------------------------------------------------------------------------- { @@ -216,6 +208,18 @@ } +bool ISoundDevice::Init() +//----------------------- +{ + if(IsInited()) + { + return true; + } + m_Caps = InternalGetDeviceCaps(); + return m_Caps.Available; +} + + bool ISoundDevice::Open(const SoundDeviceSettings &settings) //---------------------------------------------------------- { @@ -224,17 +228,15 @@ Close(); } m_Settings = settings; - if(m_Settings.LatencyMS < SNDDEV_MINLATENCY_MS) m_Settings.LatencyMS = SNDDEV_MINLATENCY_MS; - if(m_Settings.LatencyMS > SNDDEV_MAXLATENCY_MS) m_Settings.LatencyMS = SNDDEV_MAXLATENCY_MS; - if(m_Settings.UpdateIntervalMS < SNDDEV_MINUPDATEINTERVAL_MS) m_Settings.UpdateIntervalMS = SNDDEV_MINUPDATEINTERVAL_MS; - if(m_Settings.UpdateIntervalMS > SNDDEV_MAXUPDATEINTERVAL_MS) m_Settings.UpdateIntervalMS = SNDDEV_MAXUPDATEINTERVAL_MS; + m_Settings.Latency = Clamp(m_Settings.Latency, m_Caps.LatencyMin, m_Caps.LatencyMax); + m_Settings.UpdateInterval = Clamp(m_Settings.UpdateInterval, m_Caps.UpdateIntervalMin, m_Caps.UpdateIntervalMax); if(!m_Settings.ChannelMapping.IsValid(m_Settings.Channels)) { return false; } m_Flags = SoundDeviceFlags(); - m_BufferAttributes.Latency = m_Settings.LatencyMS / 1000.0; - m_BufferAttributes.UpdateInterval = m_Settings.UpdateIntervalMS / 1000.0; + m_BufferAttributes.Latency = m_Settings.Latency; + m_BufferAttributes.UpdateInterval = m_Settings.UpdateInterval; m_BufferAttributes.NumBuffers = 0; InterlockedExchange(&m_RequestFlags, 0); return InternalOpen(); @@ -671,6 +673,17 @@ break; #endif // NO_PORTAUDIO } + if(!result) + { + return nullptr; + } + if(!result->Init()) + { + delete result; + result = nullptr; + return nullptr; + } + m_DeviceCaps[id] = result->GetDeviceCaps(); // update cached caps return result; } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -161,12 +161,6 @@ }; -#define SNDDEV_MINLATENCY_MS 1u -#define SNDDEV_MAXLATENCY_MS 500u -#define SNDDEV_MINUPDATEINTERVAL_MS 1u -#define SNDDEV_MAXUPDATEINTERVAL_MS 200u - - struct SoundChannelMapping { @@ -245,8 +239,8 @@ struct SoundDeviceSettings { HWND hWnd; - uint32 LatencyMS; - uint32 UpdateIntervalMS; + double Latency; // seconds + double UpdateInterval; // seconds uint32 Samplerate; uint8 Channels; SampleFormat sampleFormat; @@ -258,11 +252,11 @@ SoundChannelMapping ChannelMapping; SoundDeviceSettings() : hWnd(NULL) - , LatencyMS(100) - , UpdateIntervalMS(5) + , Latency(0.1) + , UpdateInterval(0.005) , Samplerate(48000) , Channels(2) - , sampleFormat(mpt::Windows::Version::IsWine() ? SampleFormatInt16 : SampleFormatFloat32) + , sampleFormat(SampleFormatFloat32) , ExclusiveMode(false) , BoostThreadPriority(true) , KeepDeviceRunning(true) @@ -275,8 +269,8 @@ { return true && hWnd == cmp.hWnd - && LatencyMS == cmp.LatencyMS - && UpdateIntervalMS == cmp.UpdateIntervalMS + && Util::Round<int64>(Latency * 1000000000.0) == Util::Round<int64>(cmp.Latency * 1000000000.0) // compare in nanoseconds + && Util::Round<int64>(UpdateInterval * 1000000000.0) == Util::Round<int64>(cmp.UpdateInterval * 1000000000.0) // compare in nanoseconds && Samplerate == cmp.Samplerate && Channels == cmp.Channels && sampleFormat == cmp.sampleFormat @@ -324,6 +318,7 @@ struct SoundDeviceCaps { + bool Available; bool CanUpdateInterval; bool CanSampleFormat; bool CanExclusiveMode; @@ -334,8 +329,14 @@ bool CanDriverPanel; bool HasInternalDither; std::wstring ExclusiveModeDescription; + double LatencyMin; + double LatencyMax; + double UpdateIntervalMin; + double UpdateIntervalMax; + SoundDeviceSettings DefaultSettings; SoundDeviceCaps() - : CanUpdateInterval(true) + : Available(false) + , CanUpdateInterval(true) , CanSampleFormat(true) , CanExclusiveMode(false) , CanBoostThreadPriority(true) @@ -345,6 +346,10 @@ , CanDriverPanel(false) , HasInternalDither(false) , ExclusiveModeDescription(L"Use device exclusively") + , LatencyMin(0.002) // 2ms + , LatencyMax(0.5) // 500ms + , UpdateIntervalMin(0.001) // 1ms + , UpdateIntervalMax(0.2) // 200ms { return; } @@ -354,7 +359,8 @@ struct SoundDeviceDynamicCaps { uint32 currentSampleRate; - std::vector<uint32> supportedSampleRates; // Which samplerates are actually supported by the device. Currently only implemented properly for ASIO, DirectSound and PortAudio. + std::vector<uint32> supportedSampleRates; + std::vector<uint32> supportedExclusiveSampleRates; std::vector<std::wstring> channelNames; SoundDeviceDynamicCaps() : currentSampleRate(0) @@ -397,6 +403,10 @@ std::wstring m_InternalID; +private: + + SoundDeviceCaps m_Caps; + protected: SoundDeviceSettings m_Settings; @@ -459,6 +469,8 @@ virtual void InternalStopForce() { InternalStop(); } virtual bool InternalClose() = 0; + virtual SoundDeviceCaps InternalGetDeviceCaps() = 0; + public: ISoundDevice(SoundDeviceID id, const std::wstring &internalID); @@ -474,9 +486,10 @@ SoundDeviceIndex GetDeviceIndex() const { return m_ID.GetIndex(); } std::wstring GetDeviceInternalID() const { return m_InternalID; } - virtual SoundDeviceCaps GetDeviceCaps(); + SoundDeviceCaps GetDeviceCaps() const { return m_Caps; } virtual SoundDeviceDynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); + bool Init(); bool Open(const SoundDeviceSettings &settings); bool Close(); bool Start(); @@ -484,7 +497,8 @@ LONG GetRequestFlags() const { return InterlockedExchangeAdd(&m_RequestFlags, 0); /* read */ } - bool IsOpen() const { return InternalIsOpen(); } + bool IsInited() const { return m_Caps.Available; } + bool IsOpen() const { return IsInited() && InternalIsOpen(); } bool IsPlaying() const { return m_IsPlaying; } virtual bool OnIdle() { return false; } // return true if any work has been done Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -284,7 +284,7 @@ asioCall(getBufferSize(&minSize, &maxSize, &preferredSize, &granularity)); Log(mpt::String::Print("ASIO: getBufferSize() => minSize=%1 maxSize=%2 preferredSize=%3 granularity=%4", minSize, maxSize, preferredSize, granularity)); - m_nAsioBufferLen = ((m_Settings.LatencyMS * m_Settings.Samplerate) / 2000); + m_nAsioBufferLen = Util::Round<int32>(m_Settings.Latency * m_Settings.Samplerate / 2.0); if(minSize <= 0 || maxSize <= 0 || minSize > maxSize) { // limits make no sense if(preferredSize > 0) @@ -1313,11 +1313,12 @@ } -SoundDeviceCaps CASIODevice::GetDeviceCaps() -//------------------------------------------ +SoundDeviceCaps CASIODevice::InternalGetDeviceCaps() +//-------------------------------------------------- { SoundDeviceCaps caps; + caps.Available = true; caps.CanUpdateInterval = false; caps.CanSampleFormat = false; caps.CanExclusiveMode = false; @@ -1327,6 +1328,13 @@ caps.CanChannelMapping = true; caps.CanDriverPanel = true; + caps.LatencyMin = 0.000001; // 1 us + caps.LatencyMax = 0.5; // 500 ms + caps.UpdateIntervalMin = 0.0; // disabled + caps.UpdateIntervalMax = 0.0; // disabled + + caps.DefaultSettings.sampleFormat = SampleFormatFloat32; + return caps; } @@ -1362,6 +1370,7 @@ if(asioCallUncatched(canSampleRate((ASIOSampleRate)baseSampleRates[i])) == ASE_OK) { caps.supportedSampleRates.push_back(baseSampleRates[i]); + caps.supportedExclusiveSampleRates.push_back(baseSampleRates[i]); } } catch(...) { Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -110,7 +110,7 @@ bool OnIdle() { return HandleRequests(); } - SoundDeviceCaps GetDeviceCaps(); + SoundDeviceCaps InternalGetDeviceCaps(); SoundDeviceDynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); bool OpenDriverSettings(); Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -92,10 +92,11 @@ } -SoundDeviceCaps CDSoundDevice::GetDeviceCaps() -//-------------------------------------------- +SoundDeviceCaps CDSoundDevice::InternalGetDeviceCaps() +//---------------------------------------------------- { SoundDeviceCaps caps; + caps.Available = true; caps.CanUpdateInterval = true; caps.CanSampleFormat = true; caps.CanExclusiveMode = false; @@ -104,6 +105,7 @@ caps.CanChannelMapping = false; caps.CanDriverPanel = false; caps.ExclusiveModeDescription = L"Use primary buffer"; + caps.DefaultSettings.sampleFormat = SampleFormatInt16; IDirectSound *dummy = nullptr; IDirectSound *ds = nullptr; if(m_piDS) @@ -182,6 +184,7 @@ if(dscaps.dwMinSecondarySampleRate <= baseSampleRates[i] && baseSampleRates[i] <= dscaps.dwMaxSecondarySampleRate) { caps.supportedSampleRates.push_back(baseSampleRates[i]); + caps.supportedExclusiveSampleRates.push_back(baseSampleRates[i]); } } } @@ -218,7 +221,7 @@ return false; } m_bMixRunning = FALSE; - m_nDSoundBufferSize = (m_Settings.LatencyMS * pwfx->nAvgBytesPerSec) / 1000; + m_nDSoundBufferSize = Util::Round<int32>(m_Settings.Latency * pwfx->nAvgBytesPerSec); m_nDSoundBufferSize = Clamp(m_nDSoundBufferSize, (DWORD)DSBSIZE_MIN, (DWORD)DSBSIZE_MAX); m_nDSoundBufferSize = (m_nDSoundBufferSize + (bytesPerFrame-1)) / bytesPerFrame * bytesPerFrame; // round up to full frame if(!m_Settings.ExclusiveMode) @@ -293,11 +296,11 @@ if (dwStat & DSBSTATUS_BUFFERLOST) m_pMixBuffer->Restore(); } m_dwWritePos = 0xFFFFFFFF; - SetWakeupInterval(std::min(m_Settings.UpdateIntervalMS / 1000.0, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond()))); + SetWakeupInterval(std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond()))); m_Flags.NeedsClippedFloat = mpt::Windows::Version::IsAtLeast(mpt::Windows::Version::WinVista); SoundBufferAttributes bufferAttributes; bufferAttributes.Latency = m_nDSoundBufferSize * 1.0 / m_Settings.GetBytesPerSecond(); - bufferAttributes.UpdateInterval = std::min(m_Settings.UpdateIntervalMS / 1000.0, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond())); + bufferAttributes.UpdateInterval = std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond())); bufferAttributes.NumBuffers = 1; UpdateBufferAttributes(bufferAttributes); return true; Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -52,7 +52,7 @@ void StopFromSoundThread(); bool InternalIsOpen() const { return (m_pMixBuffer != NULL); } double GetCurrentLatency() const { return 1.0 * m_dwLatency / m_Settings.GetBytesPerSecond(); } - SoundDeviceCaps GetDeviceCaps(); + SoundDeviceCaps InternalGetDeviceCaps(); SoundDeviceDynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); public: Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -80,9 +80,9 @@ default: return false; break; } } - m_StreamParameters.suggestedLatency = m_Settings.LatencyMS / 1000.0; + m_StreamParameters.suggestedLatency = m_Settings.Latency; m_StreamParameters.hostApiSpecificStreamInfo = NULL; - unsigned long framesPerBuffer = static_cast<long>(m_Settings.UpdateIntervalMS * m_Settings.Samplerate / 1000.0f); + unsigned long framesPerBuffer = static_cast<long>(m_Settings.UpdateInterval * m_Settings.Samplerate); if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI)) { if(m_Settings.ExclusiveMode) @@ -130,7 +130,7 @@ } SoundBufferAttributes bufferAttributes; bufferAttributes.Latency = m_StreamInfo->outputLatency; - bufferAttributes.UpdateInterval = m_Settings.UpdateIntervalMS / 1000.0; + bufferAttributes.UpdateInterval = m_Settings.UpdateInterval; bufferAttributes.NumBuffers = 1; UpdateBufferAttributes(bufferAttributes); return true; @@ -197,10 +197,11 @@ } -SoundDeviceCaps CPortaudioDevice::GetDeviceCaps() -//----------------------------------------------- +SoundDeviceCaps CPortaudioDevice::InternalGetDeviceCaps() +//------------------------------------------------------- { SoundDeviceCaps caps; + caps.Available = true; caps.CanUpdateInterval = true; caps.CanSampleFormat = true; caps.CanExclusiveMode = false; @@ -209,13 +210,39 @@ caps.CanChannelMapping = false; caps.CanDriverPanel = false; caps.HasInternalDither = true; + const PaDeviceInfo *deviceInfo = Pa_GetDeviceInfo(m_StreamParameters.device = HostApiOutputIndexToGlobalDeviceIndex(GetDeviceIndex(), m_HostApi)); + if(deviceInfo) + { + caps.DefaultSettings.Latency = deviceInfo->defaultLowOutputLatency; + } + caps.DefaultSettings.sampleFormat = SampleFormatFloat32; if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI)) { caps.CanExclusiveMode = true; caps.CanDriverPanel = true; + caps.DefaultSettings.sampleFormat = SampleFormatFloat32; } else if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paWDMKS)) { caps.CanUpdateInterval = false; + caps.DefaultSettings.sampleFormat = SampleFormatInt32; + } else if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paDirectSound)) + { + caps.DefaultSettings.sampleFormat = SampleFormatInt16; + } else if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paMME)) + { + if(mpt::Windows::Version::IsWine()) + { + caps.DefaultSettings.sampleFormat = SampleFormatInt16; + } else if(mpt::Windows::Version::IsAtLeast(mpt::Windows::Version::WinVista)) + { + caps.DefaultSettings.sampleFormat = SampleFormatFloat32; + } else + { + caps.DefaultSettings.sampleFormat = SampleFormatInt16; + } + } else if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paASIO)) + { + caps.DefaultSettings.sampleFormat = SampleFormatInt32; } return caps; } @@ -251,6 +278,7 @@ if(Pa_IsFormatSupported(NULL, &StreamParameters, baseSampleRates[n]) == paFormatIsSupported) { caps.supportedSampleRates.push_back(baseSampleRates[n]); + caps.supportedExclusiveSampleRates.push_back(baseSampleRates[n]); } } return caps; Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -55,7 +55,7 @@ double GetCurrentLatency() const; bool InternalHasGetStreamPosition() const { return false; } int64 InternalGetStreamPositionFrames() const; - SoundDeviceCaps GetDeviceCaps(); + SoundDeviceCaps InternalGetDeviceCaps(); SoundDeviceDynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); bool OpenDriverSettings(); Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2014-09-09 08:28:34 UTC (rev 4268) @@ -58,6 +58,71 @@ } +SoundDeviceCaps CWaveDevice::InternalGetDeviceCaps() +//-------------------------------------------------- +{ + SoundDeviceCaps caps; + caps.Available = true; + caps.CanUpdateInterval = true; + caps.CanSampleFormat = true; + caps.CanExclusiveMode = (GetDeviceIndex() > 0); // no direct mode for WAVE_MAPPER, makes no sense there + caps.CanBoostThreadPriority = true; + caps.CanKeepDeviceRunning = false; + caps.CanUseHardwareTiming = false; + caps.CanChannelMapping = false; + caps.CanDriverPanel = false; + caps.HasInternalDither = false; + caps.ExclusiveModeDescription = L"Use direct mode"; + if(mpt::Windows::Version::IsWine()) + { + caps.DefaultSettings.sampleFormat = SampleFormatInt16; + } else if(mpt::Windows::Version::IsAtLeast(mpt::Windows::Version::WinVista)) + { + caps.DefaultSettings.sampleFormat = SampleFormatFloat32; + } else + { + caps.DefaultSettings.sampleFormat = SampleFormatInt16; + } + return caps; +} + + +SoundDeviceDynamicCaps CWaveDevice::GetDeviceDynamicCaps(const std::vector<uint32> & /*baseSampleRates*/ ) +//-------------------------------------------------------------------------------------------------------- +{ + SoundDeviceDynamicCaps caps; + WAVEOUTCAPSW woc; + MemsetZero(woc); + if(GetDeviceIndex() > 0) + { + if(waveOutGetDevCapsW(GetDeviceIndex() - 1, &woc, sizeof(woc)) == MMSYSERR_NOERROR) + { + if(woc.dwFormats & (WAVE_FORMAT_96M08 | WAVE_FORMAT_96M16 | WAVE_FORMAT_96S08 | WAVE_FORMAT_96S16)) + { + caps.supportedExclusiveSampleRates.push_back(96000); + } + if(woc.dwFormats & (WAVE_FORMAT_48M08 | WAVE_FORMAT_48M16 | WAVE_FORMAT_48S08 | WAVE_FORMAT_48S16)) + { + caps.supportedExclusiveSampleRates.push_back(48000); + } + if(woc.dwFormats & (WAVE_FORMAT_4M08 | WAVE_FORMAT_4M16 | WAVE_FORMAT_4S08 | WAVE_FORMAT_4S16)) + { + caps.supportedExclusiveSampleRates.push_back(44100); + } + if(woc.dwFormats & (WAVE_FORMAT_2M08 | WAVE_FORMAT_2M16 | WAVE_FORMAT_2S08 | WAVE_FORMAT_2S16)) + { + caps.supportedExclusiveSampleRates.push_back(22050); + } + if(woc.dwFormats & (WAVE_FORMAT_1M08 | WAVE_FORMAT_1M16 | WAVE_FORMAT_1S08 | WAVE_FORMAT_1S16)) + { + caps.supportedExclusiveSampleRates.push_back(11025); + } + } + } + return caps; +} + + bool CWaveDevice::InternalOpen() //------------------------------ { @@ -76,15 +141,15 @@ return false; } m_hWaveOut = NULL; - if(waveOutOpen(&m_hWaveOut, nWaveDev, pwfx, (DWORD_PTR)WaveOutCallBack, (DWORD_PTR)this, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) + if(waveOutOpen(&m_hWaveOut, nWaveDev, pwfx, (DWORD_PTR)WaveOutCallBack, (DWORD_PTR)this, CALLBACK_FUNCTION | (m_Settings.ExclusiveMode ? WAVE_FORMAT_DIRECT : 0)) != MMSYSERR_NOERROR) { InternalClose(); return false; } - m_nWaveBufferSize = m_Settings.UpdateIntervalMS * pwfx->nAvgBytesPerSec / 1000; + m_nWaveBufferSize = Util::Round<int32>(m_Settings.UpdateInterval * pwfx->nAvgBytesPerSec); m_nWaveBufferSize = Clamp(m_nWaveBufferSize, WAVEOUT_MINBUFFERSIZE, WAVEOUT_MAXBUFFERSIZE); m_nWaveBufferSize = ((m_nWaveBufferSize + pwfx->nBlockAlign - 1) / pwfx->nBlockAlign) * pwfx->nBlockAlign; - std::size_t numBuffers = m_Settings.LatencyMS * pwfx->nAvgBytesPerSec / (m_nWaveBufferSize * 1000); + std::size_t numBuffers = Util::Round<int32>(m_Settings.Latency * pwfx->nAvgBytesPerSec / m_nWaveBufferSize); numBuffers = Clamp(numBuffers, WAVEOUT_MINBUFFERS, WAVEOUT_MAXBUFFERS); m_nPreparedHeaders = 0; m_WaveBuffers.resize(numBuffers); Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.h 2014-09-09 07:24:31 UTC (rev 4267) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.h 2014-09-09 08:28:34 UTC (rev 4268) @@ -53,6 +53,9 @@ bool InternalHasGetStreamPosition() const { return true; } int64 InternalGetStreamPositionFrames() const; + SoundDeviceCaps InternalGetDeviceCaps(); + SoundDeviceDynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); + public: static void CALLBACK WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD_PTR, DWORD_PTR dw1, DWORD_PTR dw2); static std::vector<SoundDeviceInfo> EnumerateDevices(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-09 08:52:24
|
Revision: 4270 http://sourceforge.net/p/modplug/code/4270 Author: manxorist Date: 2014-09-09 08:52:08 +0000 (Tue, 09 Sep 2014) Log Message: ----------- [Ref] Add mptAtomic.h that implements a small subset of C++11 <atomic>. Only uint32 and T* are implemented and usage requires the use of explicit typedefs/macros mpt::atomic_uint32_t or MPT_ATOMIC_PTR<T*> instead of the standard templated form. This is done in order to reduce implementation complexity. The syntax and semantics of member functions (as far as implemented) are compatible with C++11. [Ref] sounddev: Convert atomics from MSVC intrinsics to mpt::atomic. Modified Paths: -------------- trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h Added Paths: ----------- trunk/OpenMPT/common/mptAtomic.h Modified: trunk/OpenMPT/build/autotools/Makefile.am =================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/build/autotools/Makefile.am 2014-09-09 08:52:08 UTC (rev 4270) @@ -84,6 +84,7 @@ libopenmpt_la_SOURCES += common/Logging.h libopenmpt_la_SOURCES += common/misc_util.cpp libopenmpt_la_SOURCES += common/misc_util.h +libopenmpt_la_SOURCES += common/mptAtomic.h libopenmpt_la_SOURCES += common/mptFstream.h libopenmpt_la_SOURCES += common/mptPathString.cpp libopenmpt_la_SOURCES += common/mptPathString.h @@ -279,6 +280,7 @@ libopenmpttest_SOURCES += common/Logging.h libopenmpttest_SOURCES += common/misc_util.cpp libopenmpttest_SOURCES += common/misc_util.h +libopenmpttest_SOURCES += common/mptAtomic.h libopenmpttest_SOURCES += common/mptFstream.h libopenmpttest_SOURCES += common/mptPathString.cpp libopenmpttest_SOURCES += common/mptPathString.h Added: trunk/OpenMPT/common/mptAtomic.h =================================================================== --- trunk/OpenMPT/common/mptAtomic.h (rev 0) +++ trunk/OpenMPT/common/mptAtomic.h 2014-09-09 08:52:08 UTC (rev 4270) @@ -0,0 +1,310 @@ +/* + * mptAtomic.h + * ----------- + * Purpose: Subset of C++11 std::atomic implementation as mpt::atomic_* and MPT_ATOMIC_PTR<T*> + * Notes : Only 32 bit signed and unsigned integer and pointers are supported. + * The interface (as far as implemented) is syntax-compatbile with C++11 + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + + +#pragma once + + +#if MPT_COMPILER_GENERIC +#include <atomic> +#endif // MPT_COMPILER + + +OPENMPT_NAMESPACE_BEGIN + + +#if defined(MODPLUG_TRACKER) + + +namespace mpt +{ + + +#if MPT_COMPILER_CLANG || MPT_COMPILER_GCC + +template < typename T > +class atomic_impl { + +private: + mutable T Data; + +private: // disabled + atomic_impl( const atomic_impl<T> & src ); + atomic_impl<T> & operator = ( const atomic_impl<T> & src ); + +public: + + atomic_impl() { + return; + } + atomic_impl( T init ) { + T old = __sync_fetch_and_add( &Data, 0 ); + while ( old != __sync_val_compare_and_swap( &Data, old, init ) ) { + // nothing + } + } + T operator = ( T src ) { + T old = __sync_fetch_and_add( &Data, 0 ); + while ( old != __sync_val_compare_and_swap( &Data, old, src ) ) { + // nothing + } + return src; + } + + operator T () const { + return __sync_fetch_and_add( &Data, 0 ); + } + + bool is_lock_free() const { + return true; + } + + T load() const { + return __sync_fetch_and_add( &Data, 0 ); + } + void store( T val ) { + T old = __sync_fetch_and_add( &Data, 0 ); + while ( old != __sync_val_compare_and_swap( &Data, old, val ) ) { + // nothing + } + } + T exchange( T val ) { + T old = __sync_fetch_and_add( &Data, 0 ); + while ( old != __sync_val_compare_and_swap( &Data, old, val ) ) { + // nothing + } + return old; + } + + bool compare_exchange_strong( T & expected, T new_value ) { + return __sync_bool_compare_and_swap( &Data, expected, new_value ); + } + bool compare_exchange_weak( T & expected, T new_value ) { + return __sync_bool_compare_and_swap( &Data, expected, new_value ); + } + + T fetch_add( T val ) { + return __sync_fetch_and_add( &Data, val ); + } + T fetch_sub( T val ) { + return __sync_fetch_and_sub( &Data, val ); + } + + T fetch_and( T val ) { + return __sync_fetch_and_and( &Data, val ); + } + T fetch_or( T val ) { + return __sync_fetch_and_or( &Data, val ); + } + T fetch_xor( T val ) { + return __sync_fetch_and_xor( &Data, val ); + } + +}; // class atomic + +#elif MPT_COMPILER_MSVC + +template < typename T > +class atomic_impl_32 { + +private: + mutable long Data; + +private: // disabled + atomic_impl_32( const atomic_impl_32<T> & src ); + atomic_impl_32<T> & operator = ( const atomic_impl_32<T> & src ); + +public: + + atomic_impl_32() { + return; + } + atomic_impl_32( T init ) { + _InterlockedExchange( &Data, init ); + } + T operator = ( T src ) { + _InterlockedExchange( &Data, src ); + return src; + } + + operator T () const { + return _InterlockedExchangeAdd( &Data, 0 ); + } + + bool is_lock_free() const { + return true; + } + + T load() const { + return _InterlockedExchangeAdd( &Data, 0 ); + } + void store( T val ) { + _InterlockedExchange( &Data, val ); + } + T exchange( T val ) { + return _InterlockedExchange( &Data, val ); + } + + bool compare_exchange_strong( T & expected, T new_value ) { + return _InterlockedCompareExchange( &Data, new_value, expected ) == expected; + } + bool compare_exchange_weak( T & expected, T new_value ) { + return _InterlockedCompareExchange( &Data, new_value, expected ) == expected; + } + + T fetch_add( T val ) { + return _InterlockedExchangeAdd( &Data, val ); + } + T fetch_sub( T val ) { + return _InterlockedExchangeAdd( &Data, -val ); + } + + T fetch_and( T val ) { + return _InterlockedAnd( &Data, val ); + } + T fetch_or( T val ) { + return _InterlockedOr( &Data, val ); + } + T fetch_xor( T val ) { + return _InterlockedXor( &Data, val ); + } + +}; // class atomic_impl_32 + +#if defined(_M_AMD64) + +template < typename T > +class atomic_impl_ptr { + +private: + mutable __int64 Data; + +private: // disabled + atomic_impl_ptr( const atomic_impl_ptr<T> & src ); + atomic_impl_ptr<T> & operator = ( const atomic_impl_ptr<T> & src ); + +public: + + atomic_impl_ptr() { + return; + } + atomic_impl_ptr( T init ) { + _InterlockedExchange64( &Data, reinterpret_cast<std::uintptr_t>( init ) ); + } + T operator = ( T src ) { + _InterlockedExchange64( &Data, reinterpret_cast<std::uintptr_t>( src ) ); + return src; + } + + operator T () const { + return reinterpret_cast<T>( _InterlockedExchangeAdd64( &Data, reinterpret_cast<std::uintptr_t>( 0 ) ) ); + } + + bool is_lock_free() const { + return true; + } + + T load() const { + return reinterpret_cast<T>( _InterlockedExchangeAdd64( &Data, reinterpret_cast<std::uintptr_t>( 0 ) ) ); + } + void store( T val ) { + _InterlockedExchange64( &Data, reinterpret_cast<std::uintptr_t>( val ) ); + } + T exchange( T val ) { + return reinterpret_cast<T>( _InterlockedExchange64( &Data, reinterpret_cast<std::uintptr_t>( val ) ) ); + } + + bool compare_exchange_strong( T & expected, T new_value ) { + return reinterpret_cast<T>( _InterlockedCompareExchange64( &Data, new_value, reinterpret_cast<std::uintptr_t>( expected ) ) ) == expected; + } + bool compare_exchange_weak( T & expected, T new_value ) { + return reinterpret_cast<T>( _InterlockedCompareExchange64( &Data, new_value, reinterpret_cast<std::uintptr_t>( expected ) ) ) == expected; + } + +}; // class atomic_impl_ptr + +#elif defined(_M_X86) + +template < typename T > +class atomic_impl_ptr { + +private: + mutable long Data; + +private: // disabled + atomic_impl_ptr( const atomic_impl_ptr<T> & src ); + atomic_impl_ptr<T> & operator = ( const atomic_impl_ptr<T> & src ); + +public: + + atomic_impl_ptr() { + return; + } + atomic_impl_ptr( T init ) { + _InterlockedExchange( &Data, reinterpret_cast<std::uintptr_t>( init ) ); + } + T operator = ( T src ) { + _InterlockedExchange( &Data, reinterpret_cast<std::uintptr_t>( src ) ); + return src; + } + + operator T () const { + return reinterpret_cast<T>( _InterlockedExchangeAdd( &Data, reinterpret_cast<std::uintptr_t>( 0 ) ) ); + } + + bool is_lock_free() const { + return true; + } + + T load() const { + return reinterpret_cast<T>( _InterlockedExchangeAdd( &Data, reinterpret_cast<std::uintptr_t>( 0 ) ) ); + } + void store( T val ) { + _InterlockedExchange( &Data, reinterpret_cast<std::uintptr_t>( val ) ); + } + T exchange( T val ) { + return reinterpret_cast<T>( _InterlockedExchange( &Data, reinterpret_cast<std::uintptr_t>( val ) ) ); + } + + bool compare_exchange_strong( T & expected, T new_value ) { + return reinterpret_cast<T>( _InterlockedCompareExchange( &Data, new_value, reinterpret_cast<std::uintptr_t>( expected ) ) ) == expected; + } + bool compare_exchange_weak( T & expected, T new_value ) { + return reinterpret_cast<T>( _InterlockedCompareExchange( &Data, new_value, reinterpret_cast<std::uintptr_t>( expected ) ) ) == expected; + } + +}; // class atomic_impl_ptr + +#endif + +#endif // MPT_COMPILER + +#if MPT_COMPILER_CLANG || MPT_COMPILER_GCC +typedef mpt::atomic_impl<std::uint32_t> atomic_uint32_t; +typedef mpt::atomic_impl<std::int32_t> atomic_int32_t; +#define MPT_ATOMIC_PTR mpt::atomic_impl // use as MPT_ATOMIC_PTR<T*> +#elif MPT_COMPILER_MSVC +typedef mpt::atomic_impl_32<std::uint32_t> atomic_uint32_t; +typedef mpt::atomic_impl_32<std::int32_t> atomic_int32_t; +#define MPT_ATOMIC_PTR mpt::atomic_impl_ptr // use as MPT_ATOMIC_PTR<T*> +#else // MPT_COMPILER_GENERIC +typedef std::atomic<std::uint32_t> atomic_uint32_t; +typedef std::atomic<std::int32_t> atomic_int32_t; +#define MPT_ATOMIC_PTR std::atomic // use as MPT_ATOMIC_PTR<T*> +#endif // MPT_COMPILER + + +} // namespace mpt + + +#endif // MODPLUG_TRACKER + + +OPENMPT_NAMESPACE_END Property changes on: trunk/OpenMPT/common/mptAtomic.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-chdr \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-09-09 08:52:08 UTC (rev 4270) @@ -183,6 +183,7 @@ <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> + <ClInclude Include="..\common\mptAtomic.h" /> <ClInclude Include="..\common\mptFstream.h" /> <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-09-09 08:52:08 UTC (rev 4270) @@ -260,6 +260,9 @@ <ClInclude Include="..\common\Endianness.h"> <Filter>Header Files\common</Filter> </ClInclude> + <ClInclude Include="..\common\mptAtomic.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-09-09 08:52:08 UTC (rev 4270) @@ -191,6 +191,7 @@ <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> + <ClInclude Include="..\common\mptAtomic.h" /> <ClInclude Include="..\common\mptFstream.h" /> <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-09-09 08:52:08 UTC (rev 4270) @@ -266,6 +266,9 @@ <ClInclude Include="..\common\Endianness.h"> <Filter>Header Files\common</Filter> </ClInclude> + <ClInclude Include="..\common\mptAtomic.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-09-09 08:52:08 UTC (rev 4270) @@ -187,6 +187,7 @@ <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> + <ClInclude Include="..\common\mptAtomic.h" /> <ClInclude Include="..\common\mptFstream.h" /> <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-09-09 08:52:08 UTC (rev 4270) @@ -260,6 +260,9 @@ <ClInclude Include="..\common\Endianness.h"> <Filter>Header Files\common</Filter> </ClInclude> + <ClInclude Include="..\common\mptAtomic.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-09-09 08:52:08 UTC (rev 4270) @@ -1338,6 +1338,10 @@ > </File> <File + RelativePath="..\common\mptAtomic.h" + > + </File> + <File RelativePath="..\common\mptFstream.h" > </File> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-09-09 08:52:08 UTC (rev 4270) @@ -647,6 +647,7 @@ <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> + <ClInclude Include="..\common\mptAtomic.h" /> <ClInclude Include="..\common\mptFstream.h" /> <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-09-09 08:52:08 UTC (rev 4270) @@ -1017,6 +1017,9 @@ <ClInclude Include="..\common\Endianness.h"> <Filter>Header Files\common</Filter> </ClInclude> + <ClInclude Include="..\common\mptAtomic.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="res\bitmap1.bmp"> Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-09-09 08:52:08 UTC (rev 4270) @@ -141,7 +141,7 @@ m_StreamPositionRenderFrames = 0; m_StreamPositionOutputFrames = 0; - InterlockedExchange(&m_RequestFlags, 0); + m_RequestFlags.store(0); } @@ -238,7 +238,7 @@ m_BufferAttributes.Latency = m_Settings.Latency; m_BufferAttributes.UpdateInterval = m_Settings.UpdateInterval; m_BufferAttributes.NumBuffers = 0; - InterlockedExchange(&m_RequestFlags, 0); + m_RequestFlags.store(0); return InternalOpen(); } @@ -249,7 +249,7 @@ if(!IsOpen()) return true; Stop(); bool result = InternalClose(); - InterlockedExchange(&m_RequestFlags, 0); + m_RequestFlags.store(0); return result; } @@ -351,7 +351,7 @@ m_StreamPositionOutputFrames = 0; } m_Clock.SetResolution(1); - _InterlockedAnd(&m_RequestFlags, ~RequestFlagRestart); + m_RequestFlags.fetch_and(~RequestFlagRestart); if(!InternalStart()) { m_Clock.SetResolution(0); @@ -376,7 +376,7 @@ { InternalStop(); } - _InterlockedAnd(&m_RequestFlags, ~RequestFlagRestart); + m_RequestFlags.fetch_and(~RequestFlagRestart); m_Clock.SetResolution(0); m_IsPlaying = false; { Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2014-09-09 08:31:25 UTC (rev 4269) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2014-09-09 08:52:08 UTC (rev 4270) @@ -13,6 +13,7 @@ #include "../common/mutex.h" #include "../common/misc_util.h" +#include "../common/mptAtomic.h" #include "../soundlib/SampleFormat.h" #include <map> @@ -426,11 +427,11 @@ int64 m_StreamPositionRenderFrames; int64 m_StreamPositionOutputFrames; - mutable LONG m_RequestFlags; + mpt::atomic_uint32_t m_RequestFlags; public: - static const LONG RequestFlagClose = 1<<0; - static const LONG RequestFlagReset = 1<<1; - static const LONG RequestFlagRestart = 1<<2; + static const uint32 RequestFlagClose = 1<<0; + static const uint32 RequestFlagReset = 1<<1; + static const uint32 RequestFlagRestart = 1<<2; protected: @@ -443,9 +444,9 @@ void SourceAudioRead(void *buffer, std::size_t numFrames); void SourceAudioDone(std::size_t numFrames, int32 framesLatency); - void RequestClose() { _InterlockedOr(&m_RequestFlags, RequestFlagClose); } - void RequestReset() { _InterlockedOr(&m_RequestFlags, RequestFlagReset); } - void RequestRestart() { _InterlockedOr(&m_RequestFlags, RequestFlagRestart); } + void RequestClose() { m_RequestFlags.fetch_or(RequestFlagClose); } + void RequestReset() { m_RequestFlags.fetch_or(RequestFlagReset); } + void RequestRestart() { m_RequestFlags.fetch_or(RequestFlagRestart); } void AudioSendMessage(const std::string &str); @@ -495,7 +496,7 @@ bool Start(); void Stop(bool force = false); - LONG GetRequestFlags() const { return InterlockedExchangeAdd(&m_RequestFlags, 0); /* read */ } + uint32 GetRequestFlags() const { return m_RequestFlags.load(); } bool IsInited() const { return m_Caps.Available; } bool IsOpen() const { return IsInited() && InternalIsOpen(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-09 09:15:07
|
Revision: 4271 http://sourceforge.net/p/modplug/code/4271 Author: manxorist Date: 2014-09-09 09:14:56 +0000 (Tue, 09 Sep 2014) Log Message: ----------- [Fix] libopenmpt: Fixup VS2008 build. Modified Paths: -------------- trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj trunk/OpenMPT/build/vs2008/libopenmpt.sln trunk/OpenMPT/common/version.cpp Added Paths: ----------- trunk/OpenMPT/build/vs2008/libopenmpt_example_c/ trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.vcproj Removed Paths: ------------- trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.c.vcproj trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/ Modified: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-09-09 08:52:08 UTC (rev 4270) +++ trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-09-09 09:14:56 UTC (rev 4271) @@ -186,6 +186,10 @@ > </File> <File + RelativePath="..\..\..\common\mptAtomic.h" + > + </File> + <File RelativePath="..\..\..\common\mptFstream.h" > </File> Modified: trunk/OpenMPT/build/vs2008/libopenmpt.sln =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt.sln 2014-09-09 08:52:08 UTC (rev 4270) +++ trunk/OpenMPT/build/vs2008/libopenmpt.sln 2014-09-09 09:14:56 UTC (rev 4271) @@ -5,7 +5,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "..\gen\portaudio.vcproj", "{189B867F-FF4B-45A1-B741-A97492EE69AF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_example_c.c", "libopenmpt_example_c.c\libopenmpt_example_c.c.vcproj", "{89D1117D-7787-45C1-9240-A24AACF4A414}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_example_c", "libopenmpt_example_c\libopenmpt_example_c.vcproj", "{89D1117D-7787-45C1-9240-A24AACF4A414}" ProjectSection(ProjectDependencies) = postProject {189B867F-FF4B-45A1-B741-A97492EE69AF} = {189B867F-FF4B-45A1-B741-A97492EE69AF} {D19450B0-4497-418C-B3EC-10D51967814E} = {D19450B0-4497-418C-B3EC-10D51967814E} Deleted: trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.c.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj 2014-09-09 08:52:08 UTC (rev 4270) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.c.vcproj 2014-09-09 09:14:56 UTC (rev 4271) @@ -1,170 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9,00" - Name="libopenmpt_example_c.c" - ProjectGUID="{89D1117D-7787-45C1-9240-A24AACF4A414}" - RootNamespace="libopenmpt_example_cc" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="ksuser.lib ksguid.lib" - GenerateDebugInformation="true" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="ksuser.lib ksguid.lib" - GenerateDebugInformation="true" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <File - RelativePath="..\..\..\libopenmpt\examples\libopenmpt_example_c.c" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Copied: trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.vcproj (from rev 4270, trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj) =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.vcproj (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c/libopenmpt_example_c.vcproj 2014-09-09 09:14:56 UTC (rev 4271) @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libopenmpt_example_c" + ProjectGUID="{89D1117D-7787-45C1-9240-A24AACF4A414}" + RootNamespace="libopenmpt_example_cc" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="..\..\..\libopenmpt\examples\libopenmpt_example_c.c" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2014-09-09 08:52:08 UTC (rev 4270) +++ trunk/OpenMPT/common/version.cpp 2014-09-09 09:14:56 UTC (rev 4271) @@ -151,7 +151,7 @@ return revision; #else #if MPT_COMPILER_MSVC - #pragma message "SVN revision unknown. Please check your build system." + #pragma message("SVN revision unknown. Please check your build system.") #elif MPT_COMPILER_GCC || MPT_COMPILER_CLANG #warning "SVN revision unknown. Please check your build system." #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-09 19:36:40
|
Revision: 4274 http://sourceforge.net/p/modplug/code/4274 Author: saga-games Date: 2014-09-09 19:36:34 +0000 (Tue, 09 Sep 2014) Log Message: ----------- [Ref] Remove pointless reference counting mechanism in VST plugin class. Modified Paths: -------------- trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/soundlib/plugins/PlugInterface.h Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2014-09-09 10:00:31 UTC (rev 4273) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2014-09-09 19:36:34 UTC (rev 4274) @@ -661,7 +661,6 @@ //----------------------------------------------------------------------------------------------------------- { m_hLibrary = hLibrary; - m_nRefCount = 1; m_pPrev = nullptr; m_pNext = nullptr; m_pMixStruct = &mixStruct; @@ -831,9 +830,6 @@ CVstPlugin::~CVstPlugin() //----------------------- { -#ifdef VST_LOG - Log("~CVstPlugin: m_nRefCount=%d\n", m_nRefCount); -#endif CriticalSection cs; if (m_pEditor) @@ -875,22 +871,16 @@ } -size_t CVstPlugin::Release() -//-------------------------- +void CVstPlugin::Release() +//------------------------ { - if(!(--m_nRefCount)) + try { - try - { - delete this; - } catch (...) - { - ReportPlugException(L"Exception while destroying plugin!"); - } - - return 0; + delete this; + } catch (...) + { + ReportPlugException(L"Exception while destroying plugin!"); } - return m_nRefCount; } Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2014-09-09 10:00:31 UTC (rev 4273) +++ trunk/OpenMPT/mptrack/Vstplug.h 2014-09-09 19:36:34 UTC (rev 4274) @@ -168,7 +168,6 @@ CAbstractVstEditor *m_pEditor; CSoundFile &m_SndFile; - size_t m_nRefCount; uint32 m_nSampleRate; SNDMIXPLUGINSTATE m_MixState; @@ -258,8 +257,7 @@ size_t GetInputChannelList(std::vector<CHANNELINDEX> &list); public: - size_t AddRef() { return ++m_nRefCount; } - size_t Release(); + void Release(); void SaveAllParameters(); void RestoreAllParameters(long nProg=-1); void RecalculateGain(); Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.h =================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-09-09 10:00:31 UTC (rev 4273) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-09-09 19:36:34 UTC (rev 4274) @@ -38,8 +38,7 @@ //============== { public: - virtual size_t AddRef() = 0; - virtual size_t Release() = 0; + virtual void Release() = 0; virtual void SaveAllParameters() = 0; virtual void RestoreAllParameters(long nProg=-1) = 0; //rewbs.plugDefaultProgram: added param virtual void Process(float *pOutL, float *pOutR, size_t nSamples) = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |