Browse Source

Fix MSVC build

Signed-off-by: falkTX <falktx@falktx.com>
pull/1775/head
falkTX 2 years ago
parent
commit
0a563b8150
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 14 additions and 2 deletions
  1. +1
    -1
      source/backend/engine/CarlaEngineInternal.cpp
  2. +13
    -1
      source/modules/water/memory/Atomic.h

+ 1
- 1
source/backend/engine/CarlaEngineInternal.cpp View File

@@ -705,7 +705,7 @@ static int64_t getTimeInMicroseconds() noexcept
#if defined(_MSC_VER)
struct _timeb tb;
_ftime_s (&tb);
return ((int64) tb.time) * 1000 + tb.millitm;
return ((int64_t) tb.time) * 1000 + tb.millitm;
#elif defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
struct timeval tv;
gettimeofday(&tv, nullptr);


+ 13
- 1
source/modules/water/memory/Atomic.h View File

@@ -344,7 +344,19 @@ inline uint32 Atomic<uint32>::operator--() noexcept
return castFromLong (_InterlockedDecrement (reinterpret_cast<volatile long*> (&value)));
}
# ifdef CARLA_OS_64BIT
# ifndef CARLA_OS_64BIT
template <>
inline int64 Atomic<int64>::exchange (const int64 newValue) noexcept
{
return castFrom64Bit (_InterlockedCompareExchange64 (reinterpret_cast<volatile int64*> (&value), castTo64Bit (value), castTo64Bit (newValue)));
}
template <>
inline uint64 Atomic<uint64>::exchange (const uint64 newValue) noexcept
{
return castFrom64Bit (_InterlockedCompareExchange64 (reinterpret_cast<volatile int64*> (&value), castTo64Bit (value), castTo64Bit (newValue)));
}
# else
template <>
inline int64 Atomic<int64>::exchange (const int64 newValue) noexcept
{


Loading…
Cancel
Save