//! WCMRNativeAudioConnection and related class defienitions
//!
//---------------------------------------------------------------------------------*/
-#if defined(__MACOS__)
+#if defined(__APPLE__)
#include <CoreAudio/CoreAudio.h>
#endif
WCMRNativeAudioNoneDevice::WCMRNativeAudioNoneDevice (WCMRAudioDeviceManager *pManager)
: WCMRNativeAudioDevice (pManager, false /*useMultiThreading*/)
, m_SilenceThread(0)
-#if defined (_WINDOWS)
+#if defined (PLATFORM_WINDOWS)
, _waitableTimerForUsleep (CreateWaitableTimer(NULL, TRUE, NULL))
#endif
{
WCMRNativeAudioNoneDevice::~WCMRNativeAudioNoneDevice ()
{
-#if defined (_WINDOWS)
+#if defined (PLATFORM_WINDOWS)
if(_waitableTimerForUsleep) {
CloseHandle(_waitableTimerForUsleep);
}
pthread_attr_t attributes;
size_t stack_size = 100000;
-#ifdef __MACOS__
+#ifdef __APPLE__
stack_size = (((stack_size - 1) / PTHREAD_STACK_MIN) + 1) * PTHREAD_STACK_MIN;
#endif
if (pthread_attr_init (&attributes)) {
void WCMRNativeAudioNoneDevice::_SilenceThread()
{
-#if defined(_WINDOWS)
+#if defined(PLATFORM_WINDOWS)
float* theInpBuffers[__m_NumInputChannels];
for(int i = 0; i < __m_NumInputChannels; ++i)
{
return 0;
}
-#if defined(_WINDOWS)
+#if defined(PLATFORM_WINDOWS)
void WCMRNativeAudioNoneDevice::_usleep(uint64_t duration_usec)
{
LARGE_INTEGER ft;
uint64_t
WCMRNativeAudioNoneDevice::__get_time_nanos ()
{
-#ifdef __MACOS__
+#ifdef __APPLE__
// here we exploit the time counting API which is used by the WCMRCoreAudioDeviceManager. However,
// the API should be a part of WCMRCoreAudioDeviceManager to give a chance of being tied to the
// audio device transport time�.
return AudioConvertHostTimeToNanos (AudioGetCurrentHostTime ());
-#elif _WINDOWS
+#elif PLATFORM_WINDOWS
LARGE_INTEGER Frequency, Count ;
-#ifdef _WINDOWS
+#ifdef PLATFORM_WINDOWS
#include "IncludeWindows.h"
#endif
-#if defined(__linux__) || defined(__MACOS__)
+#if defined(__linux__) || defined(__APPLE__)
#include <sys/time.h>
#endif
namespace wvNS {
UMicroseconds& UMicroseconds::ReadTime()
{
-#ifdef _WINDOWS
+#ifdef PLATFORM_WINDOWS
LARGE_INTEGER Frequency, Count ;
QueryPerformanceFrequency(&Frequency) ;
theTime = uint64_t((Count.QuadPart * 1000000.0 / Frequency.QuadPart));
#endif
-#if defined(__linux__) || defined(__MACOS__)
+#if defined(__linux__) || defined(__APPLE__)
// Mac code replaced by posix calls, to reduce Carbon dependency.
timeval buf;
}
/*
Removed in favor of the posix implementation.
-#ifdef __MACOS__
+#ifdef __APPLE__
uint32_t UMicroseconds::hi() {return reinterpret_cast<UnsignedWide*>(&theTime)->hi;}
uint32_t UMicroseconds::lo() {return reinterpret_cast<UnsignedWide*>(&theTime)->lo;}
#endif
#endif // XPLATFORMTHREADS_WINDOWS
-#if defined(__MACOS__)
+#if defined(__APPLE__)
#include <CoreServices/CoreServices.h>
#include <stdio.h>
-#endif // __MACOS__
+#endif // __APPLE__
#if XPLATFORMTHREADS_POSIX
#include </usr/include/unistd.h> // avoid the framework version and use the /usr/include version
return nTicksPerMicrosecond;
}
-#if defined(__MACOS__) //&& !defined(__MACH__)
+#if defined(__APPLE__) //&& !defined(__MACH__)
bool FindNetInterfaceByIPAddress(const char *sIP, char *sInterface) // sIP and sInterface are both char[16]
return timestamp(uint32_t(TSC.QuadPart/nTicksPerMicrosecond));
}
else return timestamp(0);
-#elif defined(__MACOS__)
+#elif defined(__APPLE__)
if (nTicksPerMicrosecond) {} // prevent 'unused' warnings
UnsignedWide usecs;
::Microseconds(&usecs);