From: <man...@us...> - 2013-11-19 23:54:20
|
Revision: 3273 http://sourceforge.net/p/modplug/code/3273 Author: manxorist Date: 2013-11-19 23:54:14 +0000 (Tue, 19 Nov 2013) Log Message: ----------- [Fix] sounddev: Allow ISoundDevice::Start to fail. This allows IsPlaying() to return false after Start failed which causes the using code to not be confused about the actual playback state. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.h trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.h trunk/OpenMPT/sounddev/SoundDevices.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-19 23:54:14 UTC (rev 3273) @@ -1180,7 +1180,7 @@ { if(!m_pSndFile) return false; // nothing to play if(!IsAudioDeviceOpen()) return false; - gpSoundDevice->Start(); + if(!gpSoundDevice->Start()) return false; if(!m_NotifyTimer) { m_NotifyTimer = SetTimer(TIMERID_NOTIFY, TrackerSettings::Instance().m_UpdateIntervalMS, NULL); Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-19 23:54:14 UTC (rev 3273) @@ -184,10 +184,10 @@ } -void ISoundDevice::Start() +bool ISoundDevice::Start() //------------------------ { - if(!IsOpen()) return; + if(!IsOpen()) return false; if(!IsPlaying()) { { @@ -196,9 +196,13 @@ m_StreamPositionRenderFrames = 0; m_StreamPositionOutputFrames = 0; } - InternalStart(); + if(!InternalStart()) + { + return false; + } m_IsPlaying = true; } + return true; } @@ -632,10 +636,11 @@ } -void CSoundDeviceWithThread::InternalStart() +bool CSoundDeviceWithThread::InternalStart() //------------------------------------------ { m_AudioThread.Activate(); + return true; } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-19 23:54:14 UTC (rev 3273) @@ -277,7 +277,7 @@ virtual bool InternalIsOpen() const = 0; virtual bool InternalOpen() = 0; - virtual void InternalStart() = 0; + virtual bool InternalStart() = 0; virtual void InternalStop() = 0; virtual bool InternalClose() = 0; @@ -300,7 +300,7 @@ bool Open(const SoundDeviceSettings &settings); bool Close(); - void Start(); + bool Start(); void Stop(); bool IsOpen() const { return InternalIsOpen(); } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-19 23:54:14 UTC (rev 3273) @@ -383,7 +383,7 @@ } -void CASIODevice::InternalStart() +bool CASIODevice::InternalStart() //------------------------------- { ALWAYS_ASSERT_WARN_MESSAGE(!CriticalSection::IsLocked(), "AudioCriticalSection locked while starting ASIO"); @@ -402,11 +402,13 @@ { CASIODevice::ReportASIOException("ASIO crash in start()\n"); m_bMixRunning = FALSE; + return false; } } else { SetRenderSilence(false, true); } + return true; } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-19 23:54:14 UTC (rev 3273) @@ -57,7 +57,7 @@ bool InternalOpen(); bool InternalClose(); void FillAudioBuffer(); - void InternalStart(); + bool InternalStart(); void InternalStop(); bool InternalIsOpen() const { return (m_pAsioDrv != nullptr); } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-19 23:54:14 UTC (rev 3273) @@ -122,10 +122,10 @@ } -void CPortaudioDevice::InternalStart() +bool CPortaudioDevice::InternalStart() //------------------------------------ { - Pa_StartStream(m_Stream); + return Pa_StartStream(m_Stream) == paNoError; } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-19 23:54:14 UTC (rev 3273) @@ -47,7 +47,7 @@ bool InternalOpen(); bool InternalClose(); void FillAudioBuffer(); - void InternalStart(); + bool InternalStart(); void InternalStop(); bool InternalIsOpen() const { return m_Stream ? true : false; } double GetCurrentLatency() const; Modified: trunk/OpenMPT/sounddev/SoundDevices.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevices.h 2013-11-19 23:31:49 UTC (rev 3272) +++ trunk/OpenMPT/sounddev/SoundDevices.h 2013-11-19 23:54:14 UTC (rev 3273) @@ -69,7 +69,7 @@ public: CSoundDeviceWithThread(SoundDeviceID id, const std::wstring &internalID) : ISoundDevice(id, internalID), m_AudioThread(*this) {} virtual ~CSoundDeviceWithThread() {} - void InternalStart(); + bool InternalStart(); void InternalStop(); virtual void StartFromSoundThread() = 0; virtual void StopFromSoundThread() = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-20 21:16:01
|
Revision: 3280 http://sourceforge.net/p/modplug/code/3280 Author: manxorist Date: 2013-11-20 21:15:52 +0000 (Wed, 20 Nov 2013) Log Message: ----------- [Ref] sounddev: Add ASIO/VST style timing information to the ISoundDevice rendering callbacks interface. A generic algorithm to gather a timing information erstimate is implemented which should work for any ISoundDevice. For devices that support accurate stream position query (waveout in the OpenMPT codebase), this is used to increase precision. The interface is prepared to support direct timing information forwarding from device APIs that support that (ASIO and PortAudio in the OpenMPT codebase), but this is not implemented yet. The timing information remains unused in GUI or plugin handling code as of now (this requires more work). Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h 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 Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -724,9 +724,10 @@ }; -void CMainFrame::AudioRead(const SoundDeviceSettings &settings, std::size_t numFrames, void *buffer) -//-------------------------------------------------------------------------------------------------- +void CMainFrame::AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) +//-------------------------------------------------------------------------------------------------------------------------- { + MPT_UNREFERENCED_PARAMETER(timeInfo); ASSERT(InAudioThread()); OPENMPT_PROFILE_FUNCTION(Profiler::Audio); StereoVuMeterTargetWrapper target(settings.sampleFormat, m_Dither, buffer); @@ -749,10 +750,11 @@ } -void CMainFrame::AudioDone(const SoundDeviceSettings &settings, std::size_t numFrames, int64 streamPosition) -//---------------------------------------------------------------------------------------------------------- +void CMainFrame::AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) +//---------------------------------------------------------------------------------------------------------------------------------- { MPT_UNREFERENCED_PARAMETER(settings); + MPT_UNREFERENCED_PARAMETER(timeInfo); ASSERT(InAudioThread()); OPENMPT_PROFILE_FUNCTION(Profiler::Notify); DoNotification(numFrames, streamPosition); Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -332,8 +332,8 @@ // from ISoundSource void FillAudioBufferLocked(IFillAudioBuffer &callback); - void AudioRead(const SoundDeviceSettings &settings, std::size_t numFrames, void *buffer); - void AudioDone(const SoundDeviceSettings &settings, std::size_t numFrames, int64 streamPosition); + void AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer); + void AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition); // from ISoundMessageReceiver void AudioMessage(const std::string &str); Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -106,6 +106,13 @@ } +void ISoundDevice::UpdateTimeInfo(SoundTimeInfo timeInfo) +//------------------------------------------------------- +{ + m_TimeInfo = timeInfo; +} + + bool ISoundDevice::Open(const SoundDeviceSettings &settings) //---------------------------------------------------------- { @@ -134,6 +141,13 @@ } +void ISoundDevice::FillAudioBuffer() +//---------------------------------- +{ + InternalFillAudioBuffer(); +} + + void ISoundDevice::SourceFillAudioBufferLocked() //---------------------------------------------- { @@ -144,6 +158,33 @@ } +void ISoundDevice::SourceAudioPreRead(std::size_t numFrames) +//---------------------------------------------------------- +{ + if(!InternalHasTimeInfo()) + { + if(InternalHasGetStreamPosition()) + { + SoundTimeInfo timeInfo; + timeInfo.StreamFrames = InternalHasGetStreamPosition(); + timeInfo.SystemTimestamp = m_Clock.Now() * (uint64)1000 * (uint64)1000; + timeInfo.Speed = 1.0; + UpdateTimeInfo(timeInfo); + } else + { + SoundTimeInfo timeInfo; + { + Util::lock_guard<Util::mutex> lock(m_StreamPositionMutex); + timeInfo.StreamFrames = m_StreamPositionRenderFrames + numFrames; + } + timeInfo.SystemTimestamp = (m_Clock.Now() + m_Settings.LatencyMS) * (uint64)1000 * (uint64)1000; + timeInfo.Speed = 1.0; + UpdateTimeInfo(timeInfo); + } + } +} + + void ISoundDevice::SourceAudioRead(void *buffer, std::size_t numFrames) //--------------------------------------------------------------------- { @@ -151,7 +192,7 @@ { return; } - m_Source->AudioRead(m_Settings, numFrames, buffer); + m_Source->AudioRead(m_Settings, m_TimeInfo, numFrames, buffer); } @@ -170,7 +211,7 @@ m_StreamPositionOutputFrames = m_StreamPositionRenderFrames - framesLatency; framesRendered = m_StreamPositionRenderFrames; } - m_Source->AudioDone(m_Settings, numFrames, framesRendered); + m_Source->AudioDone(m_Settings, m_TimeInfo, numFrames, framesRendered); } @@ -196,8 +237,10 @@ m_StreamPositionRenderFrames = 0; m_StreamPositionOutputFrames = 0; } + m_Clock.SetResolution(1); if(!InternalStart()) { + m_Clock.SetResolution(0); return false; } m_IsPlaying = true; @@ -213,6 +256,7 @@ if(IsPlaying()) { InternalStop(); + m_Clock.SetResolution(0); m_IsPlaying = false; { Util::lock_guard<Util::mutex> lock(m_StreamPositionMutex); Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -12,6 +12,7 @@ #pragma once #include "../common/mutex.h" +#include "../common/misc_util.h" #include "../soundlib/SampleFormat.h" #include <map> @@ -50,14 +51,29 @@ }; +struct SoundTimeInfo +{ + uint64 StreamFrames; + uint64 SystemTimestamp; + double Speed; + SoundTimeInfo() + : StreamFrames(0) + , SystemTimestamp(0) + , Speed(1.0) + { + return; + } +}; + + //================ class ISoundSource //================ { public: virtual void FillAudioBufferLocked(IFillAudioBuffer &callback) = 0; // take any locks needed while rendering audio and then call FillAudioBuffer - virtual void AudioRead(const SoundDeviceSettings &settings, std::size_t numFrames, void *buffer) = 0; - virtual void AudioDone(const SoundDeviceSettings &settings, std::size_t numFrames, int64 streamPosition) = 0; // in sample frames + virtual void AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) = 0; + virtual void AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) = 0; // in sample frames }; @@ -250,6 +266,9 @@ bool m_IsPlaying; + Util::MultimediaClock m_Clock; + SoundTimeInfo m_TimeInfo; + mutable Util::mutex m_StreamPositionMutex; double m_CurrentUpdateInterval; int64 m_StreamPositionRenderFrames; @@ -257,9 +276,12 @@ protected: - virtual void FillAudioBuffer() = 0; + virtual void InternalFillAudioBuffer() = 0; + void FillAudioBuffer(); + void SourceFillAudioBufferLocked(); + void SourceAudioPreRead(std::size_t numFrames); void SourceAudioRead(void *buffer, std::size_t numFrames); void SourceAudioDone(std::size_t numFrames, int32 framesLatency); @@ -270,7 +292,10 @@ bool FillWaveFormatExtensible(WAVEFORMATEXTENSIBLE &WaveFormat); void UpdateBufferAttributes(SoundBufferAttributes attributes); + void UpdateTimeInfo(SoundTimeInfo timeInfo); + virtual bool InternalHasTimeInfo() const { return false; } + virtual bool InternalHasGetStreamPosition() const { return false; } virtual int64 InternalGetStreamPositionFrames() const { return 0; } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -586,8 +586,8 @@ } -void CASIODevice::FillAudioBuffer() -//--------------------------------- +void CASIODevice::InternalFillAudioBuffer() +//----------------------------------------- { const bool rendersilence = (InterlockedExchangeAdd(&m_RenderSilence, 0) == 1); const int channels = m_Settings.Channels; @@ -598,6 +598,7 @@ std::memset(&m_SampleBuffer[0], 0, countChunk * channels * sizeof(int32)); } else { + SourceAudioPreRead(countChunk); SourceAudioRead(&m_SampleBuffer[0], countChunk); } for(int channel = 0; channel < channels; ++channel) @@ -695,7 +696,7 @@ InterlockedExchange(&m_RenderingSilence, rendersilence ? 1 : 0 ); if(rendersilence) { - FillAudioBuffer(); + InternalFillAudioBuffer(); } else { SourceFillAudioBufferLocked(); Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -58,7 +58,7 @@ public: bool InternalOpen(); bool InternalClose(); - void FillAudioBuffer(); + void InternalFillAudioBuffer(); bool InternalStart(); void InternalStop(); bool InternalIsOpen() const { return (m_pAsioDrv != nullptr); } Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -289,7 +289,7 @@ //---------------------------------------- { if(!m_pMixBuffer) return; - // done in FillAudioBuffer for now + // done in InternalFillAudioBuffer for now } @@ -363,8 +363,8 @@ } -void CDSoundDevice::FillAudioBuffer() -//----------------------------------- +void CDSoundDevice::InternalFillAudioBuffer() +//------------------------------------------- { LPVOID lpBuf1=NULL, lpBuf2=NULL; DWORD dwSize1=0, dwSize2=0; @@ -375,6 +375,10 @@ if (dwBytes) { const std::size_t bytesPerFrame = m_Settings.GetBytesPerFrame(); + std::size_t countChunk = 0; + if(lpBuf1 && (dwSize1 > 0)) countChunk += dwSize1/bytesPerFrame; + if(lpBuf2 && (dwSize2 > 0)) countChunk += dwSize2/bytesPerFrame; + SourceAudioPreRead(countChunk); if ((lpBuf1) && (dwSize1)) SourceAudioRead(lpBuf1, dwSize1/bytesPerFrame); if ((lpBuf2) && (dwSize2)) SourceAudioRead(lpBuf2, dwSize2/bytesPerFrame); UnlockBuffer(lpBuf1, dwSize1, lpBuf2, dwSize2); Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -42,7 +42,7 @@ public: bool InternalOpen(); bool InternalClose(); - void FillAudioBuffer(); + void InternalFillAudioBuffer(); void StartFromSoundThread(); void StopFromSoundThread(); bool InternalIsOpen() const { return (m_pMixBuffer != NULL); } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -136,12 +136,13 @@ } -void CPortaudioDevice::FillAudioBuffer() -//-------------------------------------- +void CPortaudioDevice::InternalFillAudioBuffer() +//---------------------------------------------- { if(m_CurrentFrameCount == 0) return; + SourceAudioPreRead(m_CurrentFrameCount); SourceAudioRead(m_CurrentFrameBuffer, m_CurrentFrameCount); - SourceAudioDone(m_CurrentFrameCount, static_cast<ULONG>(m_CurrentRealLatency * m_StreamInfo->sampleRate)); + SourceAudioDone(m_CurrentFrameCount, Util::Round<int32>(m_CurrentRealLatency * m_StreamInfo->sampleRate)); } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -46,7 +46,7 @@ public: bool InternalOpen(); bool InternalClose(); - void FillAudioBuffer(); + void InternalFillAudioBuffer(); bool InternalStart(); void InternalStop(); bool InternalIsOpen() const { return m_Stream ? true : false; } Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-20 21:15:52 UTC (rev 3280) @@ -131,7 +131,7 @@ if(m_hWaveOut) { m_JustStarted = true; - // Actual starting is done in FillAudioBuffer to avoid crackling with tiny buffers. + // Actual starting is done in InternalFillAudioBuffer to avoid crackling with tiny buffers. } } @@ -147,8 +147,8 @@ } -void CWaveDevice::FillAudioBuffer() -//--------------------------------- +void CWaveDevice::InternalFillAudioBuffer() +//----------------------------------------- { if(!m_hWaveOut) { @@ -163,6 +163,7 @@ ULONG nBytesWritten = 0; while(oldBuffersPending < m_nPreparedHeaders) { + SourceAudioPreRead(m_nWaveBufferSize / bytesPerFrame); SourceAudioRead(m_WaveBuffers[m_nWriteBuffer].lpData, m_nWaveBufferSize / bytesPerFrame); nLatency += m_nWaveBufferSize; nBytesWritten += m_nWaveBufferSize; Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.h 2013-11-20 17:35:29 UTC (rev 3279) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.h 2013-11-20 21:15:52 UTC (rev 3280) @@ -41,7 +41,7 @@ public: bool InternalOpen(); bool InternalClose(); - void FillAudioBuffer(); + void InternalFillAudioBuffer(); void StartFromSoundThread(); void StopFromSoundThread(); bool InternalIsOpen() const { return (m_hWaveOut != NULL); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-21 16:44:44
|
Revision: 3283 http://sourceforge.net/p/modplug/code/3283 Author: manxorist Date: 2013-11-21 16:44:35 +0000 (Thu, 21 Nov 2013) Log Message: ----------- [Ref] sounddev: Small cleanups. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2013-11-21 00:51:53 UTC (rev 3282) +++ trunk/OpenMPT/common/misc_util.cpp 2013-11-21 16:44:35 UTC (rev 3283) @@ -159,6 +159,11 @@ return timeGetTime(); } +uint64 MultimediaClock::NowNanoseconds() const +{ + return (uint64)timeGetTime() * (uint64)1000000; +} + } // namespace Util #endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-11-21 00:51:53 UTC (rev 3282) +++ trunk/OpenMPT/common/misc_util.h 2013-11-21 16:44:35 UTC (rev 3283) @@ -547,6 +547,10 @@ // The epoch (offset) of the timestamps is undefined but constant until the next system reboot. // The resolution is the value returned from GetResolution(). uint32 Now() const; + // Returns current instantaneous timestamp in nanoseconds. + // The epoch (offset) of the timestamps is undefined but constant until the next system reboot. + // The resolution is the value returned from GetResolution() in milliseconds. + uint64 NowNanoseconds() const; }; } // namespace Util Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-21 00:51:53 UTC (rev 3282) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-21 16:44:35 UTC (rev 3283) @@ -14,7 +14,6 @@ #include "Moddoc.h" #include "Mainfrm.h" #include "../sounddev/SoundDevice.h" -#include "../sounddev/SoundDeviceASIO.h" #include "../common/version.h" #include "UpdateCheck.h" #include "Mpdlgs.h" Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-21 00:51:53 UTC (rev 3282) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-21 16:44:35 UTC (rev 3283) @@ -167,7 +167,7 @@ { SoundTimeInfo timeInfo; timeInfo.StreamFrames = InternalHasGetStreamPosition(); - timeInfo.SystemTimestamp = m_Clock.Now() * (uint64)1000 * (uint64)1000; + timeInfo.SystemTimestamp = Clock().NowNanoseconds(); timeInfo.Speed = 1.0; UpdateTimeInfo(timeInfo); } else @@ -177,7 +177,7 @@ Util::lock_guard<Util::mutex> lock(m_StreamPositionMutex); timeInfo.StreamFrames = m_StreamPositionRenderFrames + numFrames; } - timeInfo.SystemTimestamp = m_Clock.Now() * (uint64)1000 * (uint64)1000 + Util::Round<int64>(m_BufferAttributes.Latency * 1000.0 * 1000.0 * 1000.0); + timeInfo.SystemTimestamp = Clock().NowNanoseconds() + Util::Round<int64>(m_BufferAttributes.Latency * 1000000000.0); timeInfo.Speed = 1.0; UpdateTimeInfo(timeInfo); } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-21 00:51:53 UTC (rev 3282) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-21 16:44:35 UTC (rev 3283) @@ -291,6 +291,8 @@ bool FillWaveFormatExtensible(WAVEFORMATEXTENSIBLE &WaveFormat); + const Util::MultimediaClock & Clock() const { return m_Clock; } + void UpdateBufferAttributes(SoundBufferAttributes attributes); void UpdateTimeInfo(SoundTimeInfo timeInfo); @@ -335,6 +337,7 @@ SampleFormat GetActualSampleFormat() const { return IsOpen() ? m_Settings.sampleFormat : SampleFormatInvalid; } SoundBufferAttributes GetBufferAttributes() const { return m_BufferAttributes; } + SoundTimeInfo GetTimeInfo() const { return m_TimeInfo; } // Informational only, do not use for timing. // Use GetStreamPositionFrames() for timing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-21 19:02:55
|
Revision: 3286 http://sourceforge.net/p/modplug/code/3286 Author: manxorist Date: 2013-11-21 19:02:46 +0000 (Thu, 21 Nov 2013) Log Message: ----------- [Imp] sounddev: Add a hidden setting to use hardware timing (defaults to off). [Imp] ASIO: Implement gathering timing information directly from the ASIO driver (this is still mostly not tested). Modified Paths: -------------- trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.h Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-21 18:46:06 UTC (rev 3285) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-21 19:02:46 UTC (rev 3286) @@ -159,6 +159,7 @@ , m_SampleFormat(conf, "Sound Settings", "BitsPerSample", SoundDeviceSettings().sampleFormat) , m_SoundDeviceExclusiveMode(conf, "Sound Settings", "ExclusiveMode", SoundDeviceSettings().ExclusiveMode) , m_SoundDeviceBoostThreadPriority(conf, "Sound Settings", "BoostThreadPriority", SoundDeviceSettings().BoostThreadPriority) + , m_SoundDeviceUseHardwareTiming(conf, "Sound Settings", "UseHardwareTiming", SoundDeviceSettings().UseHardwareTiming) , m_SoundDeviceBaseChannel(conf, "Sound Settings", "ASIOBaseChannel", SoundDeviceSettings().BaseChannel) , MixerMaxChannels(conf, "Sound Settings", "MixChannels", MixerSettings().m_nMaxMixChannels) , MixerDSPMask(conf, "Sound Settings", "Quality", MixerSettings().DSPMask) Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-21 18:46:06 UTC (rev 3285) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-21 19:02:46 UTC (rev 3286) @@ -276,6 +276,7 @@ Setting<SampleFormat> m_SampleFormat; Setting<bool> m_SoundDeviceExclusiveMode; Setting<bool> m_SoundDeviceBoostThreadPriority; + Setting<bool> m_SoundDeviceUseHardwareTiming; Setting<uint32> m_SoundDeviceBaseChannel; SoundDeviceSettings GetSoundDeviceSettings() const; void SetSoundDeviceSettings(const SoundDeviceSettings &settings); Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-21 18:46:06 UTC (rev 3285) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-21 19:02:46 UTC (rev 3286) @@ -167,6 +167,7 @@ SampleFormat sampleFormat; bool ExclusiveMode; // Use hardware buffers directly bool BoostThreadPriority; // Boost thread priority for glitch-free audio rendering + bool UseHardwareTiming; uint32 BaseChannel; SoundDeviceSettings() : hWnd(NULL) @@ -177,6 +178,7 @@ , sampleFormat(SampleFormatInt16) , ExclusiveMode(false) , BoostThreadPriority(true) + , UseHardwareTiming(false) , BaseChannel(0) { return; @@ -192,6 +194,7 @@ && sampleFormat == cmp.sampleFormat && ExclusiveMode == cmp.ExclusiveMode && BoostThreadPriority == cmp.BoostThreadPriority + && UseHardwareTiming == cmp.UseHardwareTiming && BaseChannel == cmp.BaseChannel ; } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-21 18:46:06 UTC (rev 3285) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-21 19:02:46 UTC (rev 3286) @@ -194,6 +194,7 @@ m_CanOutputReady = false; m_DeviceRunning = false; + m_TotalFramesWritten = 0; m_BufferIndex = 0; InterlockedExchange(&m_RenderSilence, 0); InterlockedExchange(&m_RenderingSilence, 0); @@ -215,12 +216,13 @@ Init(); - Log(mpt::String::Print("ASIO: Open(%1:'%2'): %3-bit, %4 channels, %5Hz" + Log(mpt::String::Print("ASIO: Open(%1:'%2'): %3-bit, %4 channels, %5Hz, hw-timing=%6" , GetDeviceIndex() , mpt::ToLocale(GetDeviceInternalID()) , m_Settings.sampleFormat.GetBitsPerSample() , m_Settings.Channels , m_Settings.Samplerate + , m_Settings.UseHardwareTiming )); try @@ -369,6 +371,8 @@ m_CanOutputReady = false; } + m_StreamPositionOffset = m_nAsioBufferLen; + m_SampleBuffer.resize(m_nAsioBufferLen * m_Settings.Channels); SoundBufferAttributes bufferAttributes; @@ -464,6 +468,7 @@ { asioCall(start()); m_DeviceRunning = true; + m_TotalFramesWritten = 0; } catch(...) { return false; @@ -494,6 +499,7 @@ { // continue } + m_TotalFramesWritten = 0; m_DeviceRunning = false; } SetRenderSilence(false); @@ -780,6 +786,73 @@ } +bool CASIODevice::InternalHasTimeInfo() const +//------------------------------------------- +{ + return m_Settings.UseHardwareTiming; +} + + +bool CASIODevice::InternalHasGetStreamPosition() const +//---------------------------------------------------- +{ + return m_Settings.UseHardwareTiming; +} + + +int64 CASIODevice::InternalGetStreamPositionFrames() const +//-------------------------------------------------------- +{ + if(m_Settings.UseHardwareTiming) + { + const uint64 asioNow = Clock().NowNanoseconds(); + SoundTimeInfo timeInfo = GetTimeInfo(); + int64 currentStreamPositionFrames = + Util::Round<int64>( + timeInfo.StreamFrames + ((double)((int64)(asioNow - timeInfo.SystemTimestamp)) * timeInfo.Speed * m_Settings.Samplerate / (1000.0 * 1000.0)) + ) + ; + return currentStreamPositionFrames; + } else + { + return ISoundDevice::InternalGetStreamPositionFrames(); + } +} + + +void CASIODevice::UpdateTimeInfo(AsioTimeInfo asioTimeInfo) +//--------------------------------------------------------- +{ + if(m_Settings.UseHardwareTiming) + { + if((asioTimeInfo.flags & kSamplePositionValid) && (asioTimeInfo.flags & kSystemTimeValid)) + { + double speed = 1.0; + if((asioTimeInfo.flags & kSpeedValid) && (asioTimeInfo.speed > 0.0)) + { + speed = asioTimeInfo.speed; + } else if((asioTimeInfo.flags & kSampleRateValid) && (asioTimeInfo.sampleRate > 0.0)) + { + speed *= asioTimeInfo.sampleRate / m_Settings.Samplerate; + } + SoundTimeInfo timeInfo; + timeInfo.StreamFrames = ((((uint64)asioTimeInfo.samplePosition.hi) << 32) | asioTimeInfo.samplePosition.lo) - m_StreamPositionOffset; + timeInfo.SystemTimestamp = (((uint64)asioTimeInfo.systemTime.hi) << 32) | asioTimeInfo.systemTime.lo; + timeInfo.Speed = speed; + ISoundDevice::UpdateTimeInfo(timeInfo); + } else + { // spec violation or nothing provided at all, better to estimate this stuff ourselves + const uint64 asioNow = Clock().NowNanoseconds(); + SoundTimeInfo timeInfo; + timeInfo.StreamFrames = m_TotalFramesWritten + m_nAsioBufferLen - m_StreamPositionOffset; + timeInfo.SystemTimestamp = asioNow + Util::Round<int64>(GetBufferAttributes().Latency * 1000.0 * 1000.0 * 1000.0); + timeInfo.Speed = 1.0; + ISoundDevice::UpdateTimeInfo(timeInfo); + } + } +} + + void CASIODevice::BufferSwitch(long doubleBufferIndex, ASIOBool directProcess) //---------------------------------------------------------------------------- { @@ -792,16 +865,61 @@ { ASSERT(directProcess); // !directProcess is not handled correctly in OpenMPT, would require a separate thread and potentially additional buffering MPT_UNREFERENCED_PARAMETER(directProcess); + if(m_Settings.UseHardwareTiming) + { + if(params) + { + UpdateTimeInfo(params->timeInfo); + } else + { + AsioTimeInfo asioTimeInfo; + MemsetZero(asioTimeInfo); + UpdateTimeInfo(asioTimeInfo); + try + { + ASIOSamples samplePosition; + ASIOTimeStamp systemTime; + MemsetZero(samplePosition); + MemsetZero(systemTime); + if(asioCallUncatched(getSamplePosition(&samplePosition, &systemTime)) == ASE_OK) + { + AsioTimeInfo asioTimeInfoQueried; + MemsetZero(asioTimeInfoQueried); + asioTimeInfoQueried.flags = kSamplePositionValid | kSystemTimeValid; + asioTimeInfoQueried.samplePosition = samplePosition; + asioTimeInfoQueried.systemTime = systemTime; + asioTimeInfoQueried.speed = 1.0; + ASIOSampleRate sampleRate; + MemsetZero(sampleRate); + if(asioCallUncatched(getSampleRate(&sampleRate)) == ASE_OK) + { + if(sampleRate >= 0.0) + { + asioTimeInfoQueried.flags |= kSampleRateValid; + asioTimeInfoQueried.sampleRate = sampleRate; + } + } + asioTimeInfo = asioTimeInfoQueried; + } + } catch(...) + { + // continue + } + UpdateTimeInfo(asioTimeInfo); + } + } m_BufferIndex = doubleBufferIndex; bool rendersilence = (InterlockedExchangeAdd(&m_RenderSilence, 0) == 1); InterlockedExchange(&m_RenderingSilence, rendersilence ? 1 : 0 ); if(rendersilence) { + m_StreamPositionOffset += m_nAsioBufferLen; FillAudioBuffer(); } else { SourceFillAudioBufferLocked(); } + m_TotalFramesWritten += m_nAsioBufferLen; return params; } @@ -827,7 +945,7 @@ result = 1; break; case kAsioSupportsTimeInfo: - result = 0; + result = m_Settings.UseHardwareTiming ? 1 : 0; break; case kAsioResetRequest: case kAsioBufferSizeChange: @@ -844,7 +962,7 @@ result = 2; break; case kAsioSupportsTimeInfo: - result = 0; + result = m_Settings.UseHardwareTiming ? 1 : 0; break; case kAsioResetRequest: case kAsioBufferSizeChange: Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-21 18:46:06 UTC (rev 3285) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.h 2013-11-21 19:02:46 UTC (rev 3286) @@ -44,11 +44,15 @@ bool m_CanOutputReady; bool m_DeviceRunning; + uint64 m_TotalFramesWritten; long m_BufferIndex; LONG m_RenderSilence; LONG m_RenderingSilence; + int64 m_StreamPositionOffset; + private: + void UpdateTimeInfo(AsioTimeInfo asioTimeInfo); static bool IsSampleTypeFloat(ASIOSampleType sampleType); static std::size_t GetSampleSize(ASIOSampleType sampleType); @@ -82,6 +86,10 @@ void CloseDriver(); bool IsDriverOpen() const { return (m_pAsioDrv != nullptr); } + bool InternalHasTimeInfo() const; + bool InternalHasGetStreamPosition() const; + int64 InternalGetStreamPositionFrames() const; + protected: long AsioMessage(long selector, long value, void* message, double* opt); void SampleRateDidChange(ASIOSampleRate sRate); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-22 12:16:55
|
Revision: 3290 http://sourceforge.net/p/modplug/code/3290 Author: manxorist Date: 2013-11-22 12:16:45 +0000 (Fri, 22 Nov 2013) Log Message: ----------- [Ref] sounddev: Pass buffer attributes to AudioRead. [Ref] Add TimingInfo to CSoundFile. [Ref] Fill CSoundFile timing info in AudioRead. [Fix] VST: Pass the actual obtained output latency to VST plugins instead of the user wanted latency. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-22 12:16:45 UTC (rev 3290) @@ -724,12 +724,17 @@ }; -void CMainFrame::AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) -//-------------------------------------------------------------------------------------------------------------------------- +void CMainFrame::AudioRead(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) +//------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { - MPT_UNREFERENCED_PARAMETER(timeInfo); ASSERT(InAudioThread()); OPENMPT_PROFILE_FUNCTION(Profiler::Audio); + TimingInfo timingInfo; + timingInfo.OutputLatency = bufferAttributes.Latency; + timingInfo.StreamFrames = timeInfo.StreamFrames; + timingInfo.SystemTimestamp = timeInfo.SystemTimestamp; + timingInfo.Speed = timeInfo.Speed; + m_pSndFile->m_TimingInfo = timingInfo; StereoVuMeterTargetWrapper target(settings.sampleFormat, m_Dither, buffer); CSoundFile::samplecount_t renderedFrames = m_pSndFile->Read(numFrames, target); ASSERT(renderedFrames <= numFrames); @@ -750,14 +755,16 @@ } -void CMainFrame::AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) -//---------------------------------------------------------------------------------------------------------------------------------- +void CMainFrame::AudioDone(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) +//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { MPT_UNREFERENCED_PARAMETER(settings); + MPT_UNREFERENCED_PARAMETER(bufferAttributes); MPT_UNREFERENCED_PARAMETER(timeInfo); ASSERT(InAudioThread()); OPENMPT_PROFILE_FUNCTION(Profiler::Notify); DoNotification(numFrames, streamPosition); + //m_pSndFile->m_TimingInfo = TimingInfo(); // reset } Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2013-11-22 12:16:45 UTC (rev 3290) @@ -332,8 +332,8 @@ // from ISoundSource void FillAudioBufferLocked(IFillAudioBuffer &callback); - void AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer); - void AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition); + void AudioRead(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer); + void AudioDone(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition); // from ISoundMessageReceiver void AudioMessage(const std::string &str); Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-11-22 12:16:45 UTC (rev 3290) @@ -231,8 +231,15 @@ case audioMasterGetOutputLatency: if(pVstPlugin) { - return Util::muldiv(TrackerSettings::Instance().m_LatencyMS, pVstPlugin->m_nSampleRate, 1000); + if(pVstPlugin->GetSoundFile().IsRenderingToDisc()) + { + return 0; + } else + { + return Util::Round<VstIntPtr>(pVstPlugin->GetSoundFile().m_TimingInfo.OutputLatency * pVstPlugin->m_nSampleRate); + } } + break; // input pin in <value> (-1: first to come), returns cEffect* - DEPRECATED in VST 2.4 case audioMasterGetPreviousPlug: Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-22 12:16:45 UTC (rev 3290) @@ -192,7 +192,7 @@ { return; } - m_Source->AudioRead(m_Settings, m_TimeInfo, numFrames, buffer); + m_Source->AudioRead(m_Settings, m_BufferAttributes, m_TimeInfo, numFrames, buffer); } @@ -211,7 +211,7 @@ m_StreamPositionOutputFrames = m_StreamPositionRenderFrames - framesLatency; framesRendered = m_StreamPositionRenderFrames; } - m_Source->AudioDone(m_Settings, m_TimeInfo, numFrames, framesRendered); + m_Source->AudioDone(m_Settings, m_BufferAttributes, m_TimeInfo, numFrames, framesRendered); } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-22 12:16:45 UTC (rev 3290) @@ -31,6 +31,7 @@ struct SoundDeviceSettings; +struct SoundBufferAttributes; //==================== @@ -72,8 +73,8 @@ { public: virtual void FillAudioBufferLocked(IFillAudioBuffer &callback) = 0; // take any locks needed while rendering audio and then call FillAudioBuffer - virtual void AudioRead(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) = 0; - virtual void AudioDone(const SoundDeviceSettings &settings, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) = 0; // in sample frames + virtual void AudioRead(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, void *buffer) = 0; + virtual void AudioDone(const SoundDeviceSettings &settings, const SoundBufferAttributes &bufferAttributes, SoundTimeInfo timeInfo, std::size_t numFrames, int64 streamPosition) = 0; // in sample frames }; Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-11-22 09:05:29 UTC (rev 3289) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-11-22 12:16:45 UTC (rev 3290) @@ -187,6 +187,25 @@ #endif // MODPLUG_TRACKER +struct TimingInfo +{ + double InputLatency; // seconds + double OutputLatency; // seconds + int64 StreamFrames; + uint64 SystemTimestamp; // nanoseconds + double Speed; + TimingInfo() + : InputLatency(0.0) + , OutputLatency(0.0) + , StreamFrames(0) + , SystemTimestamp(0) + , Speed(1.0) + { + return; + } +}; + + class IAudioReadTarget { public: @@ -411,6 +430,7 @@ #endif // MODPLUG_TRACKER bool m_bIsRendering; + TimingInfo m_TimingInfo; // only valid if !m_bIsRendering bool m_bPatternTransitionOccurred; private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-23 08:18:46
|
Revision: 3293 http://sourceforge.net/p/modplug/code/3293 Author: manxorist Date: 2013-11-23 08:18:31 +0000 (Sat, 23 Nov 2013) Log Message: ----------- [Ref] sounddev: Pass a complete channel mapping around instead of just a base channel offset (there is no GUI yet though). [Ref] ASIO: Handle channel mappings. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/common/misc_util.h 2013-11-23 08:18:31 UTC (rev 3293) @@ -107,6 +107,50 @@ } +namespace mpt { namespace String { + +// Combine a vector of values into a string, separated with the given separator. +// No escaping is performed. +template<typename T> +std::string Combine(const std::vector<T> &vals, const std::string &sep=",") +//------------------------------------------------------------------------- +{ + std::string str; + for(std::size_t i = 0; i < vals.size(); ++i) + { + if(i > 0) + { + str += sep; + } + str += mpt::ToString(vals[i]); + } + return str; +} + +// Split the given string at separator positions into individual values returned as a vector. +// An empty string results in an empty vector. +// Leading or trailing separators result in a default-constructed element being inserted before or after the other elements. +template<typename T> +std::vector<T> Split(const std::string &str, const std::string &sep=",") +//---------------------------------------------------------------------- +{ + std::vector<T> vals; + std::size_t pos = 0; + while(str.find(sep, pos) != std::string::npos) + { + vals.push_back(ConvertStrTo<int>(str.substr(pos, str.find(sep, pos) - pos))); + pos = str.find(sep, pos) + sep.length(); + } + if(!vals.empty() || (str.substr(pos).length() > 0)) + { + vals.push_back(ConvertStrTo<T>(str.substr(pos))); + } + return vals; +} + +} } // namespace mpt::String + + // Memset given object to zero. template <class T> inline void MemsetZero(T &a) Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/common/versionNumber.h 2013-11-23 08:18:31 UTC (rev 3293) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //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 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-23 08:18:31 UTC (rev 3293) @@ -334,7 +334,7 @@ { int ndx = m_CbnBaseChannel.AddString(mpt::ToCString(m_CurrentDeviceCaps.channelNames[channel])); m_CbnBaseChannel.SetItemData(ndx, channel); - if(channel == m_Settings.BaseChannel) + if(channel == m_Settings.ChannelMapping.GetBaseChannel()) { sel = ndx; } @@ -595,7 +595,7 @@ { if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO) { - m_Settings.BaseChannel = m_CbnBaseChannel.GetItemData(m_CbnBaseChannel.GetCurSel()); + m_Settings.ChannelMapping = SoundChannelMapping::BaseChannel(m_Settings.Channels, m_CbnBaseChannel.GetItemData(m_CbnBaseChannel.GetCurSel())); } } CMainFrame::GetMainFrame()->SetupSoundCard(m_Settings, m_CurrentDeviceInfo.id); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-23 08:18:31 UTC (rev 3293) @@ -160,7 +160,7 @@ , m_SoundDeviceExclusiveMode(conf, "Sound Settings", "ExclusiveMode", SoundDeviceSettings().ExclusiveMode) , m_SoundDeviceBoostThreadPriority(conf, "Sound Settings", "BoostThreadPriority", SoundDeviceSettings().BoostThreadPriority) , m_SoundDeviceUseHardwareTiming(conf, "Sound Settings", "UseHardwareTiming", SoundDeviceSettings().UseHardwareTiming) - , m_SoundDeviceBaseChannel(conf, "Sound Settings", "ASIOBaseChannel", SoundDeviceSettings().BaseChannel) + , m_SoundDeviceChannelMapping(conf, "Sound Settings", "ChannelMapping", SoundDeviceSettings().ChannelMapping) , MixerMaxChannels(conf, "Sound Settings", "MixChannels", MixerSettings().m_nMaxMixChannels) , MixerDSPMask(conf, "Sound Settings", "Quality", MixerSettings().DSPMask) , MixerFlags(conf, "Sound Settings", "SoundSetup", MixerSettings().MixerFlags) @@ -337,6 +337,10 @@ } // Sound Settings + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,07,03)) + { + m_SoundDeviceChannelMapping = SoundChannelMapping::BaseChannel(MixerOutputChannels, conf.Read<int>("Sound Settings", "ASIOBaseChannel", 0)); + } if(storedVersion < MAKE_VERSION_NUMERIC(1,21,01,26)) { if(m_BufferLength_DEPRECATED != 0) @@ -464,7 +468,7 @@ settings.sampleFormat = m_SampleFormat; settings.ExclusiveMode = m_SoundDeviceExclusiveMode; settings.BoostThreadPriority = m_SoundDeviceBoostThreadPriority; - settings.BaseChannel = m_SoundDeviceBaseChannel; + settings.ChannelMapping = m_SoundDeviceChannelMapping; return settings; } @@ -478,7 +482,7 @@ m_SampleFormat = settings.sampleFormat; m_SoundDeviceExclusiveMode = settings.ExclusiveMode; m_SoundDeviceBoostThreadPriority = settings.BoostThreadPriority; - m_SoundDeviceBaseChannel = settings.BaseChannel; + m_SoundDeviceChannelMapping = settings.ChannelMapping; } Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-23 08:18:31 UTC (rev 3293) @@ -204,6 +204,9 @@ template<> inline SettingValue ToSettingValue(const SampleFormat &val) { return SettingValue(int32(val.value)); } template<> inline SampleFormat FromSettingValue(const SettingValue &val) { return SampleFormatEnum(val.as<int32>()); } +template<> inline SettingValue ToSettingValue(const SoundChannelMapping &val) { return SettingValue(val.ToString(), "ChannelMapping"); } +template<> inline SoundChannelMapping FromSettingValue(const SettingValue &val) { ASSERT(val.GetTypeTag() == "ChannelMapping"); return SoundChannelMapping::FromString(val.as<std::string>()); } + template<> inline SettingValue ToSettingValue(const ResamplingMode &val) { return SettingValue(int32(val)); } template<> inline ResamplingMode FromSettingValue(const SettingValue &val) { return ResamplingMode(val.as<int32>()); } @@ -277,7 +280,7 @@ Setting<bool> m_SoundDeviceExclusiveMode; Setting<bool> m_SoundDeviceBoostThreadPriority; Setting<bool> m_SoundDeviceUseHardwareTiming; - Setting<uint32> m_SoundDeviceBaseChannel; + Setting<SoundChannelMapping> m_SoundDeviceChannelMapping; SoundDeviceSettings GetSoundDeviceSettings() const; void SetSoundDeviceSettings(const SoundDeviceSettings &settings); Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-23 08:18:31 UTC (rev 3293) @@ -26,6 +26,78 @@ #include <iterator> + +SoundChannelMapping::SoundChannelMapping() +//---------------------------------------- +{ + return; +} + + +SoundChannelMapping::SoundChannelMapping(const std::vector<uint32> &mapping) +//-------------------------------------------------------------------------- + : ChannelToDeviceChannel(mapping) +{ + return; +} + + +SoundChannelMapping SoundChannelMapping::BaseChannel(uint32 channels, uint32 baseChannel) +//--------------------------------------------------------------------------------------- +{ + SoundChannelMapping result; + result.ChannelToDeviceChannel.clear(); + if(baseChannel == 0) + { + return result; + } + result.ChannelToDeviceChannel.resize(channels); + for(uint32 channel = 0; channel < channels; ++channel) + { + result.ChannelToDeviceChannel[channel] = channel + baseChannel; + } + return result; +} + + +bool SoundChannelMapping::IsValid(uint32 channels) const +//------------------------------------------------------ +{ + if(ChannelToDeviceChannel.empty()) + { + return true; + } + if(ChannelToDeviceChannel.size() < channels) + { + return false; + } + std::map<uint32, uint32> inverseMapping; + for(uint32 channel = 0; channel < channels; ++channel) + { + inverseMapping[ChannelToDeviceChannel[channel]] = channel; + } + if(inverseMapping.size() != channels) + { + return false; + } + return true; +} + + +std::string SoundChannelMapping::ToString() const +//----------------------------------------------- +{ + return mpt::String::Combine<uint32>(ChannelToDeviceChannel); +} + + +SoundChannelMapping SoundChannelMapping::FromString(const std::string &str) +//------------------------------------------------------------------------- +{ + return SoundChannelMapping(mpt::String::Split<uint32>(str)); +} + + /////////////////////////////////////////////////////////////////////////////////////// // // ISoundDevice base class @@ -125,6 +197,10 @@ 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; + if(!m_Settings.ChannelMapping.IsValid(m_Settings.Channels)) + { + return false; + } m_BufferAttributes.Latency = m_Settings.LatencyMS / 1000.0; m_BufferAttributes.UpdateInterval = m_Settings.UpdateIntervalMS / 1000.0; m_BufferAttributes.NumBuffers = 0; Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 08:18:31 UTC (rev 3293) @@ -158,6 +158,83 @@ #define SNDDEV_MAXUPDATEINTERVAL_MS 200 +struct SoundChannelMapping +{ + +private: + + std::vector<uint32> ChannelToDeviceChannel; + +public: + + // Construct default identity mapping + SoundChannelMapping(); + + // Construct mapping from given vector. + SoundChannelMapping(const std::vector<uint32> &mapping); + + // Construct mapping for #channels with a baseChannel offset. + static SoundChannelMapping BaseChannel(uint32 channels, uint32 baseChannel); + +public: + + bool operator == (const SoundChannelMapping &cmp) const + { + return (ChannelToDeviceChannel == cmp.ChannelToDeviceChannel); + } + + // check that the channel mapping is actually a 1:1 mapping + bool IsValid(uint32 channels) const; + + // Get the base channel offset. Deprecated because this has no defined semantics for more complex mappings. + MPT_DEPRECATED uint32 GetBaseChannel() const + { + if(ChannelToDeviceChannel.empty()) + { + return 0; + } + return ChannelToDeviceChannel[0]; + } + + // Get the number of required device channels for this mapping. Derived from the maximum mapped-to channel number. + uint32 GetRequiredDeviceChannels() const + { + if(ChannelToDeviceChannel.empty()) + { + return 0; + } + uint32 maxChannel = 0; + for(uint32 channel = 0; channel < ChannelToDeviceChannel.size(); ++channel) + { + if(ChannelToDeviceChannel[channel] > maxChannel) + { + maxChannel = ChannelToDeviceChannel[channel]; + } + } + return maxChannel + 1; + } + + // Convert OpenMPT channel number to the mapped device channel number. + uint32 ToDevice(uint32 channel) const + { + if(ChannelToDeviceChannel.empty()) + { + return channel; + } + if(channel >= ChannelToDeviceChannel.size()) + { + return channel; + } + return ChannelToDeviceChannel[channel]; + } + + std::string ToString() const; + + static SoundChannelMapping FromString(const std::string &str); + +}; + + struct SoundDeviceSettings { HWND hWnd; @@ -169,7 +246,7 @@ bool ExclusiveMode; // Use hardware buffers directly bool BoostThreadPriority; // Boost thread priority for glitch-free audio rendering bool UseHardwareTiming; - uint32 BaseChannel; + SoundChannelMapping ChannelMapping; SoundDeviceSettings() : hWnd(NULL) , LatencyMS(100) @@ -180,7 +257,6 @@ , ExclusiveMode(false) , BoostThreadPriority(true) , UseHardwareTiming(false) - , BaseChannel(0) { return; } @@ -196,7 +272,7 @@ && ExclusiveMode == cmp.ExclusiveMode && BoostThreadPriority == cmp.BoostThreadPriority && UseHardwareTiming == cmp.UseHardwareTiming - && BaseChannel == cmp.BaseChannel + && ChannelMapping == cmp.ChannelMapping ; } bool operator != (const SoundDeviceSettings &cmp) const Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-23 08:08:44 UTC (rev 3292) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-23 08:18:31 UTC (rev 3293) @@ -243,6 +243,10 @@ { throw ASIOException("Not enough output channels."); } + if(m_Settings.ChannelMapping.GetRequiredDeviceChannels() > (std::size_t)outputChannels) + { + throw ASIOException("Channel mapping requires more channels than available."); + } Log(mpt::String::Print("ASIO: setSampleRate(sampleRate=%1)", m_Settings.Samplerate)); asioCall(setSampleRate(m_Settings.Samplerate)); @@ -320,7 +324,7 @@ { MemsetZero(m_BufferInfo[channel]); m_BufferInfo[channel].isInput = ASIOFalse; - m_BufferInfo[channel].channelNum = channel + m_Settings.BaseChannel; // map MPT channel i to ASIO channel i + m_BufferInfo[channel].channelNum = m_Settings.ChannelMapping.ToDevice(channel); } m_Callbacks.bufferSwitch = CallbackBufferSwitch; m_Callbacks.sampleRateDidChange = CallbackSampleRateDidChange; @@ -337,13 +341,13 @@ { MemsetZero(m_ChannelInfo[channel]); m_ChannelInfo[channel].isInput = ASIOFalse; - m_ChannelInfo[channel].channel = channel + m_Settings.BaseChannel; // map MPT channel i to ASIO channel i + m_ChannelInfo[channel].channel = m_Settings.ChannelMapping.ToDevice(channel); asioCall(getChannelInfo(&m_ChannelInfo[channel])); ASSERT(m_ChannelInfo[channel].isActive); mpt::String::SetNullTerminator(m_ChannelInfo[channel].name); Log(mpt::String::Print("ASIO: getChannelInfo(isInput=%1 channel=%2) => isActive=%3 channelGroup=%4 type=%5 name='%6'" , ASIOFalse - , channel + m_Settings.BaseChannel + , m_Settings.ChannelMapping.ToDevice(channel) , m_ChannelInfo[channel].isActive , m_ChannelInfo[channel].channelGroup , m_ChannelInfo[channel].type This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-23 08:52:48
|
Revision: 3294 http://sourceforge.net/p/modplug/code/3294 Author: manxorist Date: 2013-11-23 08:52:35 +0000 (Sat, 23 Nov 2013) Log Message: ----------- [Ref] sounddev: Let FindDeviceInfo return an invalid sentinal instead of a nullptr in error case. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-23 08:18:31 UTC (rev 3293) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-23 08:52:35 UTC (rev 3294) @@ -242,7 +242,7 @@ OnUpdateFrameTitle(false); // Check for valid sound device - if(!theApp.GetSoundDevicesManager()->FindDeviceInfo(TrackerSettings::Instance().m_nWaveDevice)) + if(!theApp.GetSoundDevicesManager()->FindDeviceInfo(TrackerSettings::Instance().m_nWaveDevice).IsValid()) { // Fall back to default WaveOut device TrackerSettings::Instance().m_nWaveDevice = SoundDeviceID(); Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-23 08:18:31 UTC (rev 3293) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-23 08:52:35 UTC (rev 3294) @@ -116,7 +116,7 @@ void COptionsSoundcard::SetDevice(SoundDeviceID dev) //-------------------------------------------------- { - m_CurrentDeviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(dev) ? *(theApp.GetSoundDevicesManager()->FindDeviceInfo(dev)) : SoundDeviceInfo(); + m_CurrentDeviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(dev); m_CurrentDeviceCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice, true); } Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-23 08:18:31 UTC (rev 3293) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-23 08:52:35 UTC (rev 3294) @@ -852,17 +852,17 @@ } -const SoundDeviceInfo * SoundDevicesManager::FindDeviceInfo(SoundDeviceID id) const -//--------------------------------------------------------------------------------- +SoundDeviceInfo SoundDevicesManager::FindDeviceInfo(SoundDeviceID id) const +//------------------------------------------------------------------------- { for(std::vector<SoundDeviceInfo>::const_iterator it = begin(); it != end(); ++it) { if(it->id == id) { - return &(*it); + return *it; } } - return nullptr; + return SoundDeviceInfo(); } @@ -870,7 +870,7 @@ //-------------------------------------------------------------------------------------------------------------------------------------- { bool result = false; - if(currentSoundDevice && FindDeviceInfo(id) && (currentSoundDevice->GetDeviceID() == id) && (currentSoundDevice->GetDeviceInternalID() == FindDeviceInfo(id)->internalID)) + if(currentSoundDevice && FindDeviceInfo(id).IsValid() && (currentSoundDevice->GetDeviceID() == id) && (currentSoundDevice->GetDeviceInternalID() == FindDeviceInfo(id).internalID)) { result = currentSoundDevice->OpenDriverSettings(); } else @@ -892,7 +892,7 @@ { if((m_DeviceCaps.find(id) == m_DeviceCaps.end()) || update) { - if(currentSoundDevice && FindDeviceInfo(id) && (currentSoundDevice->GetDeviceID() == id) && (currentSoundDevice->GetDeviceInternalID() == FindDeviceInfo(id)->internalID)) + if(currentSoundDevice && FindDeviceInfo(id).IsValid() && (currentSoundDevice->GetDeviceID() == id) && (currentSoundDevice->GetDeviceInternalID() == FindDeviceInfo(id).internalID)) { m_DeviceCaps[id] = currentSoundDevice->GetDeviceCaps(baseSampleRates); } else @@ -913,20 +913,20 @@ ISoundDevice * SoundDevicesManager::CreateSoundDevice(SoundDeviceID id) //--------------------------------------------------------------------- { - const SoundDeviceInfo *info = FindDeviceInfo(id); - if(!info) + const SoundDeviceInfo info = FindDeviceInfo(id); + if(info.IsValid()) { return nullptr; } ISoundDevice *result = nullptr; switch(id.GetType()) { - case SNDDEV_WAVEOUT: result = new CWaveDevice(id, info->internalID); break; + case SNDDEV_WAVEOUT: result = new CWaveDevice(id, info.internalID); break; #ifndef NO_DSOUND - case SNDDEV_DSOUND: result = new CDSoundDevice(id, info->internalID); break; + case SNDDEV_DSOUND: result = new CDSoundDevice(id, info.internalID); break; #endif // NO_DSOUND #ifndef NO_ASIO - case SNDDEV_ASIO: result = new CASIODevice(id, info->internalID); break; + case SNDDEV_ASIO: result = new CASIODevice(id, info.internalID); break; #endif // NO_ASIO #ifndef NO_PORTAUDIO case SNDDEV_PORTAUDIO_WASAPI: @@ -934,7 +934,7 @@ case SNDDEV_PORTAUDIO_WMME: case SNDDEV_PORTAUDIO_DS: case SNDDEV_PORTAUDIO_ASIO: - result = SndDevPortaudioIsInitialized() ? new CPortaudioDevice(id, info->internalID) : nullptr; + result = SndDevPortaudioIsInitialized() ? new CPortaudioDevice(id, info.internalID) : nullptr; break; #endif // NO_PORTAUDIO } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 08:18:31 UTC (rev 3293) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 08:52:35 UTC (rev 3294) @@ -121,6 +121,10 @@ { return; } + bool IsValid() const + { + return (type > SNDDEV_INVALID); + } SoundDeviceType GetType() const { return type; } SoundDeviceIndex GetIndex() const { return index; } bool operator == (const SoundDeviceID &cmp) const @@ -436,7 +440,7 @@ std::wstring name; std::wstring apiName; std::wstring internalID; - SoundDeviceInfo() { } + SoundDeviceInfo() : id(SNDDEV_INVALID, 0) { } SoundDeviceInfo(SoundDeviceID id, const std::wstring &name, const std::wstring &apiName, const std::wstring &internalID = std::wstring()) : id(id) , name(name) @@ -445,6 +449,10 @@ { return; } + bool IsValid() const + { + return id.IsValid(); + } }; @@ -468,7 +476,7 @@ std::vector<SoundDeviceInfo>::const_iterator end() const { return m_SoundDevices.end(); } const std::vector<SoundDeviceInfo> & GetDeviceInfos() const { return m_SoundDevices; } - const SoundDeviceInfo * FindDeviceInfo(SoundDeviceID id) const; + SoundDeviceInfo FindDeviceInfo(SoundDeviceID id) const; bool OpenDriverSettings(SoundDeviceID id, ISoundMessageReceiver *messageReceiver = nullptr, ISoundDevice *currentSoundDevice = nullptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-23 09:28:37
|
Revision: 3296 http://sourceforge.net/p/modplug/code/3296 Author: manxorist Date: 2013-11-23 09:28:26 +0000 (Sat, 23 Nov 2013) Log Message: ----------- [Ref] sounddev: Do not encode whether a device is a default device by appending "(Default)" to the name. Use a separate flag instead. [Ref] WaveOut: Use the system-provided name for the default wave mapper device instead of our own string. Modified Paths: -------------- trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-23 08:59:55 UTC (rev 3295) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-23 09:28:26 UTC (rev 3296) @@ -275,6 +275,10 @@ cbi.iImage = IMAGE_WAVEOUT; break; } + if(it->isDefault) + { + name += " (Default)"; + } cbi.iSelectedImage = cbi.iImage; cbi.iOverlay = cbi.iImage; cbi.iIndent = 0; Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 08:59:55 UTC (rev 3295) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-23 09:28:26 UTC (rev 3296) @@ -440,12 +440,14 @@ std::wstring name; std::wstring apiName; std::wstring internalID; + bool isDefault; SoundDeviceInfo() : id(SNDDEV_INVALID, 0) { } SoundDeviceInfo(SoundDeviceID id, const std::wstring &name, const std::wstring &apiName, const std::wstring &internalID = std::wstring()) : id(id) , name(name) , apiName(apiName) , internalID(internalID) + , isDefault(false) { return; } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-23 08:59:55 UTC (rev 3295) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-23 09:28:26 UTC (rev 3296) @@ -322,8 +322,9 @@ if(!Pa_GetDeviceInfo(dev)) return false; result.id = SoundDeviceID(HostApiToSndDevType(hostapi), index); - result.name = mpt::ToWide(mpt::CharsetUTF8, std::string(Pa_GetDeviceInfo(dev)->name) + std::string(Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == (PaDeviceIndex)dev ? " (Default)" : "")); + result.name = mpt::ToWide(mpt::CharsetUTF8, Pa_GetDeviceInfo(dev)->name); result.apiName = mpt::ToWide(mpt::CharsetUTF8, HostApiToString(Pa_GetDeviceInfo(dev)->hostApi)); + result.isDefault = (Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == (PaDeviceIndex)dev); return true; } Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-23 08:59:55 UTC (rev 3295) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-23 09:28:26 UTC (rev 3296) @@ -244,15 +244,24 @@ SoundDeviceInfo info; info.id = SoundDeviceID(SNDDEV_WAVEOUT, static_cast<SoundDeviceIndex>(index)); info.apiName = L"WaveOut"; + WAVEOUTCAPSW woc; + MemsetZero(woc); if(index == 0) { - info.name = L"Auto (Wave Mapper)"; + if(waveOutGetDevCapsW(WAVE_MAPPER, &woc, sizeof(woc)) == MMSYSERR_NOERROR) + { + info.name = woc.szPname; + } else + { + info.name = L"Auto (Wave Mapper)"; + } + info.isDefault = true; } else { - WAVEOUTCAPSW woc; - MemsetZero(woc); - waveOutGetDevCapsW(index-1, &woc, sizeof(woc)); - info.name = woc.szPname; + if(waveOutGetDevCapsW(index-1, &woc, sizeof(woc)) == MMSYSERR_NOERROR) + { + info.name = woc.szPname; + } } devices.push_back(info); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-23 10:21:23
|
Revision: 3299 http://sourceforge.net/p/modplug/code/3299 Author: manxorist Date: 2013-11-23 10:21:12 +0000 (Sat, 23 Nov 2013) Log Message: ----------- [Ref] Move hex encoding and decoding from Settings.h into misc_util.h . Modified Paths: -------------- trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/mptrack/Settings.cpp trunk/OpenMPT/mptrack/Settings.h Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2013-11-23 09:49:52 UTC (rev 3298) +++ trunk/OpenMPT/common/misc_util.cpp 2013-11-23 10:21:12 UTC (rev 3299) @@ -328,3 +328,67 @@ } // namespace Util #endif // MODPLUG_TRACKER + + +namespace Util +{ + + +static const wchar_t EncodeNibble[16] = { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F' }; + +static inline bool DecodeByte(uint8 &byte, wchar_t c1, wchar_t c2) +{ + byte = 0; + if(L'0' <= c1 && c1 <= L'9') + { + byte += static_cast<uint8>((c1 - L'0') << 4); + } else if(L'A' <= c1 && c1 <= L'F') + { + byte += static_cast<uint8>((c1 - L'A' + 10) << 4); + } else + { + return false; + } + if(L'0' <= c2 && c2 <= L'9') + { + byte += static_cast<uint8>(c2 - L'0'); + } else if(L'A' <= c2 && c2 <= L'F') + { + byte += static_cast<uint8>(c2 - L'A' + 10); + } else + { + return false; + } + return true; +} + + +std::wstring BinToHex(const std::vector<char> &src) +{ + std::wstring result; + for(std::size_t i = 0; i < src.size(); ++i) + { + uint8 byte = src[i]; + result.push_back(EncodeNibble[(byte&0xf0)>>4]); + result.push_back(EncodeNibble[byte&0x0f]); + } + return result; +} + +std::vector<char> HexToBin(const std::wstring &src) +{ + std::vector<char> result; + for(std::size_t i = 0; i+1 < src.size(); i += 2) + { + uint8 byte = 0; + if(!DecodeByte(byte, src[i*2+0], src[i*2+1])) + { + return result; + } + result.push_back(byte); + } + return result; +} + + +} // namespace Util Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-11-23 09:49:52 UTC (rev 3298) +++ trunk/OpenMPT/common/misc_util.h 2013-11-23 10:21:12 UTC (rev 3299) @@ -628,4 +628,12 @@ bool IsCLSID(const std::wstring &str); } // namespace Util -#endif // MODPLUG_TRACKER \ No newline at end of file +#endif // MODPLUG_TRACKER + +namespace Util +{ + +std::wstring BinToHex(const std::vector<char> &src); +std::vector<char> HexToBin(const std::wstring &src); + +} // namespace Util Modified: trunk/OpenMPT/mptrack/Settings.cpp =================================================================== --- trunk/OpenMPT/mptrack/Settings.cpp 2013-11-23 09:49:52 UTC (rev 3298) +++ trunk/OpenMPT/mptrack/Settings.cpp 2013-11-23 10:21:12 UTC (rev 3299) @@ -23,64 +23,6 @@ #include <iterator> -static const wchar_t EncodeNibble[16] = { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F' }; - -static inline bool DecodeByte(uint8 &byte, wchar_t c1, wchar_t c2) -{ - byte = 0; - if(L'0' <= c1 && c1 <= L'9') - { - byte += static_cast<uint8>((c1 - L'0') << 4); - } else if(L'A' <= c1 && c1 <= L'F') - { - byte += static_cast<uint8>((c1 - L'A' + 10) << 4); - } else - { - return false; - } - if(L'0' <= c2 && c2 <= L'9') - { - byte += static_cast<uint8>(c2 - L'0'); - } else if(L'A' <= c2 && c2 <= L'F') - { - byte += static_cast<uint8>(c2 - L'A' + 10); - } else - { - return false; - } - return true; -} - - -std::wstring SettingBinToHex(const std::vector<char> &src) -{ - std::wstring result; - for(std::size_t i = 0; i < src.size(); ++i) - { - uint8 byte = src[i]; - result.push_back(EncodeNibble[(byte&0xf0)>>4]); - result.push_back(EncodeNibble[byte&0x0f]); - } - return result; -} - -std::vector<char> SettingHexToBin(const std::wstring &src) -{ - std::vector<char> result; - for(std::size_t i = 0; i+1 < src.size(); i += 2) - { - uint8 byte = 0; - if(!DecodeByte(byte, src[i*2+0], src[i*2+1])) - { - return result; - } - result.push_back(byte); - } - return result; -} - - - std::wstring SettingValue::FormatTypeAsString() const { if(GetType() == SettingTypeNone) @@ -135,7 +77,7 @@ return valueString; break; case SettingTypeBinary: - return SettingBinToHex(valueBinary); + return Util::BinToHex(valueBinary); break; case SettingTypeNone: default: @@ -168,7 +110,7 @@ valueString = newVal; break; case SettingTypeBinary: - valueBinary = SettingHexToBin(newVal); + valueBinary = Util::HexToBin(newVal); break; case SettingTypeNone: default: Modified: trunk/OpenMPT/mptrack/Settings.h =================================================================== --- trunk/OpenMPT/mptrack/Settings.h 2013-11-23 09:49:52 UTC (rev 3298) +++ trunk/OpenMPT/mptrack/Settings.h 2013-11-23 10:21:12 UTC (rev 3299) @@ -32,9 +32,6 @@ SettingTypeBinary, }; -std::wstring SettingBinToHex(const std::vector<char> &src); -std::vector<char> SettingHexToBin(const std::wstring &src); - // SettingValue is a variant type that stores any type that can natively be represented in a config backend. // Any other type that should be stored must provide a matching ToSettingValue and FromSettingValue. // Other types can optionally also set a type tag which would get checked in debug builds. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-24 16:02:34
|
Revision: 3304 http://sourceforge.net/p/modplug/code/3304 Author: manxorist Date: 2013-11-24 16:02:25 +0000 (Sun, 24 Nov 2013) Log Message: ----------- [Ref] sounddev: Move knowledge about which device type can set which parameters out of GUI code into the SoundDeviceCaps structure. Modified Paths: -------------- trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-24 13:22:10 UTC (rev 3303) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-24 16:02:25 UTC (rev 3304) @@ -328,11 +328,10 @@ } } m_CbnChannels.SetCurSel(n); - if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO) + if(m_CurrentDeviceCaps.CanChannelMapping) { m_CbnBaseChannel.ResetContent(); m_CbnBaseChannel.EnableWindow(TRUE); - m_BtnDriverPanel.ShowWindow(SW_SHOW); int sel = 0; for(std::size_t channel = 0; channel < m_CurrentDeviceCaps.channelNames.size(); ++channel) { @@ -348,8 +347,8 @@ { m_CbnBaseChannel.ResetContent(); m_CbnBaseChannel.EnableWindow(FALSE); - m_BtnDriverPanel.ShowWindow(SW_HIDE); } + m_BtnDriverPanel.ShowWindow(m_CurrentDeviceCaps.CanDriverPanel ? SW_SHOW : SW_HIDE); } @@ -358,17 +357,16 @@ { UINT n = 0; m_CbnSampleFormat.ResetContent(); - const bool asio = m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO; - if(asio) + if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO) { m_Settings.sampleFormat = TrackerSettings::Instance().m_SampleFormat; } - m_CbnSampleFormat.EnableWindow(asio ? FALSE : TRUE); + m_CbnSampleFormat.EnableWindow(m_CurrentDeviceCaps.CanSampleFormat ? TRUE : FALSE); for(UINT bits = 40; bits >= 8; bits -= 8) { if(bits == 40) { - if(!asio || (asio && SampleFormatFloat32 == m_Settings.sampleFormat)) + if(m_CurrentDeviceCaps.CanSampleFormat || (SampleFormatFloat32 == m_Settings.sampleFormat)) { UINT ndx = m_CbnSampleFormat.AddString("Floating Point"); m_CbnSampleFormat.SetItemData(ndx, (32+128)); @@ -379,7 +377,7 @@ } } else { - if(!asio || (asio && (SampleFormat)bits == m_Settings.sampleFormat)) + if(m_CurrentDeviceCaps.CanSampleFormat || ((SampleFormat)bits == m_Settings.sampleFormat)) { UINT ndx = m_CbnSampleFormat.AddString(mpt::String::Format("%d Bit", bits).c_str()); m_CbnSampleFormat.SetItemData(ndx, bits); @@ -507,12 +505,11 @@ void COptionsSoundcard::UpdateControls() //-------------------------------------- { - const SoundDeviceID dev = m_CurrentDeviceInfo.id; - GetDlgItem(IDC_CHECK4)->EnableWindow((dev.GetType() == SNDDEV_DSOUND || dev.GetType() == SNDDEV_PORTAUDIO_WASAPI) ? TRUE : FALSE); - GetDlgItem(IDC_CHECK5)->EnableWindow((dev.GetType() == SNDDEV_WAVEOUT || dev.GetType() == SNDDEV_DSOUND) ? TRUE : FALSE); - GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow((dev.GetType() == SNDDEV_ASIO) ? FALSE : TRUE); - GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow((dev.GetType() == SNDDEV_ASIO) ? FALSE : TRUE); - if(dev.GetType() == SNDDEV_DSOUND) + GetDlgItem(IDC_CHECK4)->EnableWindow(m_CurrentDeviceCaps.CanExclusiveMode ? TRUE : FALSE); + GetDlgItem(IDC_CHECK5)->EnableWindow(m_CurrentDeviceCaps.CanBoostThreadPriority ? TRUE : FALSE); + GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE); + GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE); + if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_DSOUND) { GetDlgItem(IDC_CHECK4)->SetWindowText("Use primary buffer"); } else Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-24 13:22:10 UTC (rev 3303) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-24 16:02:25 UTC (rev 3304) @@ -299,8 +299,22 @@ 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<std::wstring> channelNames; + bool CanUpdateInterval; + bool CanSampleFormat; + bool CanExclusiveMode; + bool CanBoostThreadPriority; + bool CanUseHardwareTiming; + bool CanChannelMapping; + bool CanDriverPanel; SoundDeviceCaps() : currentSampleRate(0) + , CanUpdateInterval(true) + , CanSampleFormat(true) + , CanExclusiveMode(false) + , CanBoostThreadPriority(true) + , CanUseHardwareTiming(false) + , CanChannelMapping(false) + , CanDriverPanel(false) { return; } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-24 13:22:10 UTC (rev 3303) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-24 16:02:25 UTC (rev 3304) @@ -1050,6 +1050,14 @@ { SoundDeviceCaps caps; + caps.CanUpdateInterval = false; + caps.CanSampleFormat = false; + caps.CanExclusiveMode = false; + caps.CanBoostThreadPriority = false; + caps.CanUseHardwareTiming = true; + caps.CanChannelMapping = true; + caps.CanDriverPanel = true; + TemporaryASIODriverOpener opener(*this); if(!IsDriverOpen()) { Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-24 13:22:10 UTC (rev 3303) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-24 16:02:25 UTC (rev 3304) @@ -114,6 +114,13 @@ //-------------------------------------------------------------------------------------- { SoundDeviceCaps caps; + caps.CanUpdateInterval = true; + caps.CanSampleFormat = true; + caps.CanExclusiveMode = true; + caps.CanBoostThreadPriority = true; + caps.CanUseHardwareTiming = false; + caps.CanChannelMapping = false; + caps.CanDriverPanel = false; IDirectSound *dummy = nullptr; IDirectSound *ds = nullptr; if(m_piDS) Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-24 13:22:10 UTC (rev 3303) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-24 16:02:25 UTC (rev 3304) @@ -83,7 +83,7 @@ { if(m_Settings.ExclusiveMode) { - m_StreamParameters.suggestedLatency = 0; // let portaudio choose + m_StreamParameters.suggestedLatency = 0.0; // let portaudio choose framesPerBuffer = paFramesPerBufferUnspecified; // let portaudio choose MemsetZero(m_WasapiStreamInfo); m_WasapiStreamInfo.size = sizeof(PaWasapiStreamInfo); @@ -178,6 +178,20 @@ //----------------------------------------------------------------------------------------- { SoundDeviceCaps caps; + caps.CanUpdateInterval = true; + caps.CanSampleFormat = true; + caps.CanExclusiveMode = false; + caps.CanBoostThreadPriority = false; + caps.CanUseHardwareTiming = false; + caps.CanChannelMapping = false; + caps.CanDriverPanel = false; + if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI)) + { + caps.CanExclusiveMode = true; + } else if(m_HostApi == Pa_HostApiTypeIdToHostApiIndex(paWDMKS)) + { + caps.CanUpdateInterval = false; + } PaDeviceIndex device = HostApiOutputIndexToGlobalDeviceIndex(GetDeviceIndex(), m_HostApi); if(device == -1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-24 19:28:21
|
Revision: 3305 http://sourceforge.net/p/modplug/code/3305 Author: manxorist Date: 2013-11-24 19:28:11 +0000 (Sun, 24 Nov 2013) Log Message: ----------- [Imp] sounddev: Remember device settings per device. Old settings are propagated to all found devices on the first start of the new version. [Fix] sounddev: The sound device itself is now remembered by an identifier string instead of a (api,id) pair to avoid catching the wrong device when the number or order of sound cards changes. [Mod] sounddev: Default to floating point output for new installations. [Imp] Cleanup the list of samplerates that OpenMPT presents to the user: Remove some totally uncommon ones and add the lower range of common ones instead. The user can still select the old uncommon ones by editing [Sound Settings]SampleRates. This even allows for samplerates that were previously unavailable. If the previously selected samplerate is not contained in the new default list of samplerates, it gets automatically added to the setting on the first start of the new version. [Mod] OpenMPT: Version is now 1.22.07.04 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpdlgs.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/common/versionNumber.h 2013-11-24 19:28:11 UTC (rev 3305) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 03 +#define VER_MINORMINOR 04 //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/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-11-24 19:28:11 UTC (rev 3305) @@ -804,7 +804,7 @@ } gpSoundDevice->SetMessageReceiver(this); gpSoundDevice->SetSource(this); - if(!gpSoundDevice->Open(TrackerSettings::Instance().GetSoundDeviceSettings())) + if(!gpSoundDevice->Open(TrackerSettings::Instance().GetSoundDeviceSettings(deviceID))) { Reporting::Error("Unable to open sound device: Could not open sound device."); return false; @@ -815,7 +815,9 @@ Reporting::Error("Unable to open sound device: Unknown sample format."); return false; } - TrackerSettings::Instance().m_SampleFormat = actualSampleFormat; + SoundDeviceSettings deviceSettings = TrackerSettings::Instance().GetSoundDeviceSettings(deviceID); + deviceSettings.sampleFormat = actualSampleFormat; + TrackerSettings::Instance().SetSoundDeviceSettings(deviceID, deviceSettings); return true; } @@ -1192,7 +1194,7 @@ if(!gpSoundDevice->Start()) return false; if(!m_NotifyTimer) { - m_NotifyTimer = SetTimer(TIMERID_NOTIFY, TrackerSettings::Instance().m_UpdateIntervalMS, NULL); + m_NotifyTimer = SetTimer(TIMERID_NOTIFY, std::max<int>(1, Util::Round<int>(gpSoundDevice->GetBufferAttributes().UpdateInterval * 1000.0)), NULL); } return true; } @@ -1595,7 +1597,7 @@ //------------------------------------------------------------------------------------------------ { const bool isPlaying = IsPlaying(); - if((TrackerSettings::Instance().GetSoundDeviceID() != deviceID) || (TrackerSettings::Instance().GetSoundDeviceSettings() != deviceSettings)) + if((TrackerSettings::Instance().GetSoundDeviceID() != deviceID) || (TrackerSettings::Instance().GetSoundDeviceSettings(deviceID) != deviceSettings)) { CModDoc *pActiveMod = NULL; if (isPlaying) @@ -1604,7 +1606,10 @@ PauseMod(); } TrackerSettings::Instance().SetSoundDeviceID(deviceID); - TrackerSettings::Instance().SetSoundDeviceSettings(deviceSettings); + TrackerSettings::Instance().SetSoundDeviceSettings(deviceID, deviceSettings); + + TrackerSettings::Instance().MixerOutputChannels = deviceSettings.Channels; + TrackerSettings::Instance().MixerSamplerate = deviceSettings.Samplerate; { CriticalSection cs; if (pActiveMod) UpdateAudioParameters(pActiveMod->GetrSoundFile(), FALSE); @@ -1772,7 +1777,7 @@ CPropertySheet dlg("OpenMPT Setup", this, m_nLastOptionsPage); COptionsGeneral general; - COptionsSoundcard sounddlg(TrackerSettings::Instance().GetSoundDeviceSettings(), TrackerSettings::Instance().GetSoundDeviceID()); + COptionsSoundcard sounddlg(TrackerSettings::Instance().GetSoundDeviceID()); COptionsKeyboard keyboard; COptionsColors colors; COptionsPlayer playerdlg; Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-11-24 19:28:11 UTC (rev 3305) @@ -103,21 +103,27 @@ } -COptionsSoundcard::COptionsSoundcard(const SoundDeviceSettings &settings, SoundDeviceID sd) -//----------------------------------------------------------------------------------------- +COptionsSoundcard::COptionsSoundcard(SoundDeviceID dev) +//----------------------------------------------------- : CPropertyPage(IDD_OPTIONS_SOUNDCARD) - , m_Settings(settings) + , m_CurrentDeviceInfo(theApp.GetSoundDevicesManager()->FindDeviceInfo(dev)) + , m_CurrentDeviceCaps(theApp.GetSoundDevicesManager()->GetDeviceCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice, true)) + , m_Settings(TrackerSettings::Instance().GetSoundDeviceSettings(dev)) { m_PreAmpNoteShowed = false; - SetDevice(sd); } -void COptionsSoundcard::SetDevice(SoundDeviceID dev) -//-------------------------------------------------- +void COptionsSoundcard::SetDevice(SoundDeviceID dev, bool forceReload) +//-------------------------------------------------------------------- { + bool deviceChanged = (dev != m_CurrentDeviceInfo.id); m_CurrentDeviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(dev); m_CurrentDeviceCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice, true); + if(deviceChanged || forceReload) + { + m_Settings = TrackerSettings::Instance().GetSoundDeviceSettings(dev); + } } @@ -144,31 +150,12 @@ } -void COptionsSoundcard::UpdateEverything() -//---------------------------------------- +void COptionsSoundcard::UpdateLatency() +//------------------------------------- { - - CHAR s[128]; - - CheckDlgButton(IDC_CHECK2, (TrackerSettings::Instance().MixerFlags & SNDMIX_SOFTPANNING) ? MF_CHECKED : MF_UNCHECKED); - CheckDlgButton(IDC_CHECK4, m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED); - CheckDlgButton(IDC_CHECK5, m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED); - - // Sampling Rate - UpdateSampleRates(); - - // Max Mixing Channels - { - m_CbnPolyphony.ResetContent(); - for (UINT n = 0; n < CountOf(nCPUMix); n++) - { - wsprintf(s, "%d (%s)", nCPUMix[n], szCPUNames[n]); - m_CbnPolyphony.AddString(s); - if (TrackerSettings::Instance().MixerMaxChannels == nCPUMix[n]) m_CbnPolyphony.SetCurSel(n); - } - } // latency { + CHAR s[128]; m_CbnLatencyMS.ResetContent(); wsprintf(s, "%d ms", m_Settings.LatencyMS); m_CbnLatencyMS.SetWindowText(s); @@ -190,8 +177,15 @@ m_CbnLatencyMS.AddString("200 ms"); m_CbnLatencyMS.AddString("250 ms"); } +} + + +void COptionsSoundcard::UpdateUpdateInterval() +//-------------------------------------------- +{ // update interval { + CHAR s[128]; m_CbnUpdateIntervalMS.ResetContent(); wsprintf(s, "%d ms", m_Settings.UpdateIntervalMS); m_CbnUpdateIntervalMS.SetWindowText(s); @@ -204,6 +198,27 @@ m_CbnUpdateIntervalMS.AddString("25 ms"); m_CbnUpdateIntervalMS.AddString("50 ms"); } +} + + +void COptionsSoundcard::UpdateEverything() +//---------------------------------------- +{ + + CHAR s[128]; + + CheckDlgButton(IDC_CHECK2, (TrackerSettings::Instance().MixerFlags & SNDMIX_SOFTPANNING) ? MF_CHECKED : MF_UNCHECKED); + + // Max Mixing Channels + { + m_CbnPolyphony.ResetContent(); + for (UINT n = 0; n < CountOf(nCPUMix); n++) + { + wsprintf(s, "%d (%s)", nCPUMix[n], szCPUNames[n]); + m_CbnPolyphony.AddString(s); + if (TrackerSettings::Instance().MixerMaxChannels == nCPUMix[n]) m_CbnPolyphony.SetCurSel(n); + } + } // Stereo Separation { m_SliderStereoSep.SetRange(0, 4); @@ -294,20 +309,28 @@ iItem++; } } - UpdateControls(); } + UpdateDevice(); + +} + + +void COptionsSoundcard::UpdateDevice() +//------------------------------------ +{ + UpdateControls(); + UpdateLatency(); + UpdateUpdateInterval(); + UpdateSampleRates(); UpdateChannels(); UpdateSampleFormat(); - } void COptionsSoundcard::UpdateChannels() //-------------------------------------- { - CHAR s[128]; - UINT n = 0; m_CbnChannels.ResetContent(); UINT maxChannels = 0; if(m_CurrentDeviceCaps.channelNames.size() > 0) @@ -317,21 +340,23 @@ { maxChannels = 4; } + int sel = 0; for(UINT channels = maxChannels; channels >= 1; channels /= 2) { - wsprintf(s, "%s", gszChnCfgNames[(channels+2)/2-1]); - UINT ndx = m_CbnChannels.AddString(s); + int ndx = m_CbnChannels.AddString(gszChnCfgNames[(channels+2)/2-1]); m_CbnChannels.SetItemData(ndx, channels); if(channels == m_Settings.Channels) { - n = ndx; + sel = ndx; } } - m_CbnChannels.SetCurSel(n); + m_CbnChannels.SetCurSel(sel); + + GetDlgItem(IDC_STATIC_BASECHANNEL)->EnableWindow(m_CurrentDeviceCaps.CanChannelMapping ? TRUE : FALSE); + m_CbnBaseChannel.EnableWindow(m_CurrentDeviceCaps.CanChannelMapping ? TRUE : FALSE); + m_CbnBaseChannel.ResetContent(); if(m_CurrentDeviceCaps.CanChannelMapping) { - m_CbnBaseChannel.ResetContent(); - m_CbnBaseChannel.EnableWindow(TRUE); int sel = 0; for(std::size_t channel = 0; channel < m_CurrentDeviceCaps.channelNames.size(); ++channel) { @@ -343,10 +368,6 @@ } } m_CbnBaseChannel.SetCurSel(sel); - } else - { - m_CbnBaseChannel.ResetContent(); - m_CbnBaseChannel.EnableWindow(FALSE); } m_BtnDriverPanel.ShowWindow(m_CurrentDeviceCaps.CanDriverPanel ? SW_SHOW : SW_HIDE); } @@ -357,10 +378,6 @@ { UINT n = 0; m_CbnSampleFormat.ResetContent(); - if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO) - { - m_Settings.sampleFormat = TrackerSettings::Instance().m_SampleFormat; - } m_CbnSampleFormat.EnableWindow(m_CurrentDeviceCaps.CanSampleFormat ? TRUE : FALSE); for(UINT bits = 40; bits >= 8; bits -= 8) { @@ -456,10 +473,7 @@ if(n >= 0) { SetDevice(SoundDeviceID::FromIdRaw(m_CbnDevice.GetItemData(n))); - UpdateControls(); - UpdateSampleRates(); - UpdateChannels(); - UpdateSampleFormat(); + UpdateDevice(); OnSettingsChanged(); } } @@ -516,6 +530,8 @@ { GetDlgItem(IDC_CHECK4)->SetWindowText("Use device exclusively"); } + CheckDlgButton(IDC_CHECK4, m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED); + CheckDlgButton(IDC_CHECK5, m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED); } @@ -563,14 +579,6 @@ CMainFrame::GetMainFrame()->SetupPlayer(); } } - // Sound Device - { - int n = m_CbnDevice.GetCurSel(); - if(n >= 0) - { - SetDevice(SoundDeviceID::FromIdRaw(m_CbnDevice.GetItemData(n))); - } - } const SoundDeviceID dev = m_CurrentDeviceInfo.id; // Latency { @@ -600,9 +608,8 @@ } } CMainFrame::GetMainFrame()->SetupSoundCard(m_Settings, m_CurrentDeviceInfo.id); - SetDevice(m_CurrentDeviceInfo.id); // Poll changed ASIO channel names - UpdateSampleFormat(); - UpdateChannels(); + SetDevice(m_CurrentDeviceInfo.id, true); // Poll changed ASIO sample format and channel names + UpdateDevice(); UpdateStatistics(); CPropertyPage::OnOK(); } Modified: trunk/OpenMPT/mptrack/Mpdlgs.h =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.h 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/Mpdlgs.h 2013-11-24 19:28:11 UTC (rev 3305) @@ -24,20 +24,23 @@ CComboBox m_CbnBaseChannel; CEdit m_EditStatistics; CButton m_BtnDriverPanel; - SoundDeviceSettings m_Settings; bool m_PreAmpNoteShowed; - void SetDevice(SoundDeviceID dev); + void SetDevice(SoundDeviceID dev, bool forceReload=false); SoundDeviceInfo m_CurrentDeviceInfo; SoundDeviceCaps m_CurrentDeviceCaps; + SoundDeviceSettings m_Settings; public: - COptionsSoundcard(const SoundDeviceSettings &settings, SoundDeviceID sd); + COptionsSoundcard(SoundDeviceID sd); void UpdateStatistics(); private: void UpdateEverything(); + void UpdateDevice(); + void UpdateLatency(); + void UpdateUpdateInterval(); void UpdateSampleRates(); void UpdateChannels(); void UpdateSampleFormat(); Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-11-24 19:28:11 UTC (rev 3305) @@ -838,6 +838,16 @@ // Load sound APIs m_pSoundDevicesManager = new SoundDevicesManager(); + if(TrackerSettings::Instance().m_SoundDeviceSettingsUseOldDefaults) + { + // get the old default device + TrackerSettings::Instance().m_SoundDeviceIdentifier = m_pSoundDevicesManager->FindDeviceInfo(TrackerSettings::Instance().m_SoundDeviceID_DEPRECATED).GetIdentifier(); + // apply old global sound device settings to each found device + for(std::vector<SoundDeviceInfo>::const_iterator it = m_pSoundDevicesManager->begin(); it != m_pSoundDevicesManager->end(); ++it) + { + TrackerSettings::Instance().SetSoundDeviceSettings(it->id, TrackerSettings::Instance().GetSoundDeviceSettingsDefaults()); + } + } // Load DLS Banks if (!cmdInfo.m_bNoDls) LoadDefaultDLSBanks(); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-24 19:28:11 UTC (rev 3305) @@ -23,6 +23,7 @@ #include "../common/misc_util.h" #include "PatternClipboard.h" +#include <algorithm> #define OLD_SOUNDSETUP_REVERSESTEREO 0x20 #define OLD_SOUNDSETUP_SECONDARY 0x40 @@ -151,16 +152,10 @@ , DefaultPlugVolumeHandling(conf, "Misc", "DefaultPlugVolumeHandling", PLUGIN_VOLUMEHANDLING_IGNORE) , autoApplySmoothFT2Ramping(conf, "Misc", "SmoothFT2Ramping", false) // Sound Settings + , m_SoundSampleRates(conf, "Sound Settings", "SampleRates", GetDefaultSampleRates()) , m_MorePortaudio(conf, "Sound Settings", "MorePortaudio", false) - , m_nWaveDevice(conf, "Sound Settings", "WaveDevice", SoundDeviceID()) - , m_BufferLength_DEPRECATED(conf, "Sound Settings", "BufferLength", 50) - , m_LatencyMS(conf, "Sound Settings", "Latency", SoundDeviceSettings().LatencyMS) - , m_UpdateIntervalMS(conf, "Sound Settings", "UpdateInterval", SoundDeviceSettings().UpdateIntervalMS) - , m_SampleFormat(conf, "Sound Settings", "BitsPerSample", SoundDeviceSettings().sampleFormat) - , m_SoundDeviceExclusiveMode(conf, "Sound Settings", "ExclusiveMode", SoundDeviceSettings().ExclusiveMode) - , m_SoundDeviceBoostThreadPriority(conf, "Sound Settings", "BoostThreadPriority", SoundDeviceSettings().BoostThreadPriority) - , m_SoundDeviceUseHardwareTiming(conf, "Sound Settings", "UseHardwareTiming", SoundDeviceSettings().UseHardwareTiming) - , m_SoundDeviceChannelMapping(conf, "Sound Settings", "ChannelMapping", SoundDeviceSettings().ChannelMapping) + , m_SoundDeviceSettingsUseOldDefaults(false) + , m_SoundDeviceIdentifier(conf, "Sound Settings", "Device", std::wstring()) , MixerMaxChannels(conf, "Sound Settings", "MixChannels", MixerSettings().m_nMaxMixChannels) , MixerDSPMask(conf, "Sound Settings", "Quality", MixerSettings().DSPMask) , MixerFlags(conf, "Sound Settings", "SoundSetup", MixerSettings().MixerFlags) @@ -337,27 +332,68 @@ } // Sound Settings - if(storedVersion < MAKE_VERSION_NUMERIC(1,22,07,03)) + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,07,04)) { - m_SoundDeviceChannelMapping = SoundChannelMapping::BaseChannel(MixerOutputChannels, conf.Read<int>("Sound Settings", "ASIOBaseChannel", 0)); + std::vector<uint32> sampleRates = m_SoundSampleRates; + if(std::count(sampleRates.begin(), sampleRates.end(), MixerSamplerate) == 0) + { + sampleRates.push_back(MixerSamplerate); + std::sort(sampleRates.begin(), sampleRates.end()); + std::reverse(sampleRates.begin(), sampleRates.end()); + m_SoundSampleRates = sampleRates; + } } - if(storedVersion < MAKE_VERSION_NUMERIC(1,21,01,26)) + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,07,04)) { - if(m_BufferLength_DEPRECATED != 0) + 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<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); + Setting<bool> m_SoundDeviceUseHardwareTiming(conf, "Sound Settings", "UseHardwareTiming", SoundDeviceSettings().UseHardwareTiming); + Setting<SoundChannelMapping> m_SoundDeviceChannelMapping(conf, "Sound Settings", "ChannelMapping", SoundDeviceSettings().ChannelMapping); + if(storedVersion < MAKE_VERSION_NUMERIC(1,21,01,26)) { - if(m_BufferLength_DEPRECATED < 1) m_BufferLength_DEPRECATED = 1; // 1ms - if(m_BufferLength_DEPRECATED > 1000) m_BufferLength_DEPRECATED = 1000; // 1sec - if(GetSoundDeviceID().GetType() == SNDDEV_ASIO) + if(m_BufferLength_DEPRECATED != 0) { - m_LatencyMS = m_BufferLength_DEPRECATED; - m_UpdateIntervalMS = m_BufferLength_DEPRECATED / 8; - } else - { - m_LatencyMS = m_BufferLength_DEPRECATED * 3; - m_UpdateIntervalMS = m_BufferLength_DEPRECATED / 8; + if(m_BufferLength_DEPRECATED < 1) m_BufferLength_DEPRECATED = 1; // 1ms + if(m_BufferLength_DEPRECATED > 1000) m_BufferLength_DEPRECATED = 1000; // 1sec + if(GetSoundDeviceID().GetType() == SNDDEV_ASIO) + { + m_LatencyMS = m_BufferLength_DEPRECATED; + m_UpdateIntervalMS = m_BufferLength_DEPRECATED / 8; + } else + { + m_LatencyMS = m_BufferLength_DEPRECATED * 3; + m_UpdateIntervalMS = m_BufferLength_DEPRECATED / 8; + } } + conf.Remove(m_BufferLength_DEPRECATED.GetPath()); } - conf.Remove(m_BufferLength_DEPRECATED.GetPath()); + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,01,03)) + { + m_SoundDeviceExclusiveMode = ((MixerFlags & OLD_SOUNDSETUP_SECONDARY) == 0); + } + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,01,03)) + { + m_SoundDeviceBoostThreadPriority = ((MixerFlags & OLD_SOUNDSETUP_NOBOOSTTHREADPRIORITY) == 0); + } + if(storedVersion < MAKE_VERSION_NUMERIC(1,22,07,03)) + { + m_SoundDeviceChannelMapping = SoundChannelMapping::BaseChannel(MixerOutputChannels, conf.Read<int>("Sound Settings", "ASIOBaseChannel", 0)); + } + m_SoundDeviceSettingsDefaults.LatencyMS = m_LatencyMS; + m_SoundDeviceSettingsDefaults.UpdateIntervalMS = m_UpdateIntervalMS; + m_SoundDeviceSettingsDefaults.Samplerate = MixerSamplerate; + m_SoundDeviceSettingsDefaults.Channels = (uint8)MixerOutputChannels; + m_SoundDeviceSettingsDefaults.sampleFormat = m_SampleFormat; + m_SoundDeviceSettingsDefaults.ExclusiveMode = m_SoundDeviceExclusiveMode; + m_SoundDeviceSettingsDefaults.BoostThreadPriority = m_SoundDeviceBoostThreadPriority; + m_SoundDeviceSettingsDefaults.UseHardwareTiming = m_SoundDeviceUseHardwareTiming; + m_SoundDeviceSettingsDefaults.ChannelMapping = m_SoundDeviceChannelMapping; + m_SoundDeviceSettingsUseOldDefaults = true; } if(storedVersion < MAKE_VERSION_NUMERIC(1,21,01,26)) { @@ -365,12 +401,10 @@ } if(storedVersion < MAKE_VERSION_NUMERIC(1,22,01,03)) { - m_SoundDeviceExclusiveMode = ((MixerFlags & OLD_SOUNDSETUP_SECONDARY) == 0); MixerFlags &= ~OLD_SOUNDSETUP_SECONDARY; } if(storedVersion < MAKE_VERSION_NUMERIC(1,22,01,03)) { - m_SoundDeviceBoostThreadPriority = ((MixerFlags & OLD_SOUNDSETUP_NOBOOSTTHREADPRIORITY) == 0); MixerFlags &= ~OLD_SOUNDSETUP_NOBOOSTTHREADPRIORITY; } if(storedVersion < MAKE_VERSION_NUMERIC(1,20,00,22)) @@ -456,33 +490,119 @@ } -SoundDeviceSettings TrackerSettings::GetSoundDeviceSettings() const -//----------------------------------------------------------------- +struct StoredSoundDeviceSettings { - SoundDeviceSettings settings; + +private: + + SettingsContainer &conf; + const SoundDeviceInfo deviceInfo; + +public: + + Setting<uint32> LatencyUS; + Setting<uint32> UpdateIntervalUS; + Setting<uint32> Samplerate; + Setting<uint8> Channels; + Setting<SampleFormat> sampleFormat; + Setting<bool> ExclusiveMode; + Setting<bool> BoostThreadPriority; + Setting<bool> UseHardwareTiming; + Setting<SoundChannelMapping> ChannelMapping; + +public: + + StoredSoundDeviceSettings(SettingsContainer &conf, const SoundDeviceInfo & deviceInfo, const SoundDeviceSettings &defaults = SoundDeviceSettings()) + : 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) + , 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) + , ExclusiveMode(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"ExclusiveMode", defaults.ExclusiveMode) + , BoostThreadPriority(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"BoostThreadPriority", defaults.BoostThreadPriority) + , UseHardwareTiming(conf, L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"UseHardwareTiming", defaults.UseHardwareTiming) + , 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) + 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); + conf.Write(L"Sound Settings", deviceInfo.GetIdentifier() + L"_" + L"Name", deviceInfo.name); + } + + StoredSoundDeviceSettings & operator = (const SoundDeviceSettings &settings) + { + LatencyUS = settings.LatencyMS * 1000; + UpdateIntervalUS = settings.UpdateIntervalMS * 1000; + Samplerate = settings.Samplerate; + Channels = settings.Channels; + sampleFormat = settings.sampleFormat; + ExclusiveMode = settings.ExclusiveMode; + BoostThreadPriority = settings.BoostThreadPriority; + UseHardwareTiming = settings.UseHardwareTiming; + ChannelMapping = settings.ChannelMapping; + return *this; + } + + operator SoundDeviceSettings () const + { + SoundDeviceSettings settings; + settings.LatencyMS = LatencyUS / 1000; + settings.UpdateIntervalMS = UpdateIntervalUS / 1000; + settings.Samplerate = Samplerate; + settings.Channels = Channels; + settings.sampleFormat = sampleFormat; + settings.ExclusiveMode = ExclusiveMode; + settings.BoostThreadPriority = BoostThreadPriority; + settings.UseHardwareTiming = UseHardwareTiming; + settings.ChannelMapping = ChannelMapping; + return settings; + } + +}; + +SoundDeviceSettings TrackerSettings::GetSoundDeviceSettingsDefaults() const +//------------------------------------------------------------------------- +{ + return m_SoundDeviceSettingsDefaults; +} + +SoundDeviceID TrackerSettings::GetSoundDeviceID() const +//----------------------------------------------------- +{ + return theApp.GetSoundDevicesManager()->FindDeviceInfo(m_SoundDeviceIdentifier).id; +} + +void TrackerSettings::SetSoundDeviceID(const SoundDeviceID &id) +//------------------------------------------------------------- +{ + m_SoundDeviceIdentifier = theApp.GetSoundDevicesManager()->FindDeviceInfo(id).GetIdentifier(); +} + +SoundDeviceSettings TrackerSettings::GetSoundDeviceSettings(const SoundDeviceID &device) const +//-------------------------------------------------------------------------------------------- +{ + const SoundDeviceInfo deviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(device); + if(!deviceInfo.IsValid()) + { + return GetSoundDeviceSettingsDefaults(); + } + SoundDeviceSettings settings = StoredSoundDeviceSettings(conf, deviceInfo); settings.hWnd = CMainFrame::GetMainFrame()->m_hWnd; - settings.LatencyMS = m_LatencyMS; - settings.UpdateIntervalMS = m_UpdateIntervalMS; - settings.Samplerate = MixerSamplerate; - settings.Channels = (uint8)MixerOutputChannels; - settings.sampleFormat = m_SampleFormat; - settings.ExclusiveMode = m_SoundDeviceExclusiveMode; - settings.BoostThreadPriority = m_SoundDeviceBoostThreadPriority; - settings.ChannelMapping = m_SoundDeviceChannelMapping; return settings; } -void TrackerSettings::SetSoundDeviceSettings(const SoundDeviceSettings &settings) -//------------------------------------------------------------------------------- +void TrackerSettings::SetSoundDeviceSettings(const SoundDeviceID &device, const SoundDeviceSettings &settings) +//------------------------------------------------------------------------------------------------------------ { - m_LatencyMS = settings.LatencyMS; - m_UpdateIntervalMS = settings.UpdateIntervalMS; - MixerSamplerate = settings.Samplerate; - MixerOutputChannels = settings.Channels; - m_SampleFormat = settings.sampleFormat; - m_SoundDeviceExclusiveMode = settings.ExclusiveMode; - m_SoundDeviceBoostThreadPriority = settings.BoostThreadPriority; - m_SoundDeviceChannelMapping = settings.ChannelMapping; + const SoundDeviceInfo deviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(device); + if(!deviceInfo.IsValid()) + { + return; + } + StoredSoundDeviceSettings(conf, deviceInfo) = settings; } @@ -689,26 +809,29 @@ } -std::vector<uint32> TrackerSettings::GetSampleRates() -//--------------------------------------------------- +std::vector<uint32> TrackerSettings::GetSampleRates() const +//--------------------------------------------------------- { + return m_SoundSampleRates; +} + + +std::vector<uint32> TrackerSettings::GetDefaultSampleRates() +//---------------------------------------------------------- +{ static const uint32 samplerates [] = { 192000, 176400, 96000, 88200, - 64000, 48000, 44100, - 40000, - 37800, - 33075, 32000, 24000, 22050, - 20000, - 19800, - 16000 + 16000, + 11025, + 8000 }; return std::vector<uint32>(samplerates, samplerates + CountOf(samplerates)); } Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2013-11-24 19:28:11 UTC (rev 3305) @@ -198,6 +198,9 @@ return static_cast<PLUGVOLUMEHANDLING>(val.as<int32>()); } +template<> inline SettingValue ToSettingValue(const std::vector<uint32> &val) { return mpt::String::Combine(val); } +template<> inline std::vector<uint32> FromSettingValue(const SettingValue &val) { return mpt::String::Split<uint32>(val); } + template<> inline SettingValue ToSettingValue(const SoundDeviceID &val) { return SettingValue(int32(val.GetIdRaw())); } template<> inline SoundDeviceID FromSettingValue(const SettingValue &val) { return SoundDeviceID::FromIdRaw(val.as<int32>()); } @@ -269,21 +272,20 @@ // Sound Settings + Setting<std::vector<uint32> > m_SoundSampleRates; Setting<bool> m_MorePortaudio; - Setting<SoundDeviceID> m_nWaveDevice; - SoundDeviceID GetSoundDeviceID() const { return m_nWaveDevice; } - void SetSoundDeviceID(const SoundDeviceID &id) { m_nWaveDevice = id; } - Setting<uint32> m_BufferLength_DEPRECATED; - Setting<uint32> m_LatencyMS; - Setting<uint32> m_UpdateIntervalMS; - Setting<SampleFormat> m_SampleFormat; - Setting<bool> m_SoundDeviceExclusiveMode; - Setting<bool> m_SoundDeviceBoostThreadPriority; - Setting<bool> m_SoundDeviceUseHardwareTiming; - Setting<SoundChannelMapping> m_SoundDeviceChannelMapping; - SoundDeviceSettings GetSoundDeviceSettings() const; - void SetSoundDeviceSettings(const SoundDeviceSettings &settings); + bool m_SoundDeviceSettingsUseOldDefaults; + SoundDeviceID m_SoundDeviceID_DEPRECATED; + SoundDeviceSettings m_SoundDeviceSettingsDefaults; + SoundDeviceSettings GetSoundDeviceSettingsDefaults() const; + + Setting<std::wstring> m_SoundDeviceIdentifier; + SoundDeviceID GetSoundDeviceID() const; + void SetSoundDeviceID(const SoundDeviceID &id); + SoundDeviceSettings GetSoundDeviceSettings(const SoundDeviceID &device) const; + void SetSoundDeviceSettings(const SoundDeviceID &device, const SoundDeviceSettings &settings); + Setting<uint32> MixerMaxChannels; Setting<uint32> MixerDSPMask; Setting<uint32> MixerFlags; @@ -370,7 +372,7 @@ static void GetDefaultColourScheme(COLORREF (&colours)[MAX_MODCOLORS]); - std::vector<uint32> GetSampleRates(); + std::vector<uint32> GetSampleRates() const; static MPTChords &GetChords() { return Instance().Chords; } @@ -379,6 +381,8 @@ protected: + static std::vector<uint32> GetDefaultSampleRates(); + void FixupEQ(EQPreset *pEqSettings); void LoadChords(MPTChords &chords); Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/mptrack.rc 2013-11-24 19:28:11 UTC (rev 3305) @@ -1310,7 +1310,7 @@ COMBOBOX IDC_COMBO3,72,84,66,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO5,144,84,42,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO6,192,84,66,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Base channel:",IDC_STATIC,12,102,54,12,SS_CENTERIMAGE + LTEXT "Base channel:",IDC_STATIC_BASECHANNEL,12,102,54,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO9,72,102,114,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Driver Panel",IDC_BUTTON2,192,102,66,12 GROUPBOX "",IDC_STATIC,6,126,258,90 Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/mptrack/resource.h 2013-11-24 19:28:11 UTC (rev 3305) @@ -934,6 +934,7 @@ #define IDC_STATIC_BUFFERLENGTH 2457 #define IDC_STATIC_UPDATEINTERVAL 2458 #define IDC_COMBO_UPDATEINTERVAL 2459 +#define IDC_STATIC_BASECHANNEL 2461 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1213,7 +1214,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 541 #define _APS_NEXT_COMMAND_VALUE 44611 -#define _APS_NEXT_CONTROL_VALUE 2461 +#define _APS_NEXT_CONTROL_VALUE 2462 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-24 19:28:11 UTC (rev 3305) @@ -878,6 +878,28 @@ } +SoundDeviceInfo SoundDevicesManager::FindDeviceInfo(const std::wstring &identifier) const +//--------------------------------------------------------------------------------------- +{ + if(m_SoundDevices.empty()) + { + return SoundDeviceInfo(); + } + if(identifier.empty()) + { + return m_SoundDevices[0]; + } + for(std::vector<SoundDeviceInfo>::const_iterator it = begin(); it != end(); ++it) + { + if(it->GetIdentifier() == identifier) + { + return *it; + } + } + return SoundDeviceInfo(); +} + + bool SoundDevicesManager::OpenDriverSettings(SoundDeviceID id, ISoundMessageReceiver *messageReceiver, ISoundDevice *currentSoundDevice) //-------------------------------------------------------------------------------------------------------------------------------------- { Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-24 16:02:25 UTC (rev 3304) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-24 19:28:11 UTC (rev 3305) @@ -257,7 +257,7 @@ , UpdateIntervalMS(5) , Samplerate(48000) , Channels(2) - , sampleFormat(SampleFormatInt16) + , sampleFormat(SampleFormatFloat32) , ExclusiveMode(false) , BoostThreadPriority(true) , UseHardwareTiming(false) @@ -469,6 +469,30 @@ { return id.IsValid(); } + std::wstring GetIdentifier() const + { + if(!IsValid()) + { + return std::wstring(); + } + std::wstring result = apiName; + result += L"_"; + if(!internalID.empty()) + { + result += internalID; // safe to not contain special characters + } else if(!name.empty()) + { + // UTF8-encode the name and convert the utf8 to hex. + // This ensures that no special characters are contained in the configuration key. + std::string utf8String = mpt::To(mpt::CharsetUTF8, name); + std::wstring hexString = Util::BinToHex(std::vector<char>(utf8String.begin(), utf8String.end())); + result += hexString; + } else + { + result += mpt::ToWString(id.GetIndex()); + } + return result; + } }; @@ -493,6 +517,7 @@ const std::vector<SoundDeviceInfo> & GetDeviceInfos() const { return m_SoundDevices; } SoundDeviceInfo FindDeviceInfo(SoundDeviceID id) const; + SoundDeviceInfo FindDeviceInfo(const std::wstring &identifier) const; bool OpenDriverSettings(SoundDeviceID id, ISoundMessageReceiver *messageReceiver = nullptr, ISoundDevice *currentSoundDevice = nullptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-25 13:39:54
|
Revision: 3307 http://sourceforge.net/p/modplug/code/3307 Author: manxorist Date: 2013-11-25 13:39:38 +0000 (Mon, 25 Nov 2013) Log Message: ----------- [Var] Update flac to v1.3.0. Modified Paths: -------------- trunk/OpenMPT/build/flac.vcproj trunk/OpenMPT/build/flac.vcxproj trunk/OpenMPT/build/flac.vcxproj.filters trunk/OpenMPT/include/flac/AUTHORS trunk/OpenMPT/include/flac/COPYING.Xiph trunk/OpenMPT/include/flac/README trunk/OpenMPT/include/flac/include/FLAC/all.h trunk/OpenMPT/include/flac/include/FLAC/assert.h trunk/OpenMPT/include/flac/include/FLAC/callback.h trunk/OpenMPT/include/flac/include/FLAC/export.h trunk/OpenMPT/include/flac/include/FLAC/format.h trunk/OpenMPT/include/flac/include/FLAC/metadata.h trunk/OpenMPT/include/flac/include/FLAC/ordinals.h trunk/OpenMPT/include/flac/include/FLAC/stream_decoder.h trunk/OpenMPT/include/flac/include/FLAC/stream_encoder.h trunk/OpenMPT/include/flac/include/share/alloc.h trunk/OpenMPT/include/flac/src/libFLAC/bitmath.c trunk/OpenMPT/include/flac/src/libFLAC/bitreader.c trunk/OpenMPT/include/flac/src/libFLAC/bitwriter.c trunk/OpenMPT/include/flac/src/libFLAC/cpu.c trunk/OpenMPT/include/flac/src/libFLAC/crc.c trunk/OpenMPT/include/flac/src/libFLAC/fixed.c trunk/OpenMPT/include/flac/src/libFLAC/float.c trunk/OpenMPT/include/flac/src/libFLAC/format.c trunk/OpenMPT/include/flac/src/libFLAC/include/private/all.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitmath.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitreader.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitwriter.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/cpu.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/crc.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/fixed.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/float.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/format.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/lpc.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/memory.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/metadata.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/stream_encoder_framing.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/window.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/all.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/stream_decoder.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/stream_encoder.h trunk/OpenMPT/include/flac/src/libFLAC/lpc.c trunk/OpenMPT/include/flac/src/libFLAC/md5.c trunk/OpenMPT/include/flac/src/libFLAC/memory.c trunk/OpenMPT/include/flac/src/libFLAC/metadata_iterators.c trunk/OpenMPT/include/flac/src/libFLAC/metadata_object.c trunk/OpenMPT/include/flac/src/libFLAC/stream_decoder.c trunk/OpenMPT/include/flac/src/libFLAC/stream_encoder.c trunk/OpenMPT/include/flac/src/libFLAC/stream_encoder_framing.c trunk/OpenMPT/include/flac/src/libFLAC/window.c trunk/OpenMPT/include/premake4.lua Added Paths: ----------- trunk/OpenMPT/include/flac/include/share/compat.h trunk/OpenMPT/include/flac/include/share/endswap.h trunk/OpenMPT/include/flac/include/share/macros.h trunk/OpenMPT/include/flac/include/share/private.h trunk/OpenMPT/include/flac/include/share/safe_str.h trunk/OpenMPT/include/flac/include/share/win_utf8_io.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/macros.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/ogg_decoder_aspect.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/ogg_encoder_aspect.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/ogg_helper.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/ogg_mapping.h trunk/OpenMPT/include/flac/src/libFLAC/ogg_decoder_aspect.c trunk/OpenMPT/include/flac/src/libFLAC/ogg_encoder_aspect.c trunk/OpenMPT/include/flac/src/libFLAC/ogg_helper.c trunk/OpenMPT/include/flac/src/libFLAC/ogg_mapping.c trunk/OpenMPT/include/flac/src/share/ trunk/OpenMPT/include/flac/src/share/win_utf8_io/ trunk/OpenMPT/include/flac/src/share/win_utf8_io/win_utf8_io.c Removed Paths: ------------- trunk/OpenMPT/include/flac/include/share/getopt.h trunk/OpenMPT/include/flac/include/share/grabbag/ trunk/OpenMPT/include/flac/include/share/grabbag.h trunk/OpenMPT/include/flac/include/share/replaygain_analysis.h trunk/OpenMPT/include/flac/include/share/replaygain_synthesis.h trunk/OpenMPT/include/flac/include/share/utf8.h trunk/OpenMPT/include/flac/lib/ trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters Modified: trunk/OpenMPT/build/flac.vcproj =================================================================== --- trunk/OpenMPT/build/flac.vcproj 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/build/flac.vcproj 2013-11-25 13:39:38 UTC (rev 3307) @@ -42,10 +42,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334" + AdditionalOptions="/wd4244 /wd4267 /wd4334" Optimization="0" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -61,7 +61,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -121,10 +121,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334" + AdditionalOptions="/wd4244 /wd4267 /wd4334" Optimization="0" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -140,7 +140,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -199,10 +199,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334 /MP" + AdditionalOptions="/wd4244 /wd4267 /wd4334 /MP" Optimization="3" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -218,7 +218,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -278,10 +278,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334 /MP" + AdditionalOptions="/wd4244 /wd4267 /wd4334 /MP" Optimization="3" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -297,7 +297,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -356,10 +356,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334 /GL- /MP" + AdditionalOptions="/wd4244 /wd4267 /wd4334 /GL- /MP" Optimization="3" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -375,7 +375,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -435,10 +435,10 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/wd4267 /wd4334 /GL- /MP" + AdditionalOptions="/wd4244 /wd4267 /wd4334 /GL- /MP" Optimization="3" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -454,7 +454,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.2.1\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" + PreprocessorDefinitions="FLAC__NO_DLL;VERSION=\"1.3.0\";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" AdditionalIncludeDirectories="..\include\flac\include;..\include\flac\src\libFLAC\include" /> <Tool @@ -665,6 +665,20 @@ > </File> </Filter> + <Filter + Name="share" + Filter="" + > + <Filter + Name="win_utf8_io" + Filter="" + > + <File + RelativePath="..\include\flac\src\share\win_utf8_io\win_utf8_io.c" + > + </File> + </Filter> + </Filter> </Filter> <Filter Name="include" Modified: trunk/OpenMPT/build/flac.vcxproj =================================================================== --- trunk/OpenMPT/build/flac.vcxproj 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/build/flac.vcxproj 2013-11-25 13:39:38 UTC (rev 3307) @@ -111,10 +111,10 @@ </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -125,7 +125,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -139,10 +139,10 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -153,7 +153,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -167,10 +167,10 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 /MP %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 /MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -182,7 +182,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -198,10 +198,10 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 /MP %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 /MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -213,7 +213,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -229,10 +229,10 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 /GL- /MP %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 /GL- /MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -244,7 +244,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -259,10 +259,10 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'"> <ClCompile> - <AdditionalOptions>/wd4267 /wd4334 /GL- /MP %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/wd4244 /wd4267 /wd4334 /GL- /MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -274,7 +274,7 @@ <CompileAs>CompileAsC</CompileAs> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.2.1";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>FLAC__NO_DLL;VERSION="1.3.0";NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\include\flac\include;..\include\flac\src\libFLAC\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Lib> @@ -351,6 +351,8 @@ </ClCompile> <ClCompile Include="..\include\flac\src\libFLAC\window.c"> </ClCompile> + <ClCompile Include="..\include\flac\src\share\win_utf8_io\win_utf8_io.c"> + </ClCompile> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> Modified: trunk/OpenMPT/build/flac.vcxproj.filters =================================================================== --- trunk/OpenMPT/build/flac.vcxproj.filters 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/build/flac.vcxproj.filters 2013-11-25 13:39:38 UTC (rev 3307) @@ -2,32 +2,38 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="include"> - <UniqueIdentifier>{8D73C555-D4B8-2D41-AA64-549185F6A866}</UniqueIdentifier> + <UniqueIdentifier>{0992A517-1ED0-1B45-880B-3A82EEA4A4A2}</UniqueIdentifier> </Filter> <Filter Include="include\flac"> - <UniqueIdentifier>{7DBFD967-716A-5D4C-ADB7-87AD1E067B04}</UniqueIdentifier> + <UniqueIdentifier>{D4E60470-34FE-F94C-8A10-CB91DBDB312F}</UniqueIdentifier> </Filter> <Filter Include="include\flac\src"> - <UniqueIdentifier>{D7462892-CBBF-FF43-9AAB-B693D2FBDC29}</UniqueIdentifier> + <UniqueIdentifier>{F31D2B59-96A6-7847-8D52-B86738BC1A59}</UniqueIdentifier> </Filter> <Filter Include="include\flac\src\libFLAC"> - <UniqueIdentifier>{EF8383C6-ED33-B646-902E-3CAC851D6EC9}</UniqueIdentifier> + <UniqueIdentifier>{608C6A5D-C1BB-EB41-B168-05585F6EB8E1}</UniqueIdentifier> </Filter> <Filter Include="include\flac\src\libFLAC\include"> - <UniqueIdentifier>{81BF1A39-AD5A-8E42-AE15-62BE0CE41E4C}</UniqueIdentifier> + <UniqueIdentifier>{F9B48E83-5242-B448-86BD-1A29B723CA7B}</UniqueIdentifier> </Filter> <Filter Include="include\flac\src\libFLAC\include\private"> - <UniqueIdentifier>{FE262055-A0D1-3744-9497-258BCA1F6C01}</UniqueIdentifier> + <UniqueIdentifier>{1A2BD308-C89D-824C-BBB7-84667245054D}</UniqueIdentifier> </Filter> <Filter Include="include\flac\src\libFLAC\include\protected"> - <UniqueIdentifier>{FF7B7C17-1823-974C-89DA-FF2A5247C924}</UniqueIdentifier> + <UniqueIdentifier>{58211F3B-D7AA-034C-88C8-E7CD1F7BA1D4}</UniqueIdentifier> </Filter> <Filter Include="include\flac\include"> - <UniqueIdentifier>{0990FB44-4019-D04E-BB03-72B126850B59}</UniqueIdentifier> + <UniqueIdentifier>{726F14E3-F58F-E447-A070-DA6719901549}</UniqueIdentifier> </Filter> <Filter Include="include\flac\include\FLAC"> - <UniqueIdentifier>{1150D860-3747-1442-B79E-D73527226503}</UniqueIdentifier> + <UniqueIdentifier>{D815D0E7-B7EF-8049-825B-CEDE67038C4B}</UniqueIdentifier> </Filter> + <Filter Include="include\flac\src\share"> + <UniqueIdentifier>{A78D2877-81FA-4049-A0E8-01E67D8F97D9}</UniqueIdentifier> + </Filter> + <Filter Include="include\flac\src\share\win_utf8_io"> + <UniqueIdentifier>{8F0EF0FC-28BD-4540-9114-266241FD1FE8}</UniqueIdentifier> + </Filter> </ItemGroup> <ItemGroup> <ClInclude Include="..\include\flac\src\libFLAC\include\private\all.h"> @@ -164,5 +170,8 @@ <ClCompile Include="..\include\flac\src\libFLAC\window.c"> <Filter>include\flac\src\libFLAC</Filter> </ClCompile> + <ClCompile Include="..\include\flac\src\share\win_utf8_io\win_utf8_io.c"> + <Filter>include\flac\src\share\win_utf8_io</Filter> + </ClCompile> </ItemGroup> </Project> Modified: trunk/OpenMPT/include/flac/AUTHORS =================================================================== --- trunk/OpenMPT/include/flac/AUTHORS 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/AUTHORS 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,8 +1,9 @@ /* FLAC - Free Lossless Audio Codec - * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2001-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * This file is part the FLAC project. FLAC is comprised of several - * components distributed under difference licenses. The codec libraries + * components distributed under different licenses. The codec libraries * are distributed under Xiph.Org's BSD-like license (see the file * COPYING.Xiph in this distribution). All other programs, libraries, and * plugins are distributed under the GPL (see COPYING.GPL). The documentation Modified: trunk/OpenMPT/include/flac/COPYING.Xiph =================================================================== --- trunk/OpenMPT/include/flac/COPYING.Xiph 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/COPYING.Xiph 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,4 +1,5 @@ -Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson +Copyright (C) 2000-2009 Josh Coalson +Copyright (C) 2011-2013 Xiph.Org Foundation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: trunk/OpenMPT/include/flac/README =================================================================== --- trunk/OpenMPT/include/flac/README 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/README 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,8 +1,9 @@ /* FLAC - Free Lossless Audio Codec - * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2001-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * This file is part the FLAC project. FLAC is comprised of several - * components distributed under difference licenses. The codec libraries + * components distributed under different licenses. The codec libraries * are distributed under Xiph.Org's BSD-like license (see the file * COPYING.Xiph in this distribution). All other programs, libraries, and * plugins are distributed under the LGPL or GPL (see COPYING.LGPL and @@ -17,9 +18,12 @@ */ -FLAC (http://flac.sourceforge.net/) is an Open Source lossless audio -codec developed by Josh Coalson. +FLAC is an Open Source lossless audio codec developed by Josh Coalson from 2001 +to 2009. +From January 2012 FLAC is being maintained by Erik de Castro Lopo under the +auspices of the Xiph.org Foundation. + FLAC is comprised of * `libFLAC', a library which implements reference encoders and decoders for native FLAC and Ogg FLAC, and a metadata interface @@ -38,7 +42,7 @@ =============================================================================== -FLAC - 1.2.1 - Contents +FLAC - 1.3.0 - Contents =============================================================================== - Introduction @@ -89,7 +93,7 @@ libFLAC has grown larger over time as more functionality has been included, but much of it may be unnecessary for a particular embedded implementation. Unused parts may be pruned by some simple editing of -configure.in and src/libFLAC/Makefile.am; the following dependency +configure.ac and src/libFLAC/Makefile.am; the following dependency graph shows which modules may be pruned without breaking things further down: @@ -170,7 +174,7 @@ Use these if you have these packages but configure can't find them. If you want to build completely from scratch (i.e. starting with just -configure.in and Makefile.am) you should be able to just run 'autogen.sh' +configure.ac and Makefile.am) you should be able to just run 'autogen.sh' but make sure and read the comments in that file first. @@ -200,55 +204,46 @@ Building with MSVC =============================================================================== -There are .dsp projects and a master FLAC.dsw workspace to build all -the libraries and executables with MSVC6. There are also .vcproj -projects and a master FLAC.sln solution to build all the libraries and -executables with VC++ 2005. +There are .vcproj projects and a master FLAC.sln solution to build all +the libraries and executables with MSVC 2005 or newer. Prerequisite: you must have the Ogg libraries installed as described later. -Prerequisite: you must have nasm installed, and nasmw.exe must be in -your PATH, or the path to nasmw.exe must be added to the list of +Prerequisite: you must have nasm installed, and nasm.exe must be in +your PATH, or the path to nasm.exe must be added to the list of directories for executable files in the MSVC global options. -MSVC6: -To build everything, run Developer Studio, do File|Open Workspace, -and open FLAC.dsw. Select "Build | Set active configuration..." -from the menu, then in the dialog, select "All - Win32 Release" (or -Debug if you prefer). Click "Ok" then hit F7 to build. - VC++ 2005: To build everything, run Visual Studio, do File|Open and open FLAC.sln. From the dropdown in the toolbar, select "Release" instead of "Debug", then hit F7 to build. -Either way, this will build all libraries both statically (e.g. -obj\release\lib\libFLAC_static.lib) and as DLLs (e.g. -obj\release\lib\libFLAC.dll), and it will build all binaries, statically -linked (e.g. obj\release\bin\flac.exe). +This will build all libraries both statically (e.g. +objs\release\lib\libFLAC_static.lib) and as DLLs (e.g. +objs\release\lib\libFLAC.dll), and it will build all binaries, statically +linked (e.g. objs\release\bin\flac.exe). -Everything will end up in the "obj" directory. DLLs and .exe files +Everything will end up in the "objs" directory. DLLs and .exe files are all that are needed and can be copied to an installation area and -added to the PATH. The plugins have to be copied to their appropriate -place in the player area. For Winamp2 this is <winamp2-dir>\Plugins. +added to the PATH. -By default the code is configured with Ogg support. Before building FLAC +By default the code is configured with Ogg support. Before building FLAC you will need to get the Ogg source distribution -(see http://xiph.org/ogg/vorbis/download/), build ogg_static.lib (load and -build win32\ogg_static.dsp), copy ogg_static.lib into FLAC's -'obj\release\lib' directory, and copy the entire include\ogg tree into -FLAC's 'include' directory (so that there is an 'ogg' directory in FLAC's +(see http://xiph.org/downloads/), build libogg_static.lib (load +win32\libogg_static.sln, change solution configuration to "Release" and +code generation to "Multi-threaded (/MT)", then build), copy libogg_static.lib +into FLAC's 'objs\release\lib' directory, and copy the entire include\ogg tree +into FLAC's 'include' directory (so that there is an 'ogg' directory in FLAC's 'include' directory with the files ogg.h, os_types.h and config_types.h). -If you want to build without Ogg support, instead edit all .dsp or -.vcproj files and remove any occurrences of "/D FLAC__HAS_OGG". +If you want to build without Ogg support, instead edit all .vcproj files +and remove any "FLAC__HAS_OGG" definitions. =============================================================================== Building on Mac OS X =============================================================================== -If you have Fink or a recent version of OS X with the proper autotooles, -the GNU flow above should work. The Project Builder project has been -deprecated but we are working on replacing it with an Xcode equivalent. +If you have Fink or a recent version of OS X with the proper autotools, +the GNU flow above should work. Modified: trunk/OpenMPT/include/flac/include/FLAC/all.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/all.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/all.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -161,7 +162,7 @@ * in FLAC 1.1.3 is a set of \c #defines in \c export.h of each * library's includes (e.g. \c include/FLAC/export.h). The * \c #defines mirror the libraries' - * <A HREF="http://www.gnu.org/software/libtool/manual.html#Libtool-versioning">libtool version numbers</A>, + * <A HREF="http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning">libtool version numbers</A>, * e.g. in libFLAC there are \c FLAC_API_VERSION_CURRENT, * \c FLAC_API_VERSION_REVISION, and \c FLAC_API_VERSION_AGE. * These can be used to support multiple versions of an API during the Modified: trunk/OpenMPT/include/flac/include/FLAC/assert.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/assert.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/assert.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2001-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: trunk/OpenMPT/include/flac/include/FLAC/callback.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/callback.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/callback.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2004-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: trunk/OpenMPT/include/flac/include/FLAC/export.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/export.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/export.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -55,25 +56,30 @@ * \{ */ -#if defined(FLAC__NO_DLL) || !defined(_MSC_VER) +#if defined(FLAC__NO_DLL) #define FLAC_API -#else - +#elif defined(_MSC_VER) #ifdef FLAC_API_EXPORTS #define FLAC_API _declspec(dllexport) #else #define FLAC_API _declspec(dllimport) +#endif +#elif defined(FLAC__USE_VISIBILITY_ATTR) +#define FLAC_API __attribute__ ((visibility ("default"))) + +#else +#define FLAC_API + #endif -#endif /** These #defines will mirror the libtool-based library version number, see - * http://www.gnu.org/software/libtool/manual.html#Libtool-versioning + * http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning */ -#define FLAC_API_VERSION_CURRENT 10 +#define FLAC_API_VERSION_CURRENT 11 #define FLAC_API_VERSION_REVISION 0 /**< see above */ -#define FLAC_API_VERSION_AGE 2 /**< see above */ +#define FLAC_API_VERSION_AGE 3 /**< see above */ #ifdef __cplusplus extern "C" { Modified: trunk/OpenMPT/include/flac/include/FLAC/format.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/format.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/format.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -879,6 +880,18 @@ */ FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate); +/** Tests that a blocksize at the given sample rate is valid for the FLAC + * subset. + * + * \param blocksize The blocksize to test for compliance. + * \param sample_rate The sample rate is needed, since the valid subset + * blocksize depends on the sample rate. + * \retval FLAC__bool + * \c true if the given blocksize conforms to the specification for the + * subset at the given sample rate, else \c false. + */ +FLAC_API FLAC__bool FLAC__format_blocksize_is_subset(unsigned blocksize, unsigned sample_rate); + /** Tests that a sample rate is valid for the FLAC subset. The subset rules * for valid sample rates are slightly more complex since the rate has to * be expressible completely in the frame header. Modified: trunk/OpenMPT/include/flac/include/FLAC/metadata.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/metadata.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/metadata.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2001-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1986,7 +1987,7 @@ * \code object->type == FLAC__METADATA_TYPE_CUESHEET \endcode * \code track_num < object->data.cue_sheet.num_tracks \endcode * \code (track->indices != NULL && track->num_indices > 0) || - * (track->indices == NULL && track->num_indices == 0) + * (track->indices == NULL && track->num_indices == 0) \endcode * \retval FLAC__bool * \c false if \a copy is \c true and malloc() fails, else \c true. */ Modified: trunk/OpenMPT/include/flac/include/FLAC/ordinals.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/ordinals.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/ordinals.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,40 +33,45 @@ #ifndef FLAC__ORDINALS_H #define FLAC__ORDINALS_H -#if !(defined(_MSC_VER) || defined(__BORLANDC__) || defined(__EMX__)) -#include <inttypes.h> -#endif +#if defined(_MSC_VER) && _MSC_VER < 1600 -typedef signed char FLAC__int8; -typedef unsigned char FLAC__uint8; +/* Microsoft Visual Studio earlier than the 2010 version did not provide + * the 1999 ISO C Standard header file <stdint.h>. + */ -#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int8 FLAC__int8; +typedef unsigned __int8 FLAC__uint8; + typedef __int16 FLAC__int16; typedef __int32 FLAC__int32; typedef __int64 FLAC__int64; typedef unsigned __int16 FLAC__uint16; typedef unsigned __int32 FLAC__uint32; typedef unsigned __int64 FLAC__uint64; -#elif defined(__EMX__) -typedef short FLAC__int16; -typedef long FLAC__int32; -typedef long long FLAC__int64; -typedef unsigned short FLAC__uint16; -typedef unsigned long FLAC__uint32; -typedef unsigned long long FLAC__uint64; + #else + +/* For MSVC 2010 and everything else which provides <stdint.h>. */ + +#include <stdint.h> + +typedef int8_t FLAC__int8; +typedef uint8_t FLAC__uint8; + typedef int16_t FLAC__int16; typedef int32_t FLAC__int32; typedef int64_t FLAC__int64; typedef uint16_t FLAC__uint16; typedef uint32_t FLAC__uint32; typedef uint64_t FLAC__uint64; + #endif typedef int FLAC__bool; typedef FLAC__uint8 FLAC__byte; + #ifdef true #undef true #endif Modified: trunk/OpenMPT/include/flac/include/FLAC/stream_decoder.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/stream_decoder.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/stream_decoder.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: trunk/OpenMPT/include/flac/include/FLAC/stream_encoder.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/stream_encoder.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/FLAC/stream_encoder.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,5 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -128,7 +129,7 @@ * Unlike the decoders, the stream encoder has many options that can * affect the speed and compression ratio. When setting these parameters * you should have some basic knowledge of the format (see the - * <A HREF="../documentation.html#format">user-level documentation</A> + * <A HREF="../documentation_format_overview.html">user-level documentation</A> * or the <A HREF="../format.html">formal description</A>). The * FLAC__stream_encoder_set_*() functions themselves do not validate the * values as many are interdependent. The FLAC__stream_encoder_init_*() Modified: trunk/OpenMPT/include/flac/include/share/alloc.h =================================================================== --- trunk/OpenMPT/include/flac/include/share/alloc.h 2013-11-24 23:33:26 UTC (rev 3306) +++ trunk/OpenMPT/include/flac/include/share/alloc.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -1,19 +1,33 @@ /* alloc - Convenience routines for safely allocating memory - * Copyright (C) 2007 Josh Coalson + * Copyright (C) 2007-2009 Josh Coalson + * Copyright (C) 2011-2013 Xiph.Org Foundation * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of the Xiph.org Foundation nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef FLAC__SHARE__ALLOC_H @@ -28,15 +42,20 @@ */ #include <limits.h> /* for SIZE_MAX */ -#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__ +#if HAVE_STDINT_H #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */ #endif #include <stdlib.h> /* for size_t, malloc(), etc */ +#include "share/compat.h" #ifndef SIZE_MAX # ifndef SIZE_T_MAX # ifdef _MSC_VER -# define SIZE_T_MAX UINT_MAX +# ifdef _WIN64 +# define SIZE_T_MAX 0xffffffffffffffffui64 +# else +# define SIZE_T_MAX 0xffffffff +# endif # else # error # endif @@ -44,14 +63,10 @@ # define SIZE_MAX SIZE_T_MAX #endif -#ifndef FLaC__INLINE -#define FLaC__INLINE -#endif - /* avoid malloc()ing 0 bytes, see: * https://www.securecoding.cert.org/confluence/display/seccode/MEM04-A.+Do+not+make+assumptions+about+the+result+of+allocating+0+bytes?focusedCommentId=5407003 */ -static FLaC__INLINE void *safe_malloc_(size_t size) +static inline void *safe_malloc_(size_t size) { /* malloc(0) is undefined; FLAC src convention is to always allocate */ if(!size) @@ -59,7 +74,7 @@ return malloc(size); } -static FLaC__INLINE void *safe_calloc_(size_t nmemb, size_t size) +static inline void *safe_calloc_(size_t nmemb, size_t size) { if(!nmemb || !size) return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */ @@ -68,7 +83,7 @@ /*@@@@ there's probably a better way to prevent overflows when allocating untrusted sums but this works for now */ -static FLaC__INLINE void *safe_malloc_add_2op_(size_t size1, size_t size2) +static inline void *safe_malloc_add_2op_(size_t size1, size_t size2) { size2 += size1; if(size2 < size1) @@ -76,7 +91,7 @@ return safe_malloc_(size2); } -static FLaC__INLINE void *safe_malloc_add_3op_(size_t size1, size_t size2, size_t size3) +static inline void *safe_malloc_add_3op_(size_t size1, size_t size2, size_t size3) { size2 += size1; if(size2 < size1) @@ -87,7 +102,7 @@ return safe_malloc_(size3); } -static FLaC__INLINE void *safe_malloc_add_4op_(size_t size1, size_t size2, size_t size3, size_t size4) +static inline void *safe_malloc_add_4op_(size_t size1, size_t size2, size_t size3, size_t size4) { size2 += size1; if(size2 < size1) @@ -101,29 +116,9 @@ return safe_malloc_(size4); } -static FLaC__INLINE void *safe_malloc_mul_2op_(size_t size1, size_t size2) -#if 0 -needs support for cases where sizeof(size_t) != 4 -{ - /* could be faster #ifdef'ing off SIZEOF_SIZE_T */ - if(sizeof(size_t) == 4) { - if ((double)size1 * (double)size2 < 4294967296.0) - return malloc(size1*size2); - } - return 0; -} -#else -/* better? */ -{ - if(!size1 || !size2) - return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */ - if(size1 > SIZE_MAX / size2) - return 0; - return malloc(size1*size2); -} -#endif +void *safe_malloc_mul_2op_(size_t size1, size_t size2) ; -static FLaC__INLINE void *safe_malloc_mul_3op_(size_t size1, size_t size2, size_t size3) +static inline void *safe_malloc_mul_3op_(size_t size1, size_t size2, size_t size3) { if(!size1 || !size2 || !size3) return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */ @@ -136,7 +131,7 @@ } /* size1*size2 + size3 */ -static FLaC__INLINE void *safe_malloc_mul2add_(size_t size1, size_t size2, size_t size3) +static inline void *safe_malloc_mul2add_(size_t size1, size_t size2, size_t size3) { if(!size1 || !size2) return safe_malloc_(size3); @@ -146,17 +141,19 @@ } /* size1 * (size2 + size3) */ -static FLaC__INLINE void *safe_malloc_muladd2_(size_t size1, size_t size2, size_t size3) +static inline void *safe_malloc_muladd2_(size_t size1, size_t size2, size_t size3) { if(!size1 || (!size2 && !size3)) return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always allocate */ size2 += size3; if(size2 < size3) return 0; - return safe_malloc_mul_2op_(size1, size2); + if(size1 > SIZE_MAX / size2) + return 0; + return malloc(size1*size2); } -static FLaC__INLINE void *safe_realloc_add_2op_(void *ptr, size_t size1, size_t size2) +static inline void *safe_realloc_add_2op_(void *ptr, size_t size1, size_t size2) { size2 += size1; if(size2 < size1) @@ -164,7 +161,7 @@ return realloc(ptr, size2); } -static FLaC__INLINE void *safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3) +static inline void *safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3) { size2 += size1; if(size2 < size1) @@ -175,7 +172,7 @@ return realloc(ptr, size3); } -static FLaC__INLINE void *safe_realloc_add_4op_(void *ptr, size_t size1, size_t size2, size_t size3, size_t size4) +static inline void *safe_realloc_add_4op_(void *ptr, size_t size1, size_t size2, size_t size3, size_t size4) { size2 += size1; if(size2 < size1) @@ -189,7 +186,7 @@ return realloc(ptr, size4); } -static FLaC__INLINE void *safe_realloc_mul_2op_(void *ptr, size_t size1, size_t size2) +static inline void *safe_realloc_mul_2op_(void *ptr, size_t size1, size_t size2) { if(!size1 || !size2) return realloc(ptr, 0); /* preserve POSIX realloc(ptr, 0) semantics */ @@ -199,7 +196,7 @@ } /* size1 * (size2 + size3) */ -static FLaC__INLINE void *safe_realloc_muladd2_(void *ptr, size_t size1, size_t size2, size_t size3) +static inline void *safe_realloc_muladd2_(void *ptr, size_t size1, size_t size2, size_t size3) { if(!size1 || (!size2 && !size3)) return realloc(ptr, 0); /* preserve POSIX realloc(ptr, 0) semantics */ Added: trunk/OpenMPT/include/flac/include/share/compat.h =================================================================== --- trunk/OpenMPT/include/flac/include/share/compat.h (rev 0) +++ trunk/OpenMPT/include/flac/include/share/compat.h 2013-11-25 13:39:38 UTC (rev 3307) @@ -0,0 +1,196 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2012 Xiph.org Foundation + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of the Xiph.org Foundation nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* This is the prefered location of all CPP hackery to make $random_compiler + * work like something approaching a C99 (or maybe more accurately GNU99) + * compiler. + * + * It is assumed that this header will be included after "config.h". + */ + +#ifndef FLAC__SHARE__COMPAT_H +#define FLAC__SHARE__COMPAT_H + +#if defined _WIN32 && !defined __CYGWIN__ +/* where MSVC puts unlink() */ +# include <io.h> +#else +# include <unistd.h> +#endif + +#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ +#include <sys/types.h> /* for off_t */ +#define FLAC__off_t __int64 /* use this instead of off_t to fix the 2 GB limit */ +#if !defined __MINGW32__ +#define fseeko _fseeki64 +#define ftello _ftelli64 +#else /* MinGW */ +#if !defined(HAVE_FSEEKO) +#define fseeko fseeko64 +#define ftello ftello64 +#endif +#endif +#else +#define FLAC__off_t off_t +#endif + +#if HAVE_INTTYPES_H +#define __STDC_FORMAT_MACROS +#include <inttypes.h> +#endif + +#if defined(_MSC_VER) +#define strtoll _strtoi64 +#define strtoull _strtoui64 +#endif + +#if defined(_MSC_VER) +#if _MSC_VER < 1500 +/* Visual Studio 2008 has restrict. */ +#define restrict __restrict +#endif +#define inline __inline +#endif + +/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */ +#ifdef _MSC_VER +#define FLAC__U64L(x) x +#else +#define FLAC__U64L(x) x##LLU +#endif + +#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ +#define FLAC__STRNCASECMP strnicmp +#else +#define FLAC__STRNCASECMP strncasecmp +#endif + +#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__ +#include <io.h> /* for _setmode(), chmod() */ +#include <fcntl.h> /* for _O_BINARY */ +#else +#include <unistd.h> /* for chown(), unlink() */ +#endif + +#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ +#if defined __BORLANDC__ +#include <utime.h> /* for utime() */ +#else +#include <sys/utime.h> /* for utime() */ +#endif +#else +#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */ +#include <utime.h> /* for utime() */ +#endif + +#if defined _MSC_VER +# if _MSC_VER >= 1600 +/* Visual Studio 2010 has decent C99 support */ +# include <stdint.h> +# define PRIu64 "llu" +# define PRId64 "lld" +# define PRIx64 "llx" +# else +# include <limits.h> +# ifndef UINT32_MAX +# define UINT32_MAX _UI32_MAX +# endif + typedef unsigned __int64 uint64_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int8 uint8_t; + typedef __int64 int64_t; + typedef __int32 int32_t; + typedef __int16 int16_t; + typedef __int8 int8_t; +# define PRIu64 "I64u" +# define PRId64 "I64d" +# define PRIx64 "I64x" +# endif +#endif /* defined _MSC_VER */ + +#ifdef _WIN32 +/* All char* strings are in UTF-8 format. Added to support Unicode files on Windows */ +#include "share/win_utf8_io.h" + +#define flac_printf printf_utf8 +#define flac_fprintf fprintf_utf8 +#define flac_vfprintf vfprintf_utf8 +#define flac_fopen fopen_utf8 +#define flac_chmod chmod_utf8 +#define flac_utime utime_utf8 +#define flac_unlink unlink_utf8 +#define flac_rename rename_utf8 +#defin... [truncated message content] |
From: <sag...@us...> - 2013-11-27 01:05:02
|
Revision: 3322 http://sourceforge.net/p/modplug/code/3322 Author: saga-games Date: 2013-11-27 01:04:51 +0000 (Wed, 27 Nov 2013) Log Message: ----------- [Fix] Export: Don't fail if song starts with ignore patterns. [Fix] Memory leak in plugin manager Modified Paths: -------------- trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2013-11-27 00:54:12 UTC (rev 3321) +++ trunk/OpenMPT/mptrack/Vstplug.h 2013-11-27 01:04:51 UTC (rev 3322) @@ -25,17 +25,12 @@ class CVstPluginManager; class CVstPlugin; -class CVstEditor; -class Cfxp; //rewbs.VSTpresets +#ifdef MODPLUG_TRACKER class CModDoc; +#endif // MODPLUG_TRACKER class CSoundFile; -#ifndef NO_VST - typedef AEffect * (VSTCALLBACK * PVSTPLUGENTRY)(audioMasterCallback); -#endif // NO_VST - - struct VSTPluginLib { enum PluginCategory @@ -62,8 +57,8 @@ CVstPlugin *pPluginsList; // Pointer to first plugin instance (this instance carries pointers to other instances) mpt::PathString libraryName; // Display name mpt::PathString dllPath; // Full path name - VstInt32 pluginId1; - VstInt32 pluginId2; + VstInt32 pluginId1; // Plugin type (kEffectMagic, kDmoMagic) + VstInt32 pluginId2; // Plugin unique ID PluginCategory category; bool isInstrument; @@ -76,7 +71,7 @@ { } - uint32 EncodeCacheFlags() + uint32 EncodeCacheFlags() const { return (isInstrument ? 1 : 0) | (category << 1); } @@ -97,15 +92,6 @@ }; -struct VSTInstrChannel -{ - int32 midiPitchBendPos; // Current Pitch Wheel position, in 16.11 fixed point format. Lowest bit is used for indicating that vibrato was applied. Vibrato offset itself is not stored in this value. - uint16 currentProgram; - uint16 currentBank; - uint8 noteOnMap[128][MAX_CHANNELS]; -}; - - #ifndef NO_VST #include "../soundlib/plugins/PluginEventQueue.h" #endif // NO_VST @@ -131,6 +117,14 @@ vstVibratoFlag = 1, }; + struct VSTInstrChannel + { + int32 midiPitchBendPos; // Current Pitch Wheel position, in 16.11 fixed point format. Lowest bit is used for indicating that vibrato was applied. Vibrato offset itself is not stored in this value. + uint16 currentProgram; + uint16 currentBank; + uint8 noteOnMap[128][MAX_CHANNELS]; + }; + CVstPlugin *m_pNext, *m_pPrev; HINSTANCE m_hLibrary; VSTPluginLib &m_Factory; @@ -148,8 +142,8 @@ float m_fGain; PLUGINDEX m_nSlot; - bool m_bSongPlaying; //rewbs.VSTCompliance - bool m_bPlugResumed; //rewbs.VSTCompliance + bool m_bSongPlaying; + bool m_bPlugResumed; bool m_bIsVst2; bool m_bIsInstrument; @@ -327,7 +321,6 @@ CVstPluginManager(); ~CVstPluginManager(); -public: typedef std::vector<VSTPluginLib *>::iterator iterator; typedef std::vector<VSTPluginLib *>::const_iterator const_iterator; @@ -337,7 +330,7 @@ const_iterator end() const { return pluginList.end(); } void reserve(size_t num) { pluginList.reserve(num); } - bool IsValidPlugin(const VSTPluginLib *pLib); + bool IsValidPlugin(const VSTPluginLib *pLib) const; VSTPluginLib *AddPlugin(const mpt::PathString &dllPath, bool fromCache = true, const bool checkFileExistence = false, std::wstring* const errStr = nullptr); bool RemovePlugin(VSTPluginLib *); bool CreateMixPlugin(SNDMIXPLUGIN &, CSoundFile &); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-11-27 00:54:12 UTC (rev 3321) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-11-27 01:04:51 UTC (rev 3322) @@ -143,6 +143,13 @@ bool patternBreakOnThisRow = false; bool patternLoopEndedOnThisRow = false; + if(nPattern == Order.GetIgnoreIndex() && target.mode == GetLengthTarget::SeekPosition && nCurrentOrder == target.pos.order) + { + // Early test: Target is inside +++ pattern + retval.targetReached = true; + break; + } + while(nPattern >= Patterns.Size()) { // End of song? @@ -4075,7 +4082,7 @@ { // Not an internal device. Pass on to appropriate plugin. const CHANNELINDEX plugChannel = (nChn < GetNumChannels()) ? nChn + 1 : pChn->nMasterChn; - if(plugChannel > 0 && plugChannel <= GetNumChannels()) // XXX do we need this? + if(plugChannel > 0 && plugChannel <= GetNumChannels()) // XXX do we need this? I guess it might be relevant for previewing notes in the pattern... { PLUGINDEX nPlug = 0; if(!pChn->dwFlags[CHN_NOFX]) Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-11-27 00:54:12 UTC (rev 3321) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-11-27 01:04:51 UTC (rev 3322) @@ -17,24 +17,26 @@ #include "../../mptrack/TrackerSettings.h" #include "../../mptrack/AbstractVstEditor.h" #include "../../common/AudioCriticalSection.h" +#include "../../common/StringFixer.h" #include "../Sndfile.h" #include "JBridge.h" - -#ifdef VST_USE_ALTERNATIVE_MAGIC // Pelya's plugin ID fix. Breaks fx presets, so let's avoid it for now. -#include "../../include/zlib/zlib.h" // For CRC32 calculation (to detect plugins with same UID) -#endif // VST_USE_ALTERNATIVE_MAGIC - char CVstPluginManager::s_szHostProductString[64] = "OpenMPT"; char CVstPluginManager::s_szHostVendorString[64] = "OpenMPT project"; VstIntPtr CVstPluginManager::s_nHostVendorVersion = MptVersion::num; +typedef AEffect * (VSTCALLBACK * PVSTPLUGENTRY)(audioMasterCallback); + //#define VST_LOG #define DMO_LOG AEffect *DmoToVst(VSTPluginLib &lib); #ifdef VST_USE_ALTERNATIVE_MAGIC +// Pelya's plugin ID fix. Breaks fx presets, so let's avoid it for now. +// A better solution would be to change the plugin.cache format so that the ID1+ID2 strings are combined with a CRC, +// Or maybe we should just switch to a proper database format. +#include "../../include/zlib/zlib.h" // For CRC32 calculation (to detect plugins with same UID) uint32 CalculateCRC32fromFilename(const char *s) //---------------------------------------------- { @@ -43,7 +45,6 @@ int f; for(f = 0; fn[f] != 0; f++) fn[f] = toupper(fn[f]); return LittleEndian(crc32(0, (uint8 *)fn, f)); - } #endif // VST_USE_ALTERNATIVE_MAGIC @@ -52,7 +53,7 @@ //---------------------------------------------------------------------------------------------------------------------------------------------- { CVstPluginManager *that = theApp.GetPluginManager(); - if (that) + if(that) { return that->VstCallback(effect, opcode, index, value, ptr, opt); } @@ -95,8 +96,8 @@ } -bool CVstPluginManager::IsValidPlugin(const VSTPluginLib *pLib) -//------------------------------------------------------------- +bool CVstPluginManager::IsValidPlugin(const VSTPluginLib *pLib) const +//------------------------------------------------------------------- { for(const_iterator p = begin(); p != end(); p++) { @@ -112,7 +113,7 @@ HKEY hkEnum; WCHAR keyname[128]; - LONG cr = RegOpenKey(HKEY_LOCAL_MACHINE, "software\\classes\\DirectShow\\MediaObjects\\Categories\\f3602b3f-0592-48df-a4cd-674721e7ebeb", &hkEnum); + LONG cr = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "software\\classes\\DirectShow\\MediaObjects\\Categories\\f3602b3f-0592-48df-a4cd-674721e7ebeb", 0, KEY_READ, &hkEnum); DWORD index = 0; while (cr == ERROR_SUCCESS) { @@ -132,9 +133,10 @@ if(ERROR_SUCCESS == RegQueryValueExW(hksub, nullptr, 0, &datatype, (LPBYTE)name, &datasize)) { + mpt::String::SetNullTerminator(name); StringFromGUID2(clsid, keyname, 100); - VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(mpt::PathString::FromNative(keyname), mpt::PathString::FromWide(name)); + VSTPluginLib *plug = new (std::nothrow) VSTPluginLib(mpt::PathString::FromNative(keyname), mpt::PathString::FromNative(name)); if(plug != nullptr) { pluginList.push_back(plug); @@ -142,7 +144,7 @@ plug->pluginId2 = clsid.Data1; plug->category = VSTPluginLib::catDMO; #ifdef DMO_LOG - Log("Found \"%s\" clsid=%s\n", plug->libraryName.AsNative().c_str(), plug->dllPath.AsNative().c_str()); + Log(mpt::String::PrintW(L"Found \"%1\" clsid=%2\n", plug->libraryName, plug->dllPath)); #endif } } @@ -238,12 +240,12 @@ } -// // PluginCache format: // LibraryName = ID100000ID200000 // ID100000ID200000 = FullDllPath -// ID100000ID200000.Flags = Plugin Flags (isInstrument + category). +// ID100000ID200000.Flags = Plugin Flags (set VSTPluginLib::DecodeCacheFlags). +// Add a plugin to the list of known plugins. VSTPluginLib *CVstPluginManager::AddPlugin(const mpt::PathString &dllPath, bool fromCache, const bool checkFileExistence, std::wstring *const errStr) //--------------------------------------------------------------------------------------------------------------------------------------------------- { @@ -287,8 +289,8 @@ } pluginList.push_back(plug); - // Extract plugin Ids - for (UINT i=0; i<16; i++) + // Extract plugin IDs + for (int i = 0; i < 16; i++) { UINT n = IDs[i] - '0'; if (n > 9) n = IDs[i] + 10 - 'A'; @@ -302,7 +304,7 @@ } } - std::string flagKey = mpt::String::Format("%s.Flags", IDs.c_str()); + const std::string flagKey = mpt::String::Format("%s.Flags", IDs.c_str()); plug->DecodeCacheFlags(cacheFile.Read<int32>(cacheSection, flagKey, 0)); #ifdef VST_USE_ALTERNATIVE_MAGIC @@ -376,7 +378,7 @@ } // Now it should be safe to assume that this plugin loaded properly. :) - theApp.GetSettings().Write<std::string>("VST Plugins", "FailedPlugin", ""); + theApp.GetSettings().Remove("VST Plugins", "FailedPlugin"); // If OK, write the information in PluginCache if(validPlug) @@ -397,12 +399,16 @@ cacheFile.Write<mpt::PathString>(cacheSection, IDs, dllPath); cacheFile.Write<std::string>(cacheSectionW, plug->libraryName.ToWide(), IDs); cacheFile.Write<int32>(cacheSection, flagsKey, plug->EncodeCacheFlags()); + } else + { + delete plug; } return (validPlug ? plug : nullptr); } +// Remove a plugin from the list of known plugins and release any remaining instances of it. bool CVstPluginManager::RemovePlugin(VSTPluginLib *pFactory) //---------------------------------------------------------- { @@ -411,6 +417,7 @@ VSTPluginLib *plug = *p; if(plug == pFactory) { + // Kill all instances of this plugin try { CriticalSection cs; @@ -433,6 +440,7 @@ } +// Create an instance of a plugin. bool CVstPluginManager::CreateMixPlugin(SNDMIXPLUGIN &mixPlugin, CSoundFile &sndFile) //----------------------------------------------------------------------------------- { @@ -477,9 +485,8 @@ if(!pFound && strcmp(mixPlugin.GetLibraryName(), "")) { - // Try finding the plugin DLL in the plugin directory instead. - mpt::PathString fullPath; - fullPath = TrackerDirectories::Instance().GetDefaultDirectory(DIR_PLUGINS); + // Try finding the plugin DLL in the plugin directory or plugin cache instead. + mpt::PathString fullPath = TrackerDirectories::Instance().GetDefaultDirectory(DIR_PLUGINS); if(fullPath.empty()) { fullPath = theApp.GetAppDirPath() + MPT_PATHSTRING("Plugins\\"); @@ -493,6 +500,7 @@ pFound = AddPlugin(fullPath); if(!pFound) { + // Try plugin cache (search for library name) SettingsContainer &cacheFile = theApp.GetPluginCache(); std::string IDs = cacheFile.Read<std::string>(cacheSectionW, mpt::ToWide(mpt::CharsetUTF8, mixPlugin.GetLibraryName()), ""); if(IDs.length() >= 16) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-27 01:53:01
|
Revision: 3323 http://sourceforge.net/p/modplug/code/3323 Author: manxorist Date: 2013-11-27 01:52:51 +0000 (Wed, 27 Nov 2013) Log Message: ----------- [Int] Prepare premake4 files to support building libopenmpt via premake. Modified Paths: -------------- trunk/OpenMPT/build/premake4-defaults-DLL.lua trunk/OpenMPT/build/premake4-defaults-EXE.lua trunk/OpenMPT/build/premake4-defaults-LIB.lua trunk/OpenMPT/build/update_premake4_projects.cmd trunk/OpenMPT/include/premake4.lua Added Paths: ----------- trunk/OpenMPT/build/premake4-defaults-shared.lua trunk/OpenMPT/build/premake4-defaults-static.lua trunk/OpenMPT/build/premake4.lua Removed Paths: ------------- trunk/OpenMPT/build/premake4-defaults.lua Property Changed: ---------------- trunk/OpenMPT/build/ Index: trunk/OpenMPT/build =================================================================== --- trunk/OpenMPT/build 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build 2013-11-27 01:52:51 UTC (rev 3323) Property changes on: trunk/OpenMPT/build ___________________________________________________________________ Modified: svn:ignore ## -1,3 +1,4 ## lib obj premake4.exe +all.sln Modified: trunk/OpenMPT/build/premake4-defaults-DLL.lua =================================================================== --- trunk/OpenMPT/build/premake4-defaults-DLL.lua 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build/premake4-defaults-DLL.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -19,5 +19,3 @@ configuration "*" kind "SharedLib" - - dofile "premake4-defaults.lua" Modified: trunk/OpenMPT/build/premake4-defaults-EXE.lua =================================================================== --- trunk/OpenMPT/build/premake4-defaults-EXE.lua 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build/premake4-defaults-EXE.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -19,5 +19,3 @@ configuration "*" kind "ConsoleApp" - - dofile "premake4-defaults.lua" Modified: trunk/OpenMPT/build/premake4-defaults-LIB.lua =================================================================== --- trunk/OpenMPT/build/premake4-defaults-LIB.lua 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build/premake4-defaults-LIB.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -19,5 +19,3 @@ configuration "*" kind "StaticLib" - - dofile "premake4-defaults.lua" Added: trunk/OpenMPT/build/premake4-defaults-shared.lua =================================================================== --- trunk/OpenMPT/build/premake4-defaults-shared.lua (rev 0) +++ trunk/OpenMPT/build/premake4-defaults-shared.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -0,0 +1,17 @@ + + configuration "Debug" + defines { "DEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Symbols" } + + configuration "Release" + defines { "NDEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Symbols", "Optimize", "FloatFast" } + buildoptions { "/MP" } + + configuration "ReleaseNoLTCG" + defines { "NDEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Optimize", "FloatFast" } + buildoptions { "/GL- /MP" } Copied: trunk/OpenMPT/build/premake4-defaults-static.lua (from rev 3321, trunk/OpenMPT/build/premake4-defaults.lua) =================================================================== --- trunk/OpenMPT/build/premake4-defaults-static.lua (rev 0) +++ trunk/OpenMPT/build/premake4-defaults-static.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -0,0 +1,17 @@ + + configuration "Debug" + defines { "DEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Symbols" } + + configuration "Release" + defines { "NDEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Symbols", "Optimize", "FloatFast", "StaticRuntime" } + buildoptions { "/MP" } + + configuration "ReleaseNoLTCG" + defines { "NDEBUG" } + defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } + flags { "Optimize", "FloatFast", "StaticRuntime" } + buildoptions { "/GL- /MP" } Deleted: trunk/OpenMPT/build/premake4-defaults.lua =================================================================== --- trunk/OpenMPT/build/premake4-defaults.lua 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build/premake4-defaults.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -1,17 +0,0 @@ - - configuration "Debug" - defines { "DEBUG" } - defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } - flags { "Symbols" } - - configuration "Release" - defines { "NDEBUG" } - defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } - flags { "Symbols", "Optimize", "FloatFast", "StaticRuntime" } - buildoptions { "/MP" } - - configuration "ReleaseNoLTCG" - defines { "NDEBUG" } - defines { "WIN32", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS" } - flags { "Optimize", "FloatFast", "StaticRuntime" } - buildoptions { "/GL- /MP" } Added: trunk/OpenMPT/build/premake4.lua =================================================================== --- trunk/OpenMPT/build/premake4.lua (rev 0) +++ trunk/OpenMPT/build/premake4.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -0,0 +1,6 @@ + +solution "all" + configurations { "Debug", "Release", "ReleaseNoLTCG" } + platforms { "x32", "x64" } + + dofile "../include/premake4.lua" Modified: trunk/OpenMPT/build/update_premake4_projects.cmd =================================================================== --- trunk/OpenMPT/build/update_premake4_projects.cmd 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/build/update_premake4_projects.cmd 2013-11-27 01:52:51 UTC (rev 3323) @@ -5,10 +5,10 @@ cd build cd .. || goto err -echo dofile "include/premake4.lua" > premake4.lua || goto err +echo dofile "build/premake4.lua" > premake4.lua || goto err +build\premake4.exe vs2008 || goto err build\premake4.exe vs2010 || goto err -build\premake4.exe vs2008 || goto err del premake4.lua || goto err Modified: trunk/OpenMPT/include/premake4.lua =================================================================== --- trunk/OpenMPT/include/premake4.lua 2013-11-27 01:04:51 UTC (rev 3322) +++ trunk/OpenMPT/include/premake4.lua 2013-11-27 01:52:51 UTC (rev 3323) @@ -1,9 +1,4 @@ -solution "include" - configurations { "Debug", "Release", "ReleaseNoLTCG" } - platforms { "x32", "x64" } - - project "UnRAR" uuid "95CC809B-03FC-4EDB-BB20-FD07A698C05F" language "C++" @@ -130,6 +125,7 @@ "../include/unrar/volume.hpp", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -170,6 +166,7 @@ "../include/zlib/zutil.h", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -195,6 +192,7 @@ "../include/zlib/contrib/minizip/zip.h", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -207,6 +205,7 @@ "../include/miniz/miniz.c", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -223,6 +222,7 @@ "../include/smbPitchShift/smbPitchShift.h", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -273,6 +273,7 @@ configuration "vs2008" includedirs { "../include/msinttypes/stdint" } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -343,6 +344,7 @@ configuration "vs2008" defines { "VERSION=\\\"1.3.0\\\"" } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -415,6 +417,7 @@ configuration "Debug*" defines { "PA_ENABLE_DEBUG_OUTPUT" } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -440,6 +443,7 @@ "../include/portmidi/pm_win/pmwinmm.h", } dofile "../build/premake4-defaults-LIB.lua" + dofile "../build/premake4-defaults-static.lua" @@ -480,6 +484,7 @@ } defines { "DLL_EXPORTS", "SOUNDTOUCH_INTEGER_SAMPLES=1" } dofile "../build/premake4-defaults-DLL.lua" + dofile "../build/premake4-defaults-static.lua" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-27 02:20:43
|
Revision: 3324 http://sourceforge.net/p/modplug/code/3324 Author: manxorist Date: 2013-11-27 02:20:27 +0000 (Wed, 27 Nov 2013) Log Message: ----------- [Int] Move premake generated project files from build/ into build/gen/ directory to avoid cluttering build/ with tons of files that nobody is supposed to ever edit. Modified Paths: -------------- trunk/OpenMPT/include/premake4.lua trunk/OpenMPT/mptrack/MPTRACK_08.sln trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/openmpt123/openmpt123.sln trunk/OpenMPT/openmpt123/openmpt123.vcxproj trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj Added Paths: ----------- trunk/OpenMPT/build/gen/ trunk/OpenMPT/build/gen/UnRAR.vcproj trunk/OpenMPT/build/gen/UnRAR.vcxproj trunk/OpenMPT/build/gen/UnRAR.vcxproj.filters trunk/OpenMPT/build/gen/UnRAR.vcxproj.user trunk/OpenMPT/build/gen/flac.vcproj trunk/OpenMPT/build/gen/flac.vcxproj trunk/OpenMPT/build/gen/flac.vcxproj.filters trunk/OpenMPT/build/gen/flac.vcxproj.user trunk/OpenMPT/build/gen/lhasa.vcproj trunk/OpenMPT/build/gen/lhasa.vcxproj trunk/OpenMPT/build/gen/lhasa.vcxproj.filters trunk/OpenMPT/build/gen/lhasa.vcxproj.user trunk/OpenMPT/build/gen/miniz.vcproj trunk/OpenMPT/build/gen/miniz.vcxproj trunk/OpenMPT/build/gen/miniz.vcxproj.filters trunk/OpenMPT/build/gen/miniz.vcxproj.user trunk/OpenMPT/build/gen/minizip.vcproj trunk/OpenMPT/build/gen/minizip.vcxproj trunk/OpenMPT/build/gen/minizip.vcxproj.filters trunk/OpenMPT/build/gen/minizip.vcxproj.user trunk/OpenMPT/build/gen/portaudio.vcproj trunk/OpenMPT/build/gen/portaudio.vcxproj trunk/OpenMPT/build/gen/portaudio.vcxproj.filters trunk/OpenMPT/build/gen/portaudio.vcxproj.user trunk/OpenMPT/build/gen/portmidi.vcproj trunk/OpenMPT/build/gen/portmidi.vcxproj trunk/OpenMPT/build/gen/portmidi.vcxproj.filters trunk/OpenMPT/build/gen/portmidi.vcxproj.user trunk/OpenMPT/build/gen/smbPitchShift.vcproj trunk/OpenMPT/build/gen/smbPitchShift.vcxproj trunk/OpenMPT/build/gen/smbPitchShift.vcxproj.filters trunk/OpenMPT/build/gen/smbPitchShift.vcxproj.user trunk/OpenMPT/build/gen/soundtouch.vcproj trunk/OpenMPT/build/gen/soundtouch.vcxproj trunk/OpenMPT/build/gen/soundtouch.vcxproj.filters trunk/OpenMPT/build/gen/soundtouch.vcxproj.user trunk/OpenMPT/build/gen/zlib.vcproj trunk/OpenMPT/build/gen/zlib.vcxproj trunk/OpenMPT/build/gen/zlib.vcxproj.filters trunk/OpenMPT/build/gen/zlib.vcxproj.user Removed Paths: ------------- trunk/OpenMPT/build/UnRAR.vcproj trunk/OpenMPT/build/UnRAR.vcxproj trunk/OpenMPT/build/UnRAR.vcxproj.filters trunk/OpenMPT/build/UnRAR.vcxproj.user trunk/OpenMPT/build/flac.vcproj trunk/OpenMPT/build/flac.vcxproj trunk/OpenMPT/build/flac.vcxproj.filters trunk/OpenMPT/build/flac.vcxproj.user trunk/OpenMPT/build/lhasa.vcproj trunk/OpenMPT/build/lhasa.vcxproj trunk/OpenMPT/build/lhasa.vcxproj.filters trunk/OpenMPT/build/lhasa.vcxproj.user trunk/OpenMPT/build/miniz.vcproj trunk/OpenMPT/build/miniz.vcxproj trunk/OpenMPT/build/miniz.vcxproj.filters trunk/OpenMPT/build/miniz.vcxproj.user trunk/OpenMPT/build/minizip.vcproj trunk/OpenMPT/build/minizip.vcxproj trunk/OpenMPT/build/minizip.vcxproj.filters trunk/OpenMPT/build/minizip.vcxproj.user trunk/OpenMPT/build/portaudio.vcproj trunk/OpenMPT/build/portaudio.vcxproj trunk/OpenMPT/build/portaudio.vcxproj.filters trunk/OpenMPT/build/portaudio.vcxproj.user trunk/OpenMPT/build/portmidi.vcproj trunk/OpenMPT/build/portmidi.vcxproj trunk/OpenMPT/build/portmidi.vcxproj.filters trunk/OpenMPT/build/portmidi.vcxproj.user trunk/OpenMPT/build/smbPitchShift.vcproj trunk/OpenMPT/build/smbPitchShift.vcxproj trunk/OpenMPT/build/smbPitchShift.vcxproj.filters trunk/OpenMPT/build/smbPitchShift.vcxproj.user trunk/OpenMPT/build/soundtouch.vcproj trunk/OpenMPT/build/soundtouch.vcxproj trunk/OpenMPT/build/soundtouch.vcxproj.filters trunk/OpenMPT/build/soundtouch.vcxproj.user trunk/OpenMPT/build/zlib.vcproj trunk/OpenMPT/build/zlib.vcxproj trunk/OpenMPT/build/zlib.vcxproj.filters trunk/OpenMPT/build/zlib.vcxproj.user Deleted: trunk/OpenMPT/build/UnRAR.vcproj =================================================================== --- trunk/OpenMPT/build/UnRAR.vcproj 2013-11-27 01:52:51 UTC (rev 3323) +++ trunk/OpenMPT/build/UnRAR.vcproj 2013-11-27 02:20:27 UTC (rev 3324) @@ -1,961 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="UnRAR" - ProjectGUID="{95CC809B-03FC-4EDB-BB20-FD07A698C05F}" - RootNamespace="UnRAR" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="lib\x32\Debug" - IntermediateDirectory="obj\unrar\x32\Debug" - 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="..\include\unrar" - PreprocessorDefinitions="DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="lib\x64\Debug" - IntermediateDirectory="obj\unrar\x64\Debug" - ConfigurationType="4" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\include\unrar" - PreprocessorDefinitions="DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="lib\x32\Release" - IntermediateDirectory="obj\unrar\x32\Release" - ConfigurationType="4" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/MP" - Optimization="3" - AdditionalIncludeDirectories="..\include\unrar" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - FloatingPointModel="2" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="lib\x64\Release" - IntermediateDirectory="obj\unrar\x64\Release" - ConfigurationType="4" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/MP" - Optimization="3" - AdditionalIncludeDirectories="..\include\unrar" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - FloatingPointModel="2" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="ReleaseNoLTCG|Win32" - OutputDirectory="lib\x32\ReleaseNoLTCG" - IntermediateDirectory="obj\unrar\x32\ReleaseNoLTCG" - ConfigurationType="4" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/GL- /MP" - Optimization="3" - AdditionalIncludeDirectories="..\include\unrar" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - FloatingPointModel="2" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="ReleaseNoLTCG|x64" - OutputDirectory="lib\x64\ReleaseNoLTCG" - IntermediateDirectory="obj\unrar\x64\ReleaseNoLTCG" - ConfigurationType="4" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/GL- /MP" - Optimization="3" - AdditionalIncludeDirectories="..\include\unrar" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - FloatingPointModel="2" - UsePrecompiledHeader="0" - WarningLevel="3" - ProgramDataBaseFileName="$(OutDir)\UnRAR.pdb" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS" - AdditionalIncludeDirectories="..\include\unrar" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\UnRAR.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="include" - Filter="" - > - <Filter - Name="unrar" - Filter="" - > - <File - RelativePath="..\include\unrar\archive.cpp" - > - </File> - <File - RelativePath="..\include\unrar\arcread.cpp" - > - </File> - <File - RelativePath="..\include\unrar\blake2s.cpp" - > - </File> - <File - RelativePath="..\include\unrar\cmddata.cpp" - > - </File> - <File - RelativePath="..\include\unrar\consio.cpp" - > - </File> - <File - RelativePath="..\include\unrar\crc.cpp" - > - </File> - <File - RelativePath="..\include\unrar\crypt.cpp" - > - </File> - <File - RelativePath="..\include\unrar\encname.cpp" - > - </File> - <File - RelativePath="..\include\unrar\errhnd.cpp" - > - </File> - <File - RelativePath="..\include\unrar\extinfo.cpp" - > - </File> - <File - RelativePath="..\include\unrar\extract.cpp" - > - </File> - <File - RelativePath="..\include\unrar\filcreat.cpp" - > - </File> - <File - RelativePath="..\include\unrar\file.cpp" - > - </File> - <File - RelativePath="..\include\unrar\filefn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\filestr.cpp" - > - </File> - <File - RelativePath="..\include\unrar\find.cpp" - > - </File> - <File - RelativePath="..\include\unrar\getbits.cpp" - > - </File> - <File - RelativePath="..\include\unrar\global.cpp" - > - </File> - <File - RelativePath="..\include\unrar\hash.cpp" - > - </File> - <File - RelativePath="..\include\unrar\headers.cpp" - > - </File> - <File - RelativePath="..\include\unrar\isnt.cpp" - > - </File> - <File - RelativePath="..\include\unrar\list.cpp" - > - </File> - <File - RelativePath="..\include\unrar\match.cpp" - > - </File> - <File - RelativePath="..\include\unrar\options.cpp" - > - </File> - <File - RelativePath="..\include\unrar\pathfn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\qopen.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rar.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rarpch.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rarvm.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rawread.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rdwrfn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\recvol.cpp" - > - </File> - <File - RelativePath="..\include\unrar\resource.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rijndael.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rs.cpp" - > - </File> - <File - RelativePath="..\include\unrar\rs16.cpp" - > - </File> - <File - RelativePath="..\include\unrar\scantree.cpp" - > - </File> - <File - RelativePath="..\include\unrar\secpassword.cpp" - > - </File> - <File - RelativePath="..\include\unrar\sha1.cpp" - > - </File> - <File - RelativePath="..\include\unrar\sha256.cpp" - > - </File> - <File - RelativePath="..\include\unrar\smallfn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\strfn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\strlist.cpp" - > - </File> - <File - RelativePath="..\include\unrar\system.cpp" - > - </File> - <File - RelativePath="..\include\unrar\threadpool.cpp" - > - </File> - <File - RelativePath="..\include\unrar\timefn.cpp" - > - </File> - <File - RelativePath="..\include\unrar\unicode.cpp" - > - </File> - <File - RelativePath="..\include\unrar\unpack.cpp" - > - </File> - <File - RelativePath="..\include\unrar\volume.cpp" - > - </File> - <File - RelativePath="..\include\unrar\archive.hpp" - > - </File> - <File - RelativePath="..\include\unrar\array.hpp" - > - </File> - <File - RelativePath="..\include\unrar\blake2s.hpp" - > - </File> - <File - RelativePath="..\include\unrar\cmddata.hpp" - > - </File> - <File - RelativePath="..\include\unrar\coder.hpp" - > - </File> - <File - RelativePath="..\include\unrar\compress.hpp" - > - </File> - <File - RelativePath="..\include\unrar\consio.hpp" - > - </File> - <File - RelativePath="..\include\unrar\crc.hpp" - > - </File> - <File - RelativePath="..\include\unrar\crypt.hpp" - > - </File> - <File - RelativePath="..\include\unrar\dll.hpp" - > - </File> - <File - RelativePath="..\include\unrar\encname.hpp" - > - </File> - <File - RelativePath="..\include\unrar\errhnd.hpp" - > - </File> - <File - RelativePath="..\include\unrar\extinfo.hpp" - > - </File> - <File - RelativePath="..\include\unrar\extract.hpp" - > - </File> - <File - RelativePath="..\include\unrar\filcreat.hpp" - > - </File> - <File - RelativePath="..\include\unrar\file.hpp" - > - </File> - <File - RelativePath="..\include\unrar\filefn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\filestr.hpp" - > - </File> - <File - RelativePath="..\include\unrar\find.hpp" - > - </File> - <File - RelativePath="..\include\unrar\getbits.hpp" - > - </File> - <File - RelativePath="..\include\unrar\global.hpp" - > - </File> - <File - RelativePath="..\include\unrar\hash.hpp" - > - </File> - <File - RelativePath="..\include\unrar\headers.hpp" - > - </File> - <File - RelativePath="..\include\unrar\headers5.hpp" - > - </File> - <File - RelativePath="..\include\unrar\isnt.hpp" - > - </File> - <File - RelativePath="..\include\unrar\list.hpp" - > - </File> - <File - RelativePath="..\include\unrar\loclang.hpp" - > - </File> - <File - RelativePath="..\include\unrar\log.hpp" - > - </File> - <File - RelativePath="..\include\unrar\match.hpp" - > - </File> - <File - RelativePath="..\include\unrar\model.hpp" - > - </File> - <File - RelativePath="..\include\unrar\openmpt.hpp" - > - </File> - <File - RelativePath="..\include\unrar\openmpt-callback.hpp" - > - </File> - <File - RelativePath="..\include\unrar\options.hpp" - > - </File> - <File - RelativePath="..\include\unrar\os.hpp" - > - </File> - <File - RelativePath="..\include\unrar\pathfn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\qopen.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rar.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rardefs.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rarlang.hpp" - > - </File> - <File - RelativePath="..\include\unrar\raros.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rartypes.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rarvm.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rawread.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rdwrfn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\recvol.hpp" - > - </File> - <File - RelativePath="..\include\unrar\resource.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rijndael.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rs.hpp" - > - </File> - <File - RelativePath="..\include\unrar\rs16.hpp" - > - </File> - <File - RelativePath="..\include\unrar\savepos.hpp" - > - </File> - <File - RelativePath="..\include\unrar\scantree.hpp" - > - </File> - <File - RelativePath="..\include\unrar\secpassword.hpp" - > - </File> - <File - RelativePath="..\include\unrar\sha1.hpp" - > - </File> - <File - RelativePath="..\include\unrar\sha256.hpp" - > - </File> - <File - RelativePath="..\include\unrar\smallfn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\strfn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\strlist.hpp" - > - </File> - <File - RelativePath="..\include\unrar\suballoc.hpp" - > - </File> - <File - RelativePath="..\include\unrar\system.hpp" - > - </File> - <File - RelativePath="..\include\unrar\threadpool.hpp" - > - </File> - <File - RelativePath="..\include\unrar\timefn.hpp" - > - </File> - <File - RelativePath="..\include\unrar\ulinks.hpp" - > - </File> - <File - RelativePath="..\include\unrar\unicode.hpp" - > - </File> - <File - RelativePath="..\include\unrar\unpack.hpp" - > - </File> - <File - RelativePath="..\include\unrar\version.hpp" - > - </File> - <File - RelativePath="..\include\unrar\volume.hpp" - > - </File> - </Filter> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Deleted: trunk/OpenMPT/build/UnRAR.vcxproj =================================================================== --- trunk/OpenMPT/build/UnRAR.vcxproj 2013-11-27 01:52:51 UTC (rev 3323) +++ trunk/OpenMPT/build/UnRAR.vcxproj 2013-11-27 02:20:27 UTC (rev 3324) @@ -1,453 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseNoLTCG|Win32"> - <Configuration>ReleaseNoLTCG</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="ReleaseNoLTCG|x64"> - <Configuration>ReleaseNoLTCG</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{95CC809B-03FC-4EDB-BB20-FD07A698C05F}</ProjectGuid> - <RootNamespace>UnRAR</RootNamespace> - <Keyword>Win32Proj</Keyword> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <UseDebugLibraries>true</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <UseDebugLibraries>true</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <WholeProgramOptimization>true</WholeProgramOptimization> - <UseDebugLibraries>false</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <WholeProgramOptimization>true</WholeProgramOptimization> - <UseDebugLibraries>false</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <WholeProgramOptimization>true</WholeProgramOptimization> - <UseDebugLibraries>false</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>MultiByte</CharacterSet> - <WholeProgramOptimization>true</WholeProgramOptimization> - <UseDebugLibraries>false</UseDebugLibraries> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">lib\x32\Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\unrar\x32\Debug\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UnRAR</TargetName> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">lib\x64\Debug\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\unrar\x64\Debug\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">UnRAR</TargetName> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">lib\x32\Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\unrar\x32\Release\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UnRAR</TargetName> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">lib\x64\Release\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\unrar\x64\Release\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">UnRAR</TargetName> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">lib\x32\ReleaseNoLTCG\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">obj\unrar\x32\ReleaseNoLTCG\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">UnRAR</TargetName> - <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">lib\x64\ReleaseNoLTCG\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">obj\unrar\x64\ReleaseNoLTCG\</IntDir> - <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">UnRAR</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDataBaseFileName>$(OutDir)UnRAR.pdb</ProgramDataBaseFileName> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>OldStyle</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDataBaseFileName>$(OutDir)UnRAR.pdb</ProgramDataBaseFileName> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> - <Optimization>Full</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <FloatingPointModel>Fast</FloatingPointModel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <ProgramDataBaseFileName>$(OutDir)UnRAR.pdb</ProgramDataBaseFileName> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> - <Optimization>Full</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <FloatingPointModel>Fast</FloatingPointModel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <ProgramDataBaseFileName>$(OutDir)UnRAR.pdb</ProgramDataBaseFileName> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'"> - <ClCompile> - <AdditionalOptions>/GL- /MP %(AdditionalOptions)</AdditionalOptions> - <Optimization>Full</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <FloatingPointModel>Fast</FloatingPointModel> - <DebugInformationFormat></DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>false</GenerateDebugInformation> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'"> - <ClCompile> - <AdditionalOptions>/GL- /MP %(AdditionalOptions)</AdditionalOptions> - <Optimization>Full</Optimization> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader></PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <FloatingPointModel>Fast</FloatingPointModel> - <DebugInformationFormat></DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\include\unrar;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)UnRAR.lib</OutputFile> - </Lib> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>false</GenerateDebugInformation> - <OptimizeReferences>true</OptimizeReferences> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClInclude Include="..\include\unrar\archive.hpp" /> - <ClInclude Include="..\include\unrar\array.hpp" /> - <ClInclude Include="..\include\unrar\blake2s.hpp" /> - <ClInclude Include="..\include\unrar\cmddata.hpp" /> - <ClInclude Include="..\include\unrar\coder.hpp" /> - <ClInclude Include="..\include\unrar\compress.hpp" /> - <ClInclude Include="..\include\unrar\consio.hpp" /> - <ClInclude Include="..\include\unrar\crc.hpp" /> - <ClInclude Include="..\include\unrar\crypt.hpp" /> - <ClInclude Include="..\include\unrar\dll.hpp" /> - <ClInclude Include="..\include\unrar\encname.hpp" /> - <ClInclude Include="..\include\unrar\errhnd.hpp" /> - <ClInclude Include="..\include\unrar\extinfo.hpp" /> - <ClInclude Include="..\include\unrar\extract.hpp" /> - <ClInclude Include="..\include\unrar\filcreat.hpp" /> - <ClInclude Include="..\include\unrar\file.hpp" /> - <ClInclude Include="..\include\unrar\filefn.hpp" /> - <ClInclude Include="..\include\unrar\filestr.hpp" /> - <ClInclude Include="..\include\unrar\find.hpp" /> - <ClInclude Include="..\include\unrar\getbits.hpp" /> - <ClInclude Include="..\include\unrar\global.hpp" /> - <ClInclude Include="..\include\unrar\hash.hpp" /> - <ClInclude Include="..\include\unrar\headers.hpp" /> - <ClInclude Include="..\include\unrar\headers5.hpp" /> - <ClInclude Include="..\include\unrar\isnt.hpp" /> - <ClInclude Include="..\include\unrar\list.hpp" /> - <ClInclude Include="..\include\unrar\loclang.hpp" /> - <ClInclude Include="..\include\unrar\log.hpp" /> - <ClInclude Include="..\include\unrar\match.hpp" /> - <ClInclude Include="..\include\unrar\model.hpp" /> - <ClInclude Include="..\include\unrar\openmpt.hpp" /> - <ClInclude Include="..\include\unrar\openmpt-callback.hpp" /> - <ClInclude Include="..\include\unrar\options.hpp" /> - <ClInclude Include="..\include\unrar\os.hpp" /> - <ClInclude Include="..\include\unrar\pathfn.hpp" /> - <ClInclude Include="..\include\unrar\qopen.hpp" /> - <ClInclude Include="..\include\unrar\rar.hpp" /> - <ClInclude Include="..\include\unrar\rardefs.hpp" /> - <ClInclude Include="..\include\unrar\rarlang.hpp" /> - <ClInclude Include="..\include\unrar\raros.hpp" /> - <ClInclude Include="..\include\unrar\rartypes.hpp" /> - <ClInclude Include="..\include\unrar\rarvm.hpp" /> - <ClInclude Include="..\include\unrar\rawread.hpp" /> - <ClInclude Include="..\include\unrar\rdwrfn.hpp" /> - <ClInclude Include="..\include\unrar\recvol.hpp" /> - <ClInclude Include="..\include\unrar\resource.hpp" /> - <ClInclude Include="..\include\unrar\rijndael.hpp" /> - <ClInclude Include="..\include\unrar\rs.hpp" /> - <ClInclude Include="..\include\unrar\rs16.hpp" /> - <ClInclude Include="..\include\unrar\savepos.hpp" /> - <ClInclude Include="..\include\unrar\scantree.hpp" /> - <ClInclude Include="..\include\unrar\secpassword.hpp" /> - <ClInclude Include="..\include\unrar\sha1.hpp" /> - <ClInclude Include="..\include\unrar\sha256.hpp" /> - <ClInclude Include="..\include\unrar\smallfn.hpp" /> - <ClInclude Include="..\include\unrar\strfn.hpp" /> - <ClInclude Include="..\include\unrar\strlist.hpp" /> - <ClInclude Include="..\include\unrar\suballoc.hpp" /> - <ClInclude Include="..\include\unrar\system.hpp" /> - <ClInclude Include="..\include\unrar\threadpool.hpp" /> - <ClInclude Include="..\include\unrar\timefn.hpp" /> - <ClInclude Include="..\include\unrar\ulinks.hpp" /> - <ClInclude Include="..\include\unrar\unicode.hpp" /> - <ClInclude Include="..\include\unrar\unpack.hpp" /> - <ClInclude Include="..\include\unrar\version.hpp" /> - <ClInclude Include="..\include\unrar\volume.hpp" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\include\unrar\archive.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\arcread.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\blake2s.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\cmddata.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\consio.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\crc.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\crypt.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\encname.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\errhnd.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\extinfo.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\extract.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\filcreat.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\file.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\filefn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\filestr.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\find.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\getbits.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\global.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\hash.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\headers.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\isnt.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\list.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\match.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\options.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\pathfn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\qopen.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rar.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rarpch.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rarvm.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rawread.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rdwrfn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\recvol.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\resource.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rijndael.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rs.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\rs16.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\scantree.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\secpassword.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\sha1.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\sha256.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\smallfn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\strfn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\strlist.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\system.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\threadpool.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\timefn.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\unicode.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\unpack.cpp"> - </ClCompile> - <ClCompile Include="..\include\unrar\volume.cpp"> - </ClCompile> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> Deleted: trunk/OpenMPT/build/UnRAR.vcxproj.filters =================================================================== --- trunk/OpenMPT/build/UnRAR.vcxproj.filters 2013-11-27 01:52:51 UTC (rev 3323) +++ trunk/OpenMPT/build/UnRAR.vcxproj.filters 2013-11-27 02:20:27 UTC (rev 3324) @@ -1,360 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="include"> - <UniqueIdentifier>{51767C19-EBB5-3448-8D82-2C4A76FF7978}</UniqueIdentifier> - </Filter> - <Filter Include="include\unrar"> - <UniqueIdentifier>{1C42A34F-03C5-A940-9043-178F6FD772A9}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\include\unrar\archive.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\array.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\blake2s.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\cmddata.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\coder.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\compress.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\consio.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\crc.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\crypt.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\dll.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\encname.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\errhnd.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\extinfo.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\extract.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\filcreat.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\file.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\filefn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\filestr.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\find.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\getbits.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\global.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\hash.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\headers.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\headers5.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\isnt.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\list.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\loclang.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\log.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\match.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\model.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\openmpt.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\openmpt-callback.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\options.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\os.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\pathfn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\qopen.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rar.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rardefs.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rarlang.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\raros.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rartypes.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rarvm.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rawread.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rdwrfn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\recvol.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\resource.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rijndael.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rs.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\rs16.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\savepos.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\scantree.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\secpassword.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\sha1.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\sha256.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\smallfn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\strfn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\strlist.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\suballoc.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\system.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\threadpool.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\timefn.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\ulinks.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\unicode.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\unpack.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\version.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - <ClInclude Include="..\include\unrar\volume.hpp"> - <Filter>include\unrar</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\include\unrar\archive.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\arcread.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\blake2s.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\cmddata.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\consio.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\crc.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\crypt.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\encname.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\errhnd.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\extinfo.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\extract.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\filcreat.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\file.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\filefn.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\filestr.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\find.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\getbits.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\global.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\hash.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\headers.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\isnt.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\list.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\match.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\options.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\pathfn.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\qopen.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rar.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rarpch.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rarvm.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rawread.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rdwrfn.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\recvol.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\resource.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rijndael.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rs.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\include\unrar\rs16.cpp"> - <Filter>include\unrar</Filter> - </ClCompile> - <ClCompile Include="..\inclu... [truncated message content] |
From: <man...@us...> - 2013-11-27 15:18:52
|
Revision: 3325 http://sourceforge.net/p/modplug/code/3325 Author: manxorist Date: 2013-11-27 15:18:44 +0000 (Wed, 27 Nov 2013) Log Message: ----------- [Ref] Avoid potential macro redefinition warning in BuildSettings.h with different build systems or compiler settings. [Fix] libopenmpt: Do not assume building in_openmpt, xmp-openmpt and libopenmpt_modplug into the same DLL as libopenmpt itself. Decouple these from LIBOPENMPT_BUILD macro, libopenmpt_internal.h and BuildSettings.h . Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/version.cpp trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/common/BuildSettings.h 2013-11-27 15:18:44 UTC (rev 3325) @@ -283,8 +283,12 @@ #endif #if MPT_COMPILER_MSVC +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS // Define to disable the "This function or variable may be unsafe" warnings. +#endif #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1 +#ifndef _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #endif +#endif Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/common/version.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -317,10 +317,6 @@ "Pel K. Txnder for the scrolling credits control :)\n" "http://tinyurl.com/4yze8\n" #endif -#if defined(LIBOPENMPT_BUILD) && !defined(NO_XMPLAY) - "Arseny Kapoulkine for pugixml\n" - "http://pugixml.org/\n" -#endif "\n" "The people at ModPlug forums for crucial contribution\n" "in the form of ideas, testing and support; thanks\n" @@ -329,7 +325,6 @@ "christofori, Diamond, Ganja, Georg, Goor00, jmkz,\n" "KrazyKatz, LPChip, Nofold, Rakib, Sam Zen\n" "Skaven, Skilletaudio, Snu, Squirrel Havoc, Waxhead\n" - "\n" #ifndef NO_VST "\n" "VST PlugIn Technology by Steinberg Media Technologies GmbH\n" Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,16 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_LIBMODPLUG +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif + #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #endif /* _MSC_VER */ -#include "libopenmpt_internal.h" - #include "libopenmpt.h" #include <limits.h> @@ -30,7 +32,7 @@ /* msvc errors when seeing dllexport declarations after prototypes have been declared in modplug.h */ #define LIBOPENMPT_MODPLUG_API #else /* !_MSC_VER */ -#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API +#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API_HELPER_EXPORT #endif /* _MSC_VER */ #include "libmodplug/modplug.h" Modified: trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,12 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_WINAMP -#include "libopenmpt_internal.h" +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif +#ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif // _MSC_VER + #include "libopenmpt.hpp" #include "libopenmpt_settings.hpp" @@ -20,8 +26,6 @@ #include "svn_version.h" static char * in_openmpt_string = "in_openmpt " OPENMPT_API_VERSION_STRING "." OPENMPT_API_VERSION_STRINGIZE(OPENMPT_VERSION_REVISION); -#define LIBOPENMPT_WINAMP_API LIBOPENMPT_API - #define NOMINMAX #include <windows.h> @@ -441,7 +445,7 @@ 0 // out_mod }; -extern "C" LIBOPENMPT_WINAMP_API In_Module * winampGetInModule2() { +extern "C" __declspec(dllexport) In_Module * winampGetInModule2() { return &inmod; } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-11-27 02:20:27 UTC (rev 3324) +++ trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-11-27 15:18:44 UTC (rev 3325) @@ -7,12 +7,18 @@ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ -#include "BuildSettings.h" - #ifndef NO_XMPLAY -#include "libopenmpt_internal.h" +#ifdef LIBOPENMPT_BUILD_DLL +#undef LIBOPENMPT_BUILD_DLL +#endif +#ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif // _MSC_VER + #include "libopenmpt.hpp" #include "libopenmpt_settings.hpp" @@ -267,6 +273,10 @@ } std::ostringstream credits; credits << openmpt::string::get( openmpt::string::credits ); + credits << "Additional thanks to:" << std::endl; + credits << std::endl; + credits << "Arseny Kapoulkine for pugixml" << std::endl; + credits << "http://pugixml.org/" << std::endl; MessageBox( win, StringDecode( credits.str(), CP_UTF8 ).c_str(), TEXT(SHORT_TITLE), MB_ICONINFORMATION ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-29 02:02:46
|
Revision: 3329 http://sourceforge.net/p/modplug/code/3329 Author: manxorist Date: 2013-11-29 02:02:31 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Ref] libopenmpt: Move binaries of MSVC project files to bin/ directory. Modified Paths: -------------- trunk/OpenMPT/build/auto/package_openmpt-plugins.cmd trunk/OpenMPT/build/auto/package_openmpt123.cmd trunk/OpenMPT/build/auto/test_openmpt123-64.cmd trunk/OpenMPT/build/auto/test_openmpt123.cmd trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_foobar2000.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj trunk/OpenMPT/openmpt123/openmpt123.vcxproj Removed Paths: ------------- trunk/OpenMPT/libopenmpt/bin/ Modified: trunk/OpenMPT/build/auto/package_openmpt-plugins.cmd =================================================================== --- trunk/OpenMPT/build/auto/package_openmpt-plugins.cmd 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/build/auto/package_openmpt-plugins.cmd 2013-11-29 02:02:31 UTC (rev 3329) @@ -5,7 +5,7 @@ -cd libopenmpt\bin || goto error +cd bin\Win32 || goto error del /f /q openmpt-plugins.tar del /f /q openmpt-plugins-r%GOT_REVISION%.7z "C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 openmpt-plugins-r%GOT_REVISION%.7z in_openmpt.dll xmp-openmpt.dll foo_openmpt.dll libopenmpt_settings.dll || goto error Modified: trunk/OpenMPT/build/auto/package_openmpt123.cmd =================================================================== --- trunk/OpenMPT/build/auto/package_openmpt123.cmd 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/build/auto/package_openmpt123.cmd 2013-11-29 02:02:31 UTC (rev 3329) @@ -5,7 +5,7 @@ -cd openmpt123\bin || goto error +cd bin\Win32 || goto error del /f /q openmpt123.tar del /f /q openmpt123-r%GOT_REVISION%.7z "C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 openmpt123-r%GOT_REVISION%.7z openmpt123.exe || goto error Modified: trunk/OpenMPT/build/auto/test_openmpt123-64.cmd =================================================================== --- trunk/OpenMPT/build/auto/test_openmpt123-64.cmd 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/build/auto/test_openmpt123-64.cmd 2013-11-29 02:02:31 UTC (rev 3329) @@ -5,8 +5,8 @@ -cd libopenmpt || goto error -bin\libopenmpt64-test.exe || goto error +cd bin || goto error +x64\libopenmpt-test.exe || goto error cd .. || goto error Modified: trunk/OpenMPT/build/auto/test_openmpt123.cmd =================================================================== --- trunk/OpenMPT/build/auto/test_openmpt123.cmd 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/build/auto/test_openmpt123.cmd 2013-11-29 02:02:31 UTC (rev 3329) @@ -5,8 +5,8 @@ -cd libopenmpt || goto error -bin\libopenmpt-test.exe || goto error +cd bin || goto error +Win32\libopenmpt-test.exe || goto error cd .. || goto error Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-29 02:02:31 UTC (rev 3329) @@ -138,22 +138,59 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>bin\</OutDir> + <OutDir>..\bin\$(Platform)\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'"> - <OutDir>bin\</OutDir> + <OutDir>..\bin\$(Platform)\</OutDir> <TargetName>$(ProjectName)-test</TargetName> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>bin\</OutDir> - <TargetName>$(ProjectName)64</TargetName> + <OutDir>..\bin\$(Platform)\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'"> - <OutDir>bin\</OutDir> - <TargetName>$(ProjectName)64-test</TargetName> + <OutDir>..\bin\$(Platform)\</OutDir> + <TargetName>$(ProjectName)-test</TargetName> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'"> + <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'"> + <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'"> + <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'"> + <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -259,9 +296,9 @@ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command> </PreBuildEvent> <PostBuildEvent> - <Command>copy /y bin\libopenmpt.dll bin\in_openmpt.dll -copy /y bin\libopenmpt.dll bin\xmp-openmpt.dll -copy /y bin\libopenmpt.dll bin\libmodplug.dll + <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\in_openmpt.dll +copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\xmp-openmpt.dll +copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll </Command> </PostBuildEvent> </ItemDefinitionGroup> @@ -321,7 +358,7 @@ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command> </PreBuildEvent> <PostBuildEvent> - <Command>copy /y bin\libopenmpt64.dll bin\libmodplug64.dll + <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll </Command> </PostBuildEvent> </ItemDefinitionGroup> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_foobar2000.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_foobar2000.vcxproj 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/libopenmpt/libopenmpt_foobar2000.vcxproj 2013-11-29 02:02:31 UTC (rev 3329) @@ -38,10 +38,13 @@ <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetName>foo_openmpt</TargetName> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetName>foo_openmpt</TargetName> - <OutDir>bin\</OutDir> + <OutDir>..\bin\$(Platform)\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj 2013-11-29 02:02:31 UTC (rev 3329) @@ -36,11 +36,12 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <IntDir>$(ProjectName)-$(Configuration)\</IntDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <IntDir>$(ProjectName)-$(Configuration)\</IntDir> - <OutDir>bin\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <OutDir>..\bin\$(Platform)\</OutDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> Modified: trunk/OpenMPT/openmpt123/openmpt123.vcxproj =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.vcxproj 2013-11-29 01:39:10 UTC (rev 3328) +++ trunk/OpenMPT/openmpt123/openmpt123.vcxproj 2013-11-29 02:02:31 UTC (rev 3329) @@ -62,12 +62,25 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <OutDir>bin\</OutDir> + <OutDir>..\bin\$(Platform)\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <OutDir>bin\</OutDir> - <TargetName>$(ProjectName)64</TargetName> + <OutDir>..\bin\$(Platform)\</OutDir> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <OutDir>..\bin\$(Platform)-Debug\</OutDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-29 02:53:22
|
Revision: 3330 http://sourceforge.net/p/modplug/code/3330 Author: manxorist Date: 2013-11-29 02:53:15 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Ref] libopenmpt: Remove NO_WINAMP, NO_XMPLAY and NO_LIBMODPLUG from BuildSettings.h . Modified Paths: -------------- trunk/OpenMPT/README trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/libopenmpt/libopenmpt_internal.h Modified: trunk/OpenMPT/README =================================================================== --- trunk/OpenMPT/README 2013-11-29 02:02:31 UTC (rev 3329) +++ trunk/OpenMPT/README 2013-11-29 02:53:15 UTC (rev 3330) @@ -38,12 +38,12 @@ Winamp/ from WA5.55_SDK.exe to include/winamp/. Please visit http://wiki.winamp.com/wiki/Plug-in_Developer to download the SDK. - Use #define NO_WINAMP in common/BuildSettings.h to disable. + Exclude libopenmpt_winamp.cpp from build to disable. - xmplay SDK: To build libopenmpt with xmplay input plugin support, copy the contents of xmp-sdk.zip into include/xmplay/. Please visit http://www.un4seen.com/xmplay.html to download to SDK. - Use #define NO_XMPLAY in common/BuildSettings.h to disable. + Exclude libopenmpt_xmplay.cpp from build to disable. - The openmpt123 solution is in openmpt123/openmpt123.sln. - Makefile The makefile resides in openmpt123/Makefile. You should cd into openmpt123 Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2013-11-29 02:02:31 UTC (rev 3329) +++ trunk/OpenMPT/common/BuildSettings.h 2013-11-29 02:53:15 UTC (rev 3330) @@ -123,15 +123,6 @@ // Define to build without MP3 import support (via mpg123) //#define NO_MP3_SAMPLES -// Do not build libmodplug emulation layer (only makes sense for library) -#define NO_LIBMODPLUG - -// Do not build xmplay input plugin code (only makes sense for library) -#define NO_XMPLAY - -// Do not build winamp input plugin code (only makes sense for library) -#define NO_WINAMP - // Do not build libopenmpt C api #define NO_LIBOPENMPT_C @@ -168,15 +159,6 @@ #endif //#define NO_MINIZ #define NO_MP3_SAMPLES -#if defined(LIBOPENMPT_BUILD_TEST) -#define NO_LIBMODPLUG -#endif -#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) || defined(LIBOPENMPT_BUILD_TEST) -#define NO_WINAMP -#endif -#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) || defined(LIBOPENMPT_BUILD_TEST) -#define NO_XMPLAY -#endif //#define NO_LIBOPENMPT_C //#define NO_LIBOPENMPT_CXX @@ -216,26 +198,8 @@ #define MODPLUG_NO_FILESAVE // file saving is broken on big endian #endif -#if !defined(NO_LIBMODPLUG) -#if !defined(LIBOPENMPT_BUILD) || (defined(LIBOPENMPT_BUILD) && defined(_WIN32) && !defined(LIBOPENMPT_BUILD_DLL)) -#define NO_LIBMODPLUG // libmodplug interface emulation requires libopenmpt dll build on windows -#endif -#endif -#if !defined(NO_WINAMP) -#if !defined(LIBOPENMPT_BUILD) || (defined(LIBOPENMPT_BUILD) && !defined(LIBOPENMPT_BUILD_DLL)) -#define NO_WINAMP // winamp plugin requires libopenmpt dll build -#endif -#endif -#if !defined(NO_XMPLAY) -#if !defined(LIBOPENMPT_BUILD) || (defined(LIBOPENMPT_BUILD) && !defined(LIBOPENMPT_BUILD_DLL)) -#define NO_XMPLAY // xmplay plugin requires libopenmpt dll build -#endif -#endif - - - #if MPT_COMPILER_MSVC #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif Modified: trunk/OpenMPT/libopenmpt/libopenmpt_internal.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_internal.h 2013-11-29 02:02:31 UTC (rev 3329) +++ trunk/OpenMPT/libopenmpt/libopenmpt_internal.h 2013-11-29 02:53:15 UTC (rev 3330) @@ -25,10 +25,7 @@ #ifdef __cplusplus #if defined(LIBOPENMPT_BUILD_DLL) || defined(LIBOPENMPT_USE_DLL) #if defined(_MSC_VER) && !defined(_DLL) -#if defined(NO_LIBMODPLUG) && defined(NO_WINAMP) && defined(NO_XMPLAY) -/* do not warn if building libmodplug emulation or winamp plugin or xmplay plugin */ -#pragma message( "libopenmpt C++ interface is disabled if libopenmpt is built as a DLL and the runtime is statically linked. This is not supported by microsoft and cannot possibly work. Ever." ) -#endif +/* #pragma message( "libopenmpt C++ interface is disabled if libopenmpt is built as a DLL and the runtime is statically linked. This is not supported by microsoft and cannot possibly work. Ever." ) */ #undef LIBOPENMPT_CXX_API #define LIBOPENMPT_CXX_API LIBOPENMPT_API_HELPER_LOCAL #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-29 16:42:42
|
Revision: 3332 http://sourceforge.net/p/modplug/code/3332 Author: manxorist Date: 2013-11-29 16:42:35 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Ref] libopenmpt: Delete unused file libopenmpt.cpp . Modified Paths: -------------- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/openmpt123/Makefile Removed Paths: ------------- trunk/OpenMPT/libopenmpt/libopenmpt.cpp Deleted: trunk/OpenMPT/libopenmpt/libopenmpt.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.cpp 2013-11-29 16:15:32 UTC (rev 3331) +++ trunk/OpenMPT/libopenmpt/libopenmpt.cpp 2013-11-29 16:42:35 UTC (rev 3332) @@ -1,14 +0,0 @@ -/* - * libopenmpt.cpp - * -------------- - * Purpose: libopenmpt general implementation - * Notes : (currently none) - * Authors: OpenMPT Devs - * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. - */ - -#include "BuildSettings.h" - -#include "libopenmpt_internal.h" -#include "libopenmpt.hpp" -#include "libopenmpt.h" Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-29 16:15:32 UTC (rev 3331) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-29 16:42:35 UTC (rev 3332) @@ -601,7 +601,6 @@ <ClCompile Include="..\soundlib\WindowedFIR.cpp" /> <ClCompile Include="..\soundlib\XMTools.cpp" /> <ClCompile Include="..\test\test.cpp" /> - <ClCompile Include="libopenmpt.cpp" /> <ClCompile Include="libopenmpt_c.cpp" /> <ClCompile Include="libopenmpt_cxx.cpp" /> <ClCompile Include="libopenmpt_impl.cpp" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-11-29 16:15:32 UTC (rev 3331) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-11-29 16:42:35 UTC (rev 3332) @@ -286,9 +286,6 @@ <ClCompile Include="..\common\stdafx.cpp"> <Filter>Source Files\common</Filter> </ClCompile> - <ClCompile Include="libopenmpt.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\soundlib\ITTools.cpp"> <Filter>Source Files\soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/openmpt123/Makefile =================================================================== --- trunk/OpenMPT/openmpt123/Makefile 2013-11-29 16:15:32 UTC (rev 3331) +++ trunk/OpenMPT/openmpt123/Makefile 2013-11-29 16:42:35 UTC (rev 3332) @@ -208,7 +208,6 @@ LIBOPENMPT_CXX_SOURCES += \ $(SOUNDLIB_CXX_SOURCES) \ $(wildcard ../test/*.cpp) \ - ../libopenmpt/libopenmpt.cpp \ ../libopenmpt/libopenmpt_c.cpp \ ../libopenmpt/libopenmpt_cxx.cpp \ ../libopenmpt/libopenmpt_impl.cpp \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-11-29 20:37:26
|
Revision: 3334 http://sourceforge.net/p/modplug/code/3334 Author: saga-games Date: 2013-11-29 20:37:19 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Fix] Sample view: Position marks do no longer flicker when desktop compositing (and thus, Aero) is turned on. [Mod] OpenMPT: Version is now 1.22.07.05 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-11-29 17:19:33 UTC (rev 3333) +++ trunk/OpenMPT/common/versionNumber.h 2013-11-29 20:37:19 UTC (rev 3334) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#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/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2013-11-29 17:19:33 UTC (rev 3333) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2013-11-29 20:37:19 UTC (rev 3334) @@ -130,9 +130,19 @@ MemsetZero(m_NcButtonState); m_bmpEnvBar.Create(IDB_SMPTOOLBAR, 20, 0, RGB(192,192,192)); m_lastDrawPoint.SetPoint(-1, -1); + offScreenDC = nullptr; + offScreenBitmap = nullptr; } +CViewSample::~CViewSample() +//------------------------- +{ + DeleteObject(offScreenBitmap); + DeleteDC(offScreenDC); +} + + void CViewSample::OnInitialUpdate() //--------------------------------- { @@ -906,7 +916,18 @@ } } } - DrawPositionMarks(hdc); + + // Create off-screen image + DeleteObject(offScreenBitmap); + DeleteDC(offScreenDC); + offScreenDC = CreateCompatibleDC(pDC->m_hDC); + offScreenBitmap = CreateCompatibleBitmap(pDC->m_hDC, m_rcClient.Width(), m_rcClient.Height()); + SelectObject(offScreenDC, offScreenBitmap); + BitBlt(offScreenDC, m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), pDC->m_hDC, 0, 0, SRCCOPY); + + DrawPositionMarks(); + BitBlt(hdc, m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), offScreenDC, 0, 0, SRCCOPY); + if (oldpen) ::SelectObject(hdc, oldpen); // -> CODE#0015 @@ -920,21 +941,21 @@ } -void CViewSample::DrawPositionMarks(HDC hdc) -//------------------------------------------ +void CViewSample::DrawPositionMarks() +//----------------------------------- { - CRect rect; if(GetDocument()->GetrSoundFile().GetSample(m_nSample).pSample == nullptr) { return; } - for (UINT i=0; i<MAX_CHANNELS; i++) if (m_dwNotifyPos[i] != Notification::PosInvalid) + CRect rect; + for(CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) if (m_dwNotifyPos[i] != Notification::PosInvalid) { rect.top = -2; rect.left = SampleToScreen(m_dwNotifyPos[i]); rect.right = rect.left + 1; rect.bottom = m_rcClient.bottom + 1; - if ((rect.right >= 0) && (rect.right < m_rcClient.right)) InvertRect(hdc, &rect); + if ((rect.right >= 0) && (rect.right < m_rcClient.right)) InvertRect(offScreenDC, &rect); } } @@ -964,8 +985,7 @@ bool doUpdate = false; for(CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) { - SmpLength newpos = pnotify->pos[i]; - if (m_dwNotifyPos[i] != newpos) + if (m_dwNotifyPos[i] != pnotify->pos[i]) { doUpdate = true; break; @@ -974,12 +994,13 @@ if (doUpdate) { HDC hdc = ::GetDC(m_hWnd); - DrawPositionMarks(hdc); + DrawPositionMarks(); // Erase old marks... for(CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) { m_dwNotifyPos[i] = pnotify->pos[i]; } - DrawPositionMarks(hdc); + DrawPositionMarks(); // ...and draw new ones + BitBlt(hdc, m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), offScreenDC, 0, 0, SRCCOPY); ::ReleaseDC(m_hWnd, hdc); } } @@ -1694,8 +1715,8 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwEndSel > m_dwBeginSel + 15) && (m_dwEndSel <= sample.nLength)) { if ((sample.nLoopStart != m_dwBeginSel) || (sample.nLoopEnd != m_dwEndSel)) @@ -1718,8 +1739,8 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwEndSel > m_dwBeginSel + 15) && (m_dwEndSel <= sample.nLength)) { if ((sample.nSustainStart != m_dwBeginSel) || (sample.nSustainEnd != m_dwEndSel)) @@ -1788,13 +1809,12 @@ //------------------------------ { CModDoc *pModDoc = GetDocument(); - CSoundFile *pSndFile; DWORD dwUpdateFlags = HINT_SAMPLEINFO | HINT_SAMPLEDATA; DWORD len; if (!pModDoc) return; - pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); len = sample.nLength; if ((!sample.pSample) || (!len)) return; if (m_dwEndSel > len) m_dwEndSel = len; @@ -1804,7 +1824,7 @@ if (Reporting::Confirm("Remove this sample?", "Remove Sample", true) != cnfYes) return; pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_replace); - pSndFile->DestroySampleThreadsafe(m_nSample); + sndFile.DestroySampleThreadsafe(m_nSample); dwUpdateFlags |= HINT_SMPNAMES; } else @@ -2423,15 +2443,15 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwMenuParam+4 <= sample.nLoopEnd) && (sample.nLoopStart != m_dwMenuParam)) { pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none); sample.nLoopStart = m_dwMenuParam; sample.uFlags |= CHN_LOOP; pModDoc->SetModified(); - ctrlSmp::UpdateLoopPoints(sample, *pSndFile); + ctrlSmp::UpdateLoopPoints(sample, sndFile); pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL); } } @@ -2444,15 +2464,15 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwMenuParam >= sample.nLoopStart+4) && (sample.nLoopEnd != m_dwMenuParam)) { pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none); sample.nLoopEnd = m_dwMenuParam; sample.uFlags |= CHN_LOOP; pModDoc->SetModified(); - ctrlSmp::UpdateLoopPoints(sample, *pSndFile); + ctrlSmp::UpdateLoopPoints(sample, sndFile); pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL); } } @@ -2465,15 +2485,15 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwMenuParam+4 <= sample.nSustainEnd) && (sample.nSustainStart != m_dwMenuParam)) { pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none); sample.nSustainStart = m_dwMenuParam; sample.uFlags |= CHN_SUSTAINLOOP; pModDoc->SetModified(); - ctrlSmp::UpdateLoopPoints(sample, *pSndFile); + ctrlSmp::UpdateLoopPoints(sample, sndFile); pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL); } } @@ -2486,15 +2506,15 @@ CModDoc *pModDoc = GetDocument(); if (pModDoc) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - ModSample &sample = pSndFile->GetSample(m_nSample); + CSoundFile &sndFile = pModDoc->GetrSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); if ((m_dwMenuParam >= sample.nSustainStart+4) && (sample.nSustainEnd != m_dwMenuParam)) { pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none); sample.nSustainEnd = m_dwMenuParam; sample.uFlags |= CHN_SUSTAINLOOP; pModDoc->SetModified(); - ctrlSmp::UpdateLoopPoints(sample, *pSndFile); + ctrlSmp::UpdateLoopPoints(sample, sndFile); pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL); } } Modified: trunk/OpenMPT/mptrack/View_smp.h =================================================================== --- trunk/OpenMPT/mptrack/View_smp.h 2013-11-29 17:19:33 UTC (rev 3333) +++ trunk/OpenMPT/mptrack/View_smp.h 2013-11-29 20:37:19 UTC (rev 3334) @@ -26,6 +26,8 @@ protected: CImageList m_bmpEnvBar; CRect m_rcClient; + HDC offScreenDC; + HGDIOBJ offScreenBitmap; SIZE m_sizeTotal; SAMPLEINDEX m_nSample; UINT m_nZoom, m_nScrollPos, m_nScrollFactor, m_nBtnMouseOver; @@ -42,6 +44,7 @@ public: CViewSample(); + ~CViewSample(); DECLARE_SERIAL(CViewSample) protected: @@ -55,7 +58,7 @@ void InvalidateSample(); void SetCurSel(SmpLength nBegin, SmpLength nEnd); void ScrollToPosition(int x); - void DrawPositionMarks(HDC hdc); + void DrawPositionMarks(); void DrawSampleData1(HDC hdc, int ymed, int cx, int cy, int len, int uFlags, PVOID pSampleData); void DrawSampleData2(HDC hdc, int ymed, int cx, int cy, int len, int uFlags, PVOID pSampleData); void DrawNcButton(CDC *pDC, UINT nBtn); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-11-29 22:33:37
|
Revision: 3336 http://sourceforge.net/p/modplug/code/3336 Author: manxorist Date: 2013-11-29 22:33:28 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Mod] sounddev: WASAPI devices might change names if a different connector jack is used. In order to avoid defaulting to wave mapper in that case, just find the first WASAPI device. Modified Paths: -------------- trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.h trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -572,7 +572,7 @@ SoundDeviceID TrackerSettings::GetSoundDeviceID() const //----------------------------------------------------- { - return theApp.GetSoundDevicesManager()->FindDeviceInfo(m_SoundDeviceIdentifier).id; + return theApp.GetSoundDevicesManager()->FindDeviceInfoBestMatch(m_SoundDeviceIdentifier).id; } void TrackerSettings::SetSoundDeviceID(const SoundDeviceID &id) Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -26,7 +26,24 @@ #include <iterator> +std::wstring SoundDeviceTypeToString(SoundDeviceType type) +//-------------------------------------------------------- +{ + switch(type) + { + case SNDDEV_WAVEOUT: return L"WaveOut"; break; + case SNDDEV_DSOUND: return L"DirectSound"; break; + case SNDDEV_ASIO: return L"ASIO"; break; + case SNDDEV_PORTAUDIO_WASAPI: return L"WASAPI"; break; + case SNDDEV_PORTAUDIO_WDMKS: return L"WDM-KS"; break; + case SNDDEV_PORTAUDIO_WMME: return L"MME"; break; + case SNDDEV_PORTAUDIO_DS: return L"DS"; break; + case SNDDEV_PORTAUDIO_ASIO: return L"ASIO"; break; + } + return std::wstring(); +} + SoundChannelMapping::SoundChannelMapping() //---------------------------------------- { @@ -900,6 +917,72 @@ } +static SoundDeviceType ParseType(const std::wstring &identifier) +//-------------------------------------------------------------- +{ + for(int i = 0; i < SNDDEV_NUM_DEVTYPES; ++i) + { + const std::wstring api = SoundDeviceTypeToString(static_cast<SoundDeviceType>(i)); + if(identifier.find(api) == 0) + { + return static_cast<SoundDeviceType>(i); + } + } + return SNDDEV_INVALID; +} + + +SoundDeviceInfo SoundDevicesManager::FindDeviceInfoBestMatch(const std::wstring &identifier) const +//------------------------------------------------------------------------------------------------ +{ + if(m_SoundDevices.empty()) + { + return SoundDeviceInfo(); + } + if(identifier.empty()) + { + return m_SoundDevices[0]; + } + for(std::vector<SoundDeviceInfo>::const_iterator it = begin(); it != end(); ++it) + { + if(it->GetIdentifier() == identifier) + { // exact match + return *it; + } + } + const SoundDeviceType type = ParseType(identifier); + switch(type) + { + case SNDDEV_PORTAUDIO_WASAPI: + // WASAPI devices might change names if a different connector jack is used. + // In order to avoid defaulting to wave mapper in that case, + // just find the first WASAPI device. + for(std::vector<SoundDeviceInfo>::const_iterator it = begin(); it != end(); ++it) + { + if(it->id.GetType() == SNDDEV_PORTAUDIO_WASAPI) + { + return *it; + } + } + // default to first device + return *begin(); + break; + case SNDDEV_WAVEOUT: + case SNDDEV_DSOUND: + case SNDDEV_PORTAUDIO_WMME: + case SNDDEV_PORTAUDIO_DS: + case SNDDEV_ASIO: + case SNDDEV_PORTAUDIO_WDMKS: + case SNDDEV_PORTAUDIO_ASIO: + // default to first device + return *begin(); + break; + } + // invalid + return SoundDeviceInfo(); +} + + bool SoundDevicesManager::OpenDriverSettings(SoundDeviceID id, ISoundMessageReceiver *messageReceiver, ISoundDevice *currentSoundDevice) //-------------------------------------------------------------------------------------------------------------------------------------- { Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-11-29 22:33:28 UTC (rev 3336) @@ -98,6 +98,8 @@ SNDDEV_NUM_DEVTYPES }; +std::wstring SoundDeviceTypeToString(SoundDeviceType type); + typedef uint8 SoundDeviceIndex; template<typename T> @@ -518,6 +520,7 @@ SoundDeviceInfo FindDeviceInfo(SoundDeviceID id) const; SoundDeviceInfo FindDeviceInfo(const std::wstring &identifier) const; + SoundDeviceInfo FindDeviceInfoBestMatch(const std::wstring &identifier) const; bool OpenDriverSettings(SoundDeviceID id, ISoundMessageReceiver *messageReceiver = nullptr, ISoundDevice *currentSoundDevice = nullptr); Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -152,7 +152,7 @@ if(SoundDeviceIndexIsValid(devices.size())) { // everything ok - devices.push_back(SoundDeviceInfo(SoundDeviceID(SNDDEV_ASIO, static_cast<SoundDeviceIndex>(devices.size())), description, L"ASIO", internalID)); + devices.push_back(SoundDeviceInfo(SoundDeviceID(SNDDEV_ASIO, static_cast<SoundDeviceIndex>(devices.size())), description, SoundDeviceTypeToString(SNDDEV_ASIO), internalID)); } } } Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -73,7 +73,7 @@ SoundDeviceInfo info; info.id = SoundDeviceID(SNDDEV_DSOUND, static_cast<SoundDeviceIndex>(devices.size())); info.name = lpstrDescription; - info.apiName = L"DirectSound"; + info.apiName = SoundDeviceTypeToString(SNDDEV_DSOUND); if(lpGuid) { info.internalID = GuidToString(*lpGuid); Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -353,15 +353,15 @@ } -std::string CPortaudioDevice::HostApiToString(PaHostApiIndex hostapi) -//------------------------------------------------------------------- +std::wstring CPortaudioDevice::HostApiToString(PaHostApiIndex hostapi) +//-------------------------------------------------------------------- { - if(hostapi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI)) return "WASAPI"; - if(hostapi == Pa_HostApiTypeIdToHostApiIndex(paWDMKS)) return "WDM-KS"; - if(hostapi == Pa_HostApiTypeIdToHostApiIndex(paMME)) return "MME"; - if(hostapi == Pa_HostApiTypeIdToHostApiIndex(paDirectSound)) return "DS"; - if(hostapi == Pa_HostApiTypeIdToHostApiIndex(paASIO)) return "ASIO"; - return "PortAudio"; + SoundDeviceType type = HostApiToSndDevType(hostapi); + if(type == SNDDEV_INVALID) + { + return L"PortAudio"; + } + return SoundDeviceTypeToString(type); } @@ -376,7 +376,7 @@ return false; result.id = SoundDeviceID(HostApiToSndDevType(hostapi), index); result.name = mpt::ToWide(mpt::CharsetUTF8, Pa_GetDeviceInfo(dev)->name); - result.apiName = mpt::ToWide(mpt::CharsetUTF8, HostApiToString(Pa_GetDeviceInfo(dev)->hostApi)); + result.apiName = HostApiToString(Pa_GetDeviceInfo(dev)->hostApi); result.isDefault = (Pa_GetHostApiInfo(Pa_GetDeviceInfo(dev)->hostApi)->defaultOutputDevice == (PaDeviceIndex)dev); return true; } Modified: trunk/OpenMPT/sounddev/SoundDevicePortAudio.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDevicePortAudio.h 2013-11-29 22:33:28 UTC (rev 3336) @@ -72,7 +72,7 @@ void *userData ); - static std::string HostApiToString(PaHostApiIndex hostapi); + static std::wstring HostApiToString(PaHostApiIndex hostapi); static PaDeviceIndex HostApiOutputIndexToGlobalDeviceIndex(int hostapioutputdeviceindex, PaHostApiIndex hostapi); static SoundDeviceType HostApiToSndDevType(PaHostApiIndex hostapi); Modified: trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-29 21:39:12 UTC (rev 3335) +++ trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp 2013-11-29 22:33:28 UTC (rev 3336) @@ -243,7 +243,7 @@ } SoundDeviceInfo info; info.id = SoundDeviceID(SNDDEV_WAVEOUT, static_cast<SoundDeviceIndex>(index)); - info.apiName = L"WaveOut"; + info.apiName = SoundDeviceTypeToString(SNDDEV_WAVEOUT); WAVEOUTCAPSW woc; MemsetZero(woc); if(index == 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-11-29 22:45:50
|
Revision: 3337 http://sourceforge.net/p/modplug/code/3337 Author: saga-games Date: 2013-11-29 22:45:42 +0000 (Fri, 29 Nov 2013) Log Message: ----------- [Imp] Sample view: Don't recreate off-screen DC on every complete sample redraw. [Ref] Use FlagSet in sample editor. Modified Paths: -------------- trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h Modified: trunk/OpenMPT/common/FlagSet.h =================================================================== --- trunk/OpenMPT/common/FlagSet.h 2013-11-29 22:33:28 UTC (rev 3336) +++ trunk/OpenMPT/common/FlagSet.h 2013-11-29 22:45:42 UTC (rev 3337) @@ -61,14 +61,14 @@ // Set one or more flags. FlagSet &set(enum_t flag) { - flags = (flags | static_cast<store_t>(flag)); + flags = static_cast<store_t>(flags | flag); return *this; } // Set or clear one or more flags. FlagSet &set(enum_t flag, bool val) { - flags = (val ? (flags | static_cast<store_t>(flag)) : (flags & ~static_cast<store_t>(flag))); + flags = static_cast<store_t>(val ? (flags | flag) : (flags & ~flag)); return *this; } @@ -82,7 +82,7 @@ // Clear one or more flags. FlagSet &reset(enum_t flag) { - flags &= ~static_cast<store_t>(flag); + flags = static_cast<store_t>(flags & ~flag); return *this; } @@ -96,7 +96,7 @@ // Toggle one or more flags. FlagSet &flip(enum_t flag) { - flags ^= static_cast<store_t>(flag); + flags = static_cast<store_t>(flags ^ flag); return *this; } Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2013-11-29 22:33:28 UTC (rev 3336) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2013-11-29 22:45:42 UTC (rev 3337) @@ -120,7 +120,6 @@ m_nSample = 1; m_nZoom = 0; m_nScrollPos = 0; - m_dwStatus = 0; m_nScrollFactor = 0; m_nBtnMouseOver = 0xFFFF; for(CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) @@ -147,7 +146,7 @@ //--------------------------------- { m_dwBeginSel = m_dwEndSel = 0; - m_bDrawingEnabled = false; // sample drawing + m_dwStatus.reset(SMPSTATUS_DRAWING); ModifyStyleEx(0, WS_EX_ACCEPTFILES); CModScrollView::OnInitialUpdate(); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); @@ -238,7 +237,7 @@ pModDoc->SetFollowWnd(m_hWnd); if (nSmp == m_nSample) return FALSE; m_dwBeginSel = m_dwEndSel = 0; - m_bDrawingEnabled = false; // sample drawing + m_dwStatus.reset(SMPSTATUS_DRAWING); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); if (pMainFrm) pMainFrm->SetInfoText(""); m_nSample = nSmp; @@ -351,37 +350,35 @@ } -LONG CViewSample::SampleToScreen(LONG n) const -//-------------------------------------------- +int32 CViewSample::SampleToScreen(SmpLength pos) const +//---------------------------------------------------- { CModDoc *pModDoc = GetDocument(); if ((pModDoc) && (m_nSample <= pModDoc->GetNumSamples())) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - SmpLength nLen = pSndFile->GetSample(m_nSample).nLength; + SmpLength nLen = pModDoc->GetrSoundFile().GetSample(m_nSample).nLength; if (!nLen) return 0; if (m_nZoom) { - return (n >> ((LONG)m_nZoom-1)) - m_nScrollPos; + return (pos >> ((int32)m_nZoom - 1)) - m_nScrollPos; } else { - return Util::muldiv(n, m_sizeTotal.cx, nLen); + return Util::muldiv(pos, m_sizeTotal.cx, nLen); } } return 0; } -DWORD CViewSample::ScreenToSample(LONG x) const -//--------------------------------------------- +SmpLength CViewSample::ScreenToSample(int32 x) const +//-------------------------------------------------- { CModDoc *pModDoc = GetDocument(); - LONG n = 0; + SmpLength n = 0; if ((pModDoc) && (m_nSample <= pModDoc->GetNumSamples())) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - SmpLength nLen = pSndFile->GetSample(m_nSample).nLength; + SmpLength nLen = pModDoc->GetrSoundFile().GetSample(m_nSample).nLength; if (!nLen) return 0; if (m_nZoom) { @@ -392,7 +389,7 @@ if (m_sizeTotal.cx) n = Util::muldiv(x, nLen, m_sizeTotal.cx); } if (n < 0) n = 0; - if (n > (LONG)nLen) n = nLen; + LimitMax(n, nLen); } return n; } @@ -467,7 +464,7 @@ // sample drawing if(dwHintMask & HINT_SAMPLEINFO) { - m_bDrawingEnabled = false; + m_dwStatus.reset(SMPSTATUS_DRAWING); UpdateNcButtonState(); } } @@ -793,21 +790,21 @@ CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; HGDIOBJ oldpen; - HDC hdc; UINT nSmpScrollPos = ScrollPosToSamplePos(); if ((!pModDoc) || (!pDC)) return; // Create off-screen image - DeleteObject(offScreenBitmap); - DeleteDC(offScreenDC); - offScreenDC = CreateCompatibleDC(pDC->m_hDC); - offScreenBitmap = CreateCompatibleBitmap(pDC->m_hDC, m_rcClient.Width(), m_rcClient.Height()); - SelectObject(offScreenDC, offScreenBitmap); + if(offScreenDC == nullptr) + { + offScreenDC = CreateCompatibleDC(pDC->m_hDC); + offScreenBitmap = CreateCompatibleBitmap(pDC->m_hDC, m_rcClient.Width(), m_rcClient.Height()); + SelectObject(offScreenDC, offScreenBitmap); + } - hdc = offScreenDC; - oldpen = ::SelectObject(hdc, CMainFrame::penBlack); + offScreenDC = offScreenDC; + oldpen = ::SelectObject(offScreenDC, CMainFrame::penBlack); pSndFile = pModDoc->GetSoundFile(); rect = rcClient; if ((rcClient.bottom > rcClient.top) && (rcClient.right > rcClient.left)) @@ -824,32 +821,32 @@ { rc.right = SampleToScreen(m_dwBeginSel); if (rc.right > rcClient.right) rc.right = rcClient.right; - if (rc.right > rc.left) ::FillRect(hdc, &rc, CMainFrame::brushBlack); + if (rc.right > rc.left) ::FillRect(offScreenDC, &rc, CMainFrame::brushBlack); rc.left = rc.right; } if (rc.left < 0) rc.left = 0; rc.right = SampleToScreen(m_dwEndSel) + 1; if (rc.right > rcClient.right) rc.right = rcClient.right; - if (rc.right > rc.left) ::FillRect(hdc, &rc, CMainFrame::brushWhite); + if (rc.right > rc.left) ::FillRect(offScreenDC, &rc, CMainFrame::brushWhite); rc.left = rc.right; if (rc.left < 0) rc.left = 0; rc.right = rcClient.right; - if (rc.right > rc.left) ::FillRect(hdc, &rc, CMainFrame::brushBlack); + if (rc.right > rc.left) ::FillRect(offScreenDC, &rc, CMainFrame::brushBlack); } else { - ::FillRect(hdc, &rcClient, CMainFrame::brushBlack); + ::FillRect(offScreenDC, &rcClient, CMainFrame::brushBlack); } - ::SelectObject(hdc, CMainFrame::penDarkGray); + ::SelectObject(offScreenDC, CMainFrame::penDarkGray); if (sample.uFlags & CHN_STEREO) { - ::MoveToEx(hdc, 0, ymed-yrange/2, NULL); - ::LineTo(hdc, rcClient.right, ymed-yrange/2); - ::MoveToEx(hdc, 0, ymed+yrange/2, NULL); - ::LineTo(hdc, rcClient.right, ymed+yrange/2); + ::MoveToEx(offScreenDC, 0, ymed-yrange/2, NULL); + ::LineTo(offScreenDC, rcClient.right, ymed-yrange/2); + ::MoveToEx(offScreenDC, 0, ymed+yrange/2, NULL); + ::LineTo(offScreenDC, rcClient.right, ymed+yrange/2); } else { - ::MoveToEx(hdc, 0, ymed, NULL); - ::LineTo(hdc, rcClient.right, ymed); + ::MoveToEx(offScreenDC, 0, ymed, NULL); + ::LineTo(offScreenDC, rcClient.right, ymed); } // Drawing sample if ((sample.pSample) && (yrange) && (sample.nLength > 1) && (rect.right > 1)) @@ -860,35 +857,35 @@ int xl = SampleToScreen(sample.nLoopStart); if ((xl >= 0) && (xl < rcClient.right)) { - ::MoveToEx(hdc, xl, rect.top, NULL); - ::LineTo(hdc, xl, rect.bottom); + ::MoveToEx(offScreenDC, xl, rect.top, NULL); + ::LineTo(offScreenDC, xl, rect.bottom); } xl = SampleToScreen(sample.nLoopEnd); if ((xl >= 0) && (xl < rcClient.right)) { - ::MoveToEx(hdc, xl, rect.top, NULL); - ::LineTo(hdc, xl, rect.bottom); + ::MoveToEx(offScreenDC, xl, rect.top, NULL); + ::LineTo(offScreenDC, xl, rect.bottom); } } // Sustain Loop Start/End if ((sample.nSustainEnd > nSmpScrollPos) && (sample.nSustainEnd > sample.nSustainStart)) { - ::SelectObject(hdc, CMainFrame::penHalfDarkGray); + ::SelectObject(offScreenDC, CMainFrame::penHalfDarkGray); int xl = SampleToScreen(sample.nSustainStart); if ((xl >= 0) && (xl < rcClient.right)) { - ::MoveToEx(hdc, xl, rect.top, NULL); - ::LineTo(hdc, xl, rect.bottom); + ::MoveToEx(offScreenDC, xl, rect.top, NULL); + ::LineTo(offScreenDC, xl, rect.bottom); } xl = SampleToScreen(sample.nSustainEnd); if ((xl >= 0) && (xl < rcClient.right)) { - ::MoveToEx(hdc, xl, rect.top, NULL); - ::LineTo(hdc, xl, rect.bottom); + ::MoveToEx(offScreenDC, xl, rect.top, NULL); + ::LineTo(offScreenDC, xl, rect.bottom); } } // Drawing Sample Data - ::SelectObject(hdc, CMainFrame::penSample); + ::SelectObject(offScreenDC, CMainFrame::penSample); int smplsize = sample.GetBytesPerSample(); if ((m_nZoom == 1) || ((!m_nZoom) && (sample.nLength <= (UINT)rect.right))) { @@ -896,11 +893,11 @@ signed char *psample = ((signed char *)sample.pSample) + nSmpScrollPos * smplsize; if (sample.uFlags[CHN_STEREO]) { - DrawSampleData1(hdc, ymed-yrange/2, rect.right, yrange, len, sample.uFlags, psample); - DrawSampleData1(hdc, ymed+yrange/2, rect.right, yrange, len, sample.uFlags, psample+smplsize/2); + DrawSampleData1(offScreenDC, ymed-yrange/2, rect.right, yrange, len, sample.uFlags, psample); + DrawSampleData1(offScreenDC, ymed+yrange/2, rect.right, yrange, len, sample.uFlags, psample+smplsize/2); } else { - DrawSampleData1(hdc, ymed, rect.right, yrange*2, len, sample.uFlags, psample); + DrawSampleData1(offScreenDC, ymed, rect.right, yrange*2, len, sample.uFlags, psample); } } else { @@ -914,11 +911,11 @@ signed char *psample = ((signed char *)sample.pSample) + xscroll * smplsize; if (sample.uFlags[CHN_STEREO]) { - DrawSampleData2(hdc, ymed-yrange/2, rect.right, yrange, len, sample.uFlags, psample); - DrawSampleData2(hdc, ymed+yrange/2, rect.right, yrange, len, sample.uFlags, psample+smplsize/2); + DrawSampleData2(offScreenDC, ymed-yrange/2, rect.right, yrange, len, sample.uFlags, psample); + DrawSampleData2(offScreenDC, ymed+yrange/2, rect.right, yrange, len, sample.uFlags, psample+smplsize/2); } else { - DrawSampleData2(hdc, ymed, rect.right, yrange*2, len, sample.uFlags, psample); + DrawSampleData2(offScreenDC, ymed, rect.right, yrange*2, len, sample.uFlags, psample); } } } @@ -927,7 +924,7 @@ DrawPositionMarks(); BitBlt(pDC->m_hDC, m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), offScreenDC, 0, 0, SRCCOPY); - if (oldpen) ::SelectObject(hdc, oldpen); + if (oldpen) ::SelectObject(offScreenDC, oldpen); // -> CODE#0015 // -> DESC="channels management dlg" @@ -1154,13 +1151,13 @@ if (m_nBtnMouseOver == i) { dwStyle |= NCBTNS_MOUSEOVER; - if (m_dwStatus & SMPSTATUS_NCLBTNDOWN) dwStyle |= NCBTNS_PUSHED; + if(m_dwStatus[SMPSTATUS_NCLBTNDOWN]) dwStyle |= NCBTNS_PUSHED; } switch(cLeftBarButtons[i]) { case ID_SAMPLE_DRAW: - if(m_bDrawingEnabled) dwStyle |= NCBTNS_CHECKED; + if(m_dwStatus[SMPSTATUS_DRAWING]) dwStyle |= NCBTNS_CHECKED; if(m_nSample > pSndFile->GetNumSamples() || pSndFile->GetSample(m_nSample).GetNumChannels() > 1 || pSndFile->GetSample(m_nSample).pSample == nullptr) @@ -1188,6 +1185,12 @@ //-------------------------------------------------- { CScrollView::OnSize(nType, cx, cy); + + DeleteObject(offScreenBitmap); + DeleteDC(offScreenDC); + offScreenBitmap = nullptr; + offScreenDC = nullptr; + if (((nType == SIZE_RESTORED) || (nType == SIZE_MAXIMIZED)) && (cx > 0) && (cy > 0)) { UpdateScrollSize(); @@ -1313,9 +1316,9 @@ CHAR s[64]; CModDoc *pModDoc = GetDocument(); - if ((m_nBtnMouseOver < SMP_LEFTBAR_BUTTONS) || (m_dwStatus & SMPSTATUS_NCLBTNDOWN)) + if(m_nBtnMouseOver < SMP_LEFTBAR_BUTTONS || m_dwStatus[SMPSTATUS_NCLBTNDOWN]) { - m_dwStatus &= ~SMPSTATUS_NCLBTNDOWN; + m_dwStatus.reset(SMPSTATUS_NCLBTNDOWN); m_nBtnMouseOver = 0xFFFF; UpdateNcButtonState(); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); @@ -1325,7 +1328,7 @@ CSoundFile &sndFile = pModDoc->GetrSoundFile(); if (m_rcClient.PtInRect(point)) { - const DWORD x = ScreenToSample(point.x); + const SmpLength x = ScreenToSample(point.x); wsprintf(s, "Cursor: %u", x); UpdateIndicator(s); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); @@ -1356,7 +1359,7 @@ } } } else UpdateIndicator(NULL); - if (m_dwStatus & SMPSTATUS_MOUSEDRAG) + if(m_dwStatus[SMPSTATUS_MOUSEDRAG]) { BOOL bAgain = FALSE; const DWORD len = sndFile.GetSample(m_nSample).nLength; @@ -1390,7 +1393,7 @@ } } m_dwEndDrag = ScreenToSample(point.x); - if(m_bDrawingEnabled) + if(m_dwStatus[SMPSTATUS_DRAWING]) { if(m_dwEndDrag < len) { @@ -1432,7 +1435,7 @@ CSoundFile *pSndFile; DWORD len; - if ((m_dwStatus & SMPSTATUS_MOUSEDRAG) || (!pModDoc)) return; + if(m_dwStatus[SMPSTATUS_MOUSEDRAG] || (!pModDoc)) return; pSndFile = pModDoc->GetSoundFile(); ModSample &sample = pSndFile->GetSample(m_nSample); @@ -1440,13 +1443,13 @@ if (!len) return; - m_dwStatus |= SMPSTATUS_MOUSEDRAG; + m_dwStatus.set(SMPSTATUS_MOUSEDRAG); SetFocus(); SetCapture(); bool oldsel = (m_dwBeginSel != m_dwEndSel); // shift + click = update selection - if(!m_bDrawingEnabled && CMainFrame::GetInputHandler()->ShiftPressed()) + if(!m_dwStatus[SMPSTATUS_DRAWING] && CMainFrame::GetInputHandler()->ShiftPressed()) { oldsel = true; m_dwEndDrag = ScreenToSample(point.x); @@ -1459,7 +1462,7 @@ } if (oldsel) SetCurSel(m_dwBeginDrag, m_dwEndDrag); // set initial point for sample drawing - if (m_bDrawingEnabled) + if (m_dwStatus[SMPSTATUS_DRAWING]) { m_lastDrawPoint = point; pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_replace); @@ -1482,9 +1485,9 @@ void CViewSample::OnLButtonUp(UINT, CPoint) //----------------------------------------- { - if (m_dwStatus & SMPSTATUS_MOUSEDRAG) + if(m_dwStatus[SMPSTATUS_MOUSEDRAG]) { - m_dwStatus &= ~SMPSTATUS_MOUSEDRAG; + m_dwStatus.reset(SMPSTATUS_MOUSEDRAG); ReleaseCapture(); } m_lastDrawPoint.SetPoint(-1, -1); @@ -1500,7 +1503,7 @@ { CSoundFile *pSndFile = pModDoc->GetSoundFile(); DWORD len = pSndFile->GetSample(m_nSample).nLength; - if (len && !m_bDrawingEnabled) SetCurSel(0, len); + if (len && !m_dwStatus[SMPSTATUS_DRAWING]) SetCurSel(0, len); } } @@ -1528,7 +1531,7 @@ } else { CHAR s[256]; - DWORD dwPos = ScreenToSample(pt.x); + SmpLength dwPos = ScreenToSample(pt.x); if (dwPos <= sample.nLength) { //Set loop points @@ -1646,7 +1649,7 @@ { if (m_nBtnMouseOver < SMP_LEFTBAR_BUTTONS) { - m_dwStatus |= SMPSTATUS_NCLBTNDOWN; + m_dwStatus.set(SMPSTATUS_NCLBTNDOWN); if (cLeftBarButtons[m_nBtnMouseOver] != ID_SEPARATOR) { PostMessage(WM_COMMAND, cLeftBarButtons[m_nBtnMouseOver]); @@ -1660,9 +1663,9 @@ void CViewSample::OnNcLButtonUp(UINT uFlags, CPoint point) //-------------------------------------------------------- { - if (m_dwStatus & SMPSTATUS_NCLBTNDOWN) + if(m_dwStatus[SMPSTATUS_NCLBTNDOWN]) { - m_dwStatus &= ~SMPSTATUS_NCLBTNDOWN; + m_dwStatus.reset(SMPSTATUS_NCLBTNDOWN); UpdateNcButtonState(); } CModScrollView::OnNcLButtonUp(uFlags, point); @@ -2216,7 +2219,7 @@ pModDoc->NoteOff(0, (note == NOTE_NOTECUT)); } else if(ModCommand::IsNote((ModCommand::NOTE)note)) { - if (m_dwStatus & SMPSTATUS_KEYDOWN) + if(m_dwStatus[SMPSTATUS_KEYDOWN]) pModDoc->NoteOff(note, true); else pModDoc->NoteOff(0, true); @@ -2227,7 +2230,7 @@ pModDoc->PlayNote(note, 0, m_nSample, false, -1, loopstart, loopend, CHANNELINDEX_INVALID, nStartPos); - m_dwStatus |= SMPSTATUS_KEYDOWN; + m_dwStatus.set(SMPSTATUS_KEYDOWN); CSoundFile &sndFile = pModDoc->GetrSoundFile(); ModSample &sample = sndFile.GetSample(m_nSample); @@ -2538,7 +2541,7 @@ void CViewSample::OnDrawingToggle() //--------------------------------- { - m_bDrawingEnabled = !m_bDrawingEnabled; + m_dwStatus.flip(SMPSTATUS_DRAWING); UpdateNcButtonState(); } @@ -2747,7 +2750,7 @@ } if (wParam >= kcSampStartNoteStops && wParam <= kcSampEndNoteStops) { - m_dwStatus &= ~SMPSTATUS_KEYDOWN; + m_dwStatus.reset(SMPSTATUS_KEYDOWN); return wParam; } Modified: trunk/OpenMPT/mptrack/View_smp.h =================================================================== --- trunk/OpenMPT/mptrack/View_smp.h 2013-11-29 22:33:28 UTC (rev 3336) +++ trunk/OpenMPT/mptrack/View_smp.h 2013-11-29 22:45:42 UTC (rev 3337) @@ -11,35 +11,42 @@ #pragma once -#define SMPSTATUS_MOUSEDRAG 0x01 -#define SMPSTATUS_KEYDOWN 0x02 -#define SMPSTATUS_NCLBTNDOWN 0x04 +#define SMP_LEFTBAR_BUTTONS 9 -#define SMP_LEFTBAR_BUTTONS 8 - #include "modsmp_ctrl.h" //====================================== class CViewSample: public CModScrollView //====================================== { +public: + enum Flags + { + SMPSTATUS_MOUSEDRAG = 0x01, + SMPSTATUS_KEYDOWN = 0x02, + SMPSTATUS_NCLBTNDOWN = 0x04, + SMPSTATUS_DRAWING = 0x08, + }; + protected: CImageList m_bmpEnvBar; CRect m_rcClient; HDC offScreenDC; HGDIOBJ offScreenBitmap; SIZE m_sizeTotal; - SAMPLEINDEX m_nSample; UINT m_nZoom, m_nScrollPos, m_nScrollFactor, m_nBtnMouseOver; - DWORD m_dwStatus; + FlagSet<Flags> m_dwStatus; SmpLength m_dwBeginSel, m_dwEndSel, m_dwBeginDrag, m_dwEndDrag; DWORD m_dwMenuParam; - DWORD m_NcButtonState[SMP_LEFTBAR_BUTTONS]; int m_nGridSegments; + SAMPLEINDEX m_nSample; - CPoint m_lastDrawPoint; // for drawing horizontal lines - bool m_bDrawingEnabled; // sample drawing mode enabled? + std::vector<CHANNELINDEX> noteChannel; // Note -> Preview channel assignment + // Sample drawing + CPoint m_lastDrawPoint; // For drawing horizontal lines + + DWORD m_NcButtonState[SMP_LEFTBAR_BUTTONS]; SmpLength m_dwNotifyPos[MAX_CHANNELS]; public: @@ -52,8 +59,8 @@ void UpdateScrollSize(const UINT nZoomOld); BOOL SetCurrentSample(SAMPLEINDEX nSmp); BOOL SetZoom(UINT nZoom); - LONG SampleToScreen(LONG n) const; - DWORD ScreenToSample(LONG x) const; + int32 SampleToScreen(SmpLength pos) const; + SmpLength ScreenToSample(int32 x) const; void PlayNote(UINT note, const uint32 nStartPos = 0); //rewbs.customKeys void InvalidateSample(); void SetCurSel(SmpLength nBegin, SmpLength nEnd); @@ -162,3 +169,5 @@ //}}AFX_MSG DECLARE_MESSAGE_MAP() }; + +DECLARE_FLAGSET(CViewSample::Flags) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-11-30 18:13:56
|
Revision: 3340 http://sourceforge.net/p/modplug/code/3340 Author: saga-games Date: 2013-11-30 18:13:47 +0000 (Sat, 30 Nov 2013) Log Message: ----------- [Mod] New high-resolution application icon by Nobuyuki Modified Paths: -------------- trunk/OpenMPT/common/version.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/res/MPTRACK.ICO Removed Paths: ------------- trunk/OpenMPT/mptrack/res/MODDOC.ICO trunk/OpenMPT/mptrack/res/MPPDOC.ICO Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-11-30 16:38:30 UTC (rev 3339) +++ trunk/OpenMPT/common/version.cpp 2013-11-30 18:13:47 UTC (rev 3340) @@ -316,6 +316,8 @@ #ifdef MODPLUG_TRACKER "Pel K. Txnder for the scrolling credits control :)\n" "http://tinyurl.com/4yze8\n" + "Nobuyuki for application and file icon\n" + "http://twitter.com/nobuyukinyuu\n" #endif "\n" "The people at ModPlug forums for crucial contribution\n" Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-11-30 16:38:30 UTC (rev 3339) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-11-30 18:13:47 UTC (rev 3340) @@ -809,7 +809,7 @@ // Register document templates m_pModTemplate = new CModDocTemplate( - IDR_MODULETYPE, + IDR_MAINFRAME, RUNTIME_CLASS(CModDoc), RUNTIME_CLASS(CChildFrame), // custom MDI child frame RUNTIME_CLASS(CModControlView)); Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2013-11-30 16:38:30 UTC (rev 3339) +++ trunk/OpenMPT/mptrack/mptrack.rc 2013-11-30 18:13:47 UTC (rev 3340) @@ -1907,7 +1907,6 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON "res\\mptrack.ico" -IDR_MODULETYPE ICON "res\\moddoc.ico" ///////////////////////////////////////////////////////////////////////////// // Deleted: trunk/OpenMPT/mptrack/res/MODDOC.ICO =================================================================== (Binary files differ) Deleted: trunk/OpenMPT/mptrack/res/MPPDOC.ICO =================================================================== (Binary files differ) Modified: trunk/OpenMPT/mptrack/res/MPTRACK.ICO =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-01 16:03:09
|
Revision: 3343 http://sourceforge.net/p/modplug/code/3343 Author: saga-games Date: 2013-12-01 16:03:01 +0000 (Sun, 01 Dec 2013) Log Message: ----------- [Fix] Plugins with same UID should no longer confuse OpenMPT's plugin cache (http://bugs.openmpt.org/view.php?id=25) [Mod] Updated MIDI I/O plugin to be large address aware Modified Paths: -------------- trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj =================================================================== --- trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj 2013-12-01 00:08:23 UTC (rev 3342) +++ trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj 2013-12-01 16:03:01 UTC (rev 3343) @@ -95,6 +95,7 @@ <SubSystem>Windows</SubSystem> <TargetMachine>MachineX86</TargetMachine> <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <LargeAddressAware>true</LargeAddressAware> </Link> <BuildLog /> </ItemDefinitionGroup> @@ -146,6 +147,7 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <TargetMachine>MachineX86</TargetMachine> <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> + <LargeAddressAware>true</LargeAddressAware> </Link> <BuildLog /> </ItemDefinitionGroup> Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-01 00:08:23 UTC (rev 3342) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-01 16:03:01 UTC (rev 3343) @@ -32,21 +32,14 @@ AEffect *DmoToVst(VSTPluginLib &lib); -#ifdef VST_USE_ALTERNATIVE_MAGIC -// Pelya's plugin ID fix. Breaks fx presets, so let's avoid it for now. -// A better solution would be to change the plugin.cache format so that the ID1+ID2 strings are combined with a CRC, -// Or maybe we should just switch to a proper database format. -#include "../../include/zlib/zlib.h" // For CRC32 calculation (to detect plugins with same UID) -uint32 CalculateCRC32fromFilename(const char *s) -//---------------------------------------------- +#include "../../include/zlib/zlib.h" // For CRC32 calculation (to tell plugins with same UID apart) +static std::string GetPluginCacheID(const VSTPluginLib &lib) +//---------------------------------------------------------- { - char fn[_MAX_PATH]; - mpt::String::Copy(fn, s); - int f; - for(f = 0; fn[f] != 0; f++) fn[f] = toupper(fn[f]); - return LittleEndian(crc32(0, (uint8 *)fn, f)); + const std::string libName = lib.libraryName.ToUTF8(); + uint32 crc = crc32(0, reinterpret_cast<const Bytef *>(&libName[0]), libName.length()); + return mpt::String::Format("%08X%08X%08X", SwapBytesReturnLE(lib.pluginId1), SwapBytesReturnLE(lib.pluginId2), SwapBytesReturnLE(crc)); } -#endif // VST_USE_ALTERNATIVE_MAGIC VstIntPtr VSTCALLBACK CVstPluginManager::MasterCallBack(AEffect *effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void *ptr, float opt) @@ -292,7 +285,7 @@ // Extract plugin IDs for (int i = 0; i < 16; i++) { - UINT n = IDs[i] - '0'; + VstInt32 n = IDs[i] - '0'; if (n > 9) n = IDs[i] + 10 - 'A'; n &= 0x0f; if (i < 8) @@ -304,15 +297,9 @@ } } - const std::string flagKey = mpt::String::Format("%s.Flags", IDs.c_str()); + const std::string flagKey = IDs + ".Flags"; plug->DecodeCacheFlags(cacheFile.Read<int32>(cacheSection, flagKey, 0)); -#ifdef VST_USE_ALTERNATIVE_MAGIC - if( plug->pluginId1 == kEffectMagic ) - { - plug->pluginId1 = CalculateCRC32fromFilename(plug->libraryName); // Make Plugin ID unique for sure (for VSTs with same UID) - }; -#endif // VST_USE_ALTERNATIVE_MAGIC #ifdef VST_LOG Log("Plugin \"%s\" found in PluginCache\n", plug->libraryName.ToLocale().c_str()); #endif // VST_LOG @@ -347,11 +334,7 @@ { pEffect->dispatcher(pEffect, effOpen, 0, 0, 0, 0); -#ifdef VST_USE_ALTERNATIVE_MAGIC - plug.pluginId1 = CalculateCRC32fromFilename(plug->libraryName); // Make Plugin ID unique for sure -#else plug->pluginId1 = pEffect->magic; -#endif // VST_USE_ALTERNATIVE_MAGIC plug->pluginId2 = pEffect->uniqueID; GetPluginInformation(pEffect, *plug); @@ -386,8 +369,8 @@ pluginList.push_back(plug); SettingsContainer &cacheFile = theApp.GetPluginCache(); - const std::string IDs = mpt::String::Format("%08X%08X", plug->pluginId1, plug->pluginId2); - const std::string flagsKey = mpt::String::Format("%s.Flags", IDs); + const std::string IDs = GetPluginCacheID(*plug); + const std::string flagsKey = IDs + ".Flags"; mpt::PathString writePath = dllPath; if(theApp.IsPortableMode()) @@ -534,7 +517,7 @@ { // Update cached information SettingsContainer &cacheFile = theApp.GetPluginCache(); - std::string flagsKey = mpt::String::Format("%08X%08X.Flags", pFound->pluginId1, pFound->pluginId2); + std::string flagsKey = GetPluginCacheID(*pFound) + ".Flags"; cacheFile.Write<int32>(cacheSection, flagsKey, pFound->EncodeCacheFlags()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-01 21:06:36
|
Revision: 3344 http://sourceforge.net/p/modplug/code/3344 Author: saga-games Date: 2013-12-01 21:06:29 +0000 (Sun, 01 Dec 2013) Log Message: ----------- [Mod] Tree view: Limit updates triggered by instrument library monitoring to two per second. [Fix] Plugin manager: For a while, absolute paths have always been written to the cache file. [Imp] VST: Implement audioMasterGetChunkFile opcode. Modified Paths: -------------- trunk/OpenMPT/common/version.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-12-01 16:03:01 UTC (rev 3343) +++ trunk/OpenMPT/common/version.cpp 2013-12-01 21:06:29 UTC (rev 3344) @@ -297,6 +297,8 @@ #ifndef NO_ARCHIVE_SUPPORT "Simon Howard for lhasa\n" "http://fragglet.github.io/lhasa/\n" + "Alexander L. Roshal for UnRAR\n" + "http://rarlab.com/\n" #endif #ifndef NO_PORTAUDIO "PortAudio contributors\n" Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2013-12-01 16:03:01 UTC (rev 3343) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2013-12-01 21:06:29 UTC (rev 3344) @@ -1790,15 +1790,13 @@ DWORD result; do { + Sleep(500); const HANDLE waitHandles[] = { m_hWatchDirKillThread, m_hWatchDir }; result = WaitForMultipleObjects(m_hWatchDir != nullptr ? 2 : 1, waitHandles, FALSE, 1000); if(result == WAIT_OBJECT_0 + 1 && m_hWatchDir == waitHandles[1]) { FindNextChangeNotification(m_hWatchDir); PostMessage(WM_COMMAND, ID_MODTREE_REFRESHINSTRLIB); - } else if(result == WAIT_FAILED) - { - Sleep(100); } } while(result != WAIT_OBJECT_0); } Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-01 16:03:01 UTC (rev 3343) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-01 21:06:29 UTC (rev 3344) @@ -1,5 +1,5 @@ /* - * vstplug.cpp + * Vstplug.cpp * ----------- * Purpose: Plugin handling / processing * Notes : (currently none) @@ -12,7 +12,9 @@ #include "Mainfrm.h" #include "Vstplug.h" #include "VstPresets.h" +#ifdef MODPLUG_TRACKER #include "Moddoc.h" +#endif // MODPLUG_TRACKER #include "../soundlib/Sndfile.h" #include "AbstractVstEditor.h" #include "VstEditor.h" @@ -428,6 +430,13 @@ // get the native path of currently loading bank or project // (called from writeChunk) void* in <ptr> (char[2048], or sizeof(FSSpec)) - DEPRECATED in VST 2.4 case audioMasterGetChunkFile: +#ifdef MODPLUG_TRACKER + if(pVstPlugin) + { + strcpy(ptr, pVstPlugin->GetModDoc()->GetPathNameMpt().ToLocale().c_str()); + return 1; + } +#endif Log("VST plugin to host: Get Chunk File\n"); break; @@ -1033,10 +1042,12 @@ if(errorStr == nullptr) { +#ifndef MODPLUG_TRACKER if(GetModDoc() != nullptr && GetSoundFile().GetModSpecifications().supportsPlugins) { GetModDoc()->SetModified(); } +#endif // MODPLUG_TRACKER return true; } else { Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-01 16:03:01 UTC (rev 3343) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-01 21:06:29 UTC (rev 3344) @@ -21,6 +21,14 @@ #include "../Sndfile.h" #include "JBridge.h" +// For CRC32 calculation (to tell plugins with same UID apart in our cache file) +#if !defined(NO_ZLIB) +#include <zlib/zlib.h> +#elif !defined(NO_MINIZ) +#define MINIZ_HEADER_FILE_ONLY +#include <miniz/miniz.c> +#endif + char CVstPluginManager::s_szHostProductString[64] = "OpenMPT"; char CVstPluginManager::s_szHostVendorString[64] = "OpenMPT project"; VstIntPtr CVstPluginManager::s_nHostVendorVersion = MptVersion::num; @@ -32,13 +40,34 @@ AEffect *DmoToVst(VSTPluginLib &lib); -#include "../../include/zlib/zlib.h" // For CRC32 calculation (to tell plugins with same UID apart) -static std::string GetPluginCacheID(const VSTPluginLib &lib) -//---------------------------------------------------------- +static const char *const cacheSection = "PluginCache"; +static const wchar_t *const cacheSectionW = L"PluginCache"; + + +// PluginCache format: +// LibraryName = <ID1><ID2><CRC32> (hex-encoded) +// <ID1><ID2><CRC32> = FullDllPath +// <ID1><ID2><CRC32>.Flags = Plugin Flags (set VSTPluginLib::DecodeCacheFlags). + +static void WriteToCache(const VSTPluginLib &lib) +//----------------------------------------------- { + SettingsContainer &cacheFile = theApp.GetPluginCache(); + const std::string libName = lib.libraryName.ToUTF8(); - uint32 crc = crc32(0, reinterpret_cast<const Bytef *>(&libName[0]), libName.length()); - return mpt::String::Format("%08X%08X%08X", SwapBytesReturnLE(lib.pluginId1), SwapBytesReturnLE(lib.pluginId2), SwapBytesReturnLE(crc)); + const uint32 crc = crc32(0, reinterpret_cast<const Bytef *>(&libName[0]), libName.length()); + const std::string IDs = mpt::String::Format("%08X%08X%08X", SwapBytesReturnLE(lib.pluginId1), SwapBytesReturnLE(lib.pluginId2), SwapBytesReturnLE(crc)); + const std::string flagsKey = IDs + ".Flags"; + + mpt::PathString writePath = lib.dllPath; + if(theApp.IsPortableMode()) + { + writePath = theApp.AbsolutePathToRelative(writePath); + } + + cacheFile.Write<std::string>(cacheSectionW, lib.libraryName.ToWide(), IDs); + cacheFile.Write<mpt::PathString>(cacheSection, IDs, writePath); + cacheFile.Write<int32>(cacheSection, flagsKey, lib.EncodeCacheFlags()); } @@ -233,18 +262,11 @@ } -// PluginCache format: -// LibraryName = ID100000ID200000 -// ID100000ID200000 = FullDllPath -// ID100000ID200000.Flags = Plugin Flags (set VSTPluginLib::DecodeCacheFlags). - // Add a plugin to the list of known plugins. VSTPluginLib *CVstPluginManager::AddPlugin(const mpt::PathString &dllPath, bool fromCache, const bool checkFileExistence, std::wstring *const errStr) //--------------------------------------------------------------------------------------------------------------------------------------------------- { const mpt::PathString fileName = dllPath.GetFileName(); - const char *const cacheSection = "PluginCache"; - const wchar_t *const cacheSectionW = L"PluginCache"; if(checkFileExistence && (PathFileExistsW(dllPath.AsNative().c_str()) == FALSE)) { @@ -367,21 +389,7 @@ if(validPlug) { pluginList.push_back(plug); - - SettingsContainer &cacheFile = theApp.GetPluginCache(); - const std::string IDs = GetPluginCacheID(*plug); - const std::string flagsKey = IDs + ".Flags"; - - mpt::PathString writePath = dllPath; - if(theApp.IsPortableMode()) - { - writePath = theApp.AbsolutePathToRelative(writePath); - } - - cacheFile.Write<mpt::PathString>(cacheSection, IDs, writePath); - cacheFile.Write<mpt::PathString>(cacheSection, IDs, dllPath); - cacheFile.Write<std::string>(cacheSectionW, plug->libraryName.ToWide(), IDs); - cacheFile.Write<int32>(cacheSection, flagsKey, plug->EncodeCacheFlags()); + WriteToCache(*plug); } else { delete plug; @@ -428,8 +436,6 @@ //----------------------------------------------------------------------------------- { VSTPluginLib *pFound = nullptr; - const char *cacheSection = "PluginCache"; - const wchar_t *cacheSectionW = L"PluginCache"; // Find plugin in library int match = 0; @@ -489,7 +495,11 @@ if(IDs.length() >= 16) { fullPath = cacheFile.Read<mpt::PathString>(cacheSection, IDs, MPT_PATHSTRING("")); - if(!fullPath.empty()) pFound = AddPlugin(fullPath); + if(!fullPath.empty()) + { + theApp.RelativePathToAbsolute(fullPath); + pFound = AddPlugin(fullPath); + } } } } @@ -516,9 +526,7 @@ if(oldIsInstrument != pFound->isInstrument || oldCategory != pFound->category) { // Update cached information - SettingsContainer &cacheFile = theApp.GetPluginCache(); - std::string flagsKey = GetPluginCacheID(*pFound) + ".Flags"; - cacheFile.Write<int32>(cacheSection, flagsKey, pFound->EncodeCacheFlags()); + WriteToCache(*pFound); } CVstPlugin *pVstPlug = new (std::nothrow) CVstPlugin(hLibrary, *pFound, mixPlugin, *pEffect, sndFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |