summaryrefslogtreecommitdiff
path: root/libs/backends/wavesaudio
diff options
context:
space:
mode:
Diffstat (limited to 'libs/backends/wavesaudio')
-rw-r--r--libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c2
-rw-r--r--libs/backends/wavesaudio/waves_audiobackend.cc4
-rw-r--r--libs/backends/wavesaudio/waves_midi_device.cc10
-rw-r--r--libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h4
-rw-r--r--libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h2
-rw-r--r--libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h8
-rw-r--r--libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h2
-rw-r--r--libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h4
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h6
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp4
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h12
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h34
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h42
-rw-r--r--libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h2
-rw-r--r--libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h4
-rw-r--r--libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h2
-rw-r--r--libs/backends/wavesaudio/wavesapi/akupara/basics.hpp2
-rw-r--r--libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp2
-rw-r--r--libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp2
-rw-r--r--libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp8
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp20
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h18
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h16
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp14
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp104
-rw-r--r--libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h10
26 files changed, 169 insertions, 169 deletions
diff --git a/libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c b/libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c
index 511c3c652e..d709ff5c8f 100644
--- a/libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c
+++ b/libs/backends/wavesaudio/portmidi/src/pm_win/pmwinmm.c
@@ -746,7 +746,7 @@ static void FAR PASCAL winmm_in_callback(
MMRESULT rslt;
lpMidiHdr->dwBytesRecorded = 0;
lpMidiHdr->dwFlags = 0;
-
+
/* note: no error checking -- can this actually fail? */
rslt = midiInPrepareHeader(hMidiIn, lpMidiHdr, sizeof(MIDIHDR));
assert(rslt == MMSYSERR_NOERROR);
diff --git a/libs/backends/wavesaudio/waves_audiobackend.cc b/libs/backends/wavesaudio/waves_audiobackend.cc
index d7467c315e..2c6824e4b2 100644
--- a/libs/backends/wavesaudio/waves_audiobackend.cc
+++ b/libs/backends/wavesaudio/waves_audiobackend.cc
@@ -752,7 +752,7 @@ WavesAudioBackend::_audio_device_callback (const float* input_buffer,
if ( !engine.thread_initialised_for_audio_processing () ) {
std::cerr << "\tWavesAudioBackend::_audio_device_callback (): It's an attempt to call process callback from the thread which didn't initialize it " << std::endl;
-
+
AudioEngine::thread_init_callback (this);
}
@@ -803,7 +803,7 @@ WavesAudioBackend::stop ()
_midi_device_manager.stop ();
_unregister_system_audio_ports ();
_unregister_system_midi_ports ();
-
+
return retVal;
}
diff --git a/libs/backends/wavesaudio/waves_midi_device.cc b/libs/backends/wavesaudio/waves_midi_device.cc
index 47f69da794..e9f0065abf 100644
--- a/libs/backends/wavesaudio/waves_midi_device.cc
+++ b/libs/backends/wavesaudio/waves_midi_device.cc
@@ -47,11 +47,11 @@ WavesMidiDevice::WavesMidiDevice (const std::string& device_name)
{
_pm_input_id = _pm_output_id = pmNoDevice;
int count = Pm_CountDevices ();
-
+
for (int i = 0; i < count; i++) {
-
+
const PmDeviceInfo* pm_device_info = Pm_GetDeviceInfo (i);
-
+
if (pm_device_info == NULL) {
continue;
}
@@ -79,7 +79,7 @@ WavesMidiDevice::open (PmTimeProcPtr time_proc, void* time_info)
if (is_input () ) {
// COMMENTED DBG LOGS */ std::cout << "WavesMidiDevice::open (): INPUT" << _pm_input_id << "-[" << name () << "]" << std::endl;
-
+
if (!_input_pm_stream) {
// create queue
if (!_input_queue) {
@@ -181,7 +181,7 @@ WavesMidiDevice::close ()
_input_queue = NULL;
}
- // output
+ // output
if ( output_pm_stream ) {
// close stream
PmError err = Pm_Close (output_pm_stream);
diff --git a/libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h b/libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h
index cbb3e48e33..571a2341be 100644
--- a/libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h
+++ b/libs/backends/wavesaudio/wavesapi/BasicTypes/WCFourCC.h
@@ -19,7 +19,7 @@
#ifndef __WCFourCC_h__
#define __WCFourCC_h__
-
+
/* Copy to include
#include "BasicTypes/WCFourCC.h"
*/
@@ -206,7 +206,7 @@ inline bool operator!=(const WCFourCC in_left, const WCFourCC in_right)
#define kDefaultFourCC WCFourCC::kDefaultFourCC_prv()
static const WCFourCC kZeroFourCC(0, wvNS::wvBO::compiler_byte_order);
-
+
#endif //#if !defined(__WCFourCC_h__)
diff --git a/libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h b/libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h
index 8b5c73578f..c217fa7a1c 100644
--- a/libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h
+++ b/libs/backends/wavesaudio/wavesapi/BasicTypes/WTByteOrder.h
@@ -75,7 +75,7 @@
#endif
namespace wvNS {
-
+
namespace wvBO // namespace Waves::ByteOrder
{
typedef int byte_order_type; // we use int rather than enum because some compilers cannot resolve enum constants at compile-time. There are only two options anyway :-)
diff --git a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h
index b66f720a34..e8e633d927 100644
--- a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h
+++ b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUComPtr.h
@@ -19,7 +19,7 @@
#ifndef __WUComPtr_h__
#define __WUComPtr_h__
-
+
/* Copy to include
#include "BasicTypes/WUComPtr.h"
*/
@@ -36,7 +36,7 @@ typedef int32_t wvComPtr[2];
//================================================================================
inline uint32_t vfpConvertDPtr(const void* InPointer, void* pData)
//================================================================================
-{
+{
uint64_t *pL = (uint64_t *)pData;
*pL = (uint64_t)InPointer;
return (uint32_t)sizeof(uint64_t);
@@ -64,7 +64,7 @@ inline wvComPtr PackToComPtr(const intptr_t in_PtrToPack)
// #ifdef for x32 - intptr_t is 32 bit
// retVal.LSW = int32_t(in_PtrToPack);
// retVal.MSW = 0;
-
+
return retVal;
}
@@ -73,7 +73,7 @@ inline intptr_t UnpackComPtr( const wvComPtr in_ComPtrToUnpack)
// and unpack it to intptr_t type
{
intptr_t retVal;
-
+
// This unpacking is xPlatform coding for x32 and x64
// #ifdef for x64 - intptr_t is 64 bit so use intptr_t instead of int64_t
int64_t PtrAt64 = static_cast<int64_t>(in_ComPtrToUnpack.MSW);
diff --git a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h
index e918b78c71..6ee16c2ad6 100644
--- a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h
+++ b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUMathConsts.h
@@ -19,7 +19,7 @@
#ifndef __WUMathConsts_h__
#define __WUMathConsts_h__
-
+
/* Copy to include:
#include "BasicTypes/WUMathConsts.h"
*/
diff --git a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h
index e1d073db7f..8c6ac71cfc 100644
--- a/libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h
+++ b/libs/backends/wavesaudio/wavesapi/BasicTypes/WUTypes.h
@@ -84,7 +84,7 @@ public: enum Type
//********************************************************************************
// Files
-//! file (and resource container) opening permissions
+//! file (and resource container) opening permissions
// Note: When opening with eFMWriteOnly on existing file, writing to the file will append, not overwrite, Shai, 9/8/2007.
enum WEPermitions{ eFMReadOnly, eFMWriteOnly, eFMReadWrite};
@@ -133,7 +133,7 @@ enum WESystemFolders{
eWavesPreferencesFolder2, // Mac: "/Users/username/Library/Preferences/Waves Audio"
// Win: "C:\Users\username\AppData\Roaming\Waves Audio\Preferences"
-
+
eNumberOfSystemFolders
};
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h b/libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h
index d8e31d4f1f..4260f680a5 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/MinMaxUtilities.h
@@ -40,10 +40,10 @@
template<class T> inline T WUMin(const T &a, const T &b) {return (a < b) ? a : b;} // requires only < to be defined for T
template<class T> inline T WUMax(const T &a,const T &b) {return (a < b) ? b : a;} // requires only < to be defined for T
template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T &Val) // requires only < to be defined for T
-{
+{
return ((Val < Smallest) ? Smallest : ((Biggest < Val) ? Biggest : Val));
}
-/*
+/*
// Min and Max
template<class T> inline T WUMin(T a,T b) {return (a < b) ? a : b;} // requires only < to be defined for T
template<class T> inline T WUMax(T a,T b) {return (a < b) ? b : a;} // requires only < to be defined for T
@@ -51,7 +51,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
{
return ((X < SMALLEST) ? SMALLEST : ((BIGGEST < X) ? BIGGEST : X));
}
- */
+ */
// Absolute value
#ifdef PLATFORM_WINDOWS
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp b/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp
index fb31d24a78..c51d1910b0 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.cpp
@@ -53,7 +53,7 @@ void UMicrosecondsAccumulator::Start()
void UMicrosecondsAccumulator::Stop()
{
UMicroseconds stop_time;
-
+
m_accumulator += stop_time.GetNativeTime() - m_start_time.GetNativeTime();
}
@@ -73,5 +73,5 @@ UMicrosecondsAccumulator& UMicrosecondsAccumulator::operator+=(const UMicrosecon
m_accumulator += inaccum_to_add.GetAccumulatedTime();
return *this;
}
-
+
} // namespace wvNS {
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h b/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h
index 508ff12acb..af1eb8e37f 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/UMicroseconds.h
@@ -19,7 +19,7 @@
#ifndef __UMicroseconds_h__
#define __UMicroseconds_h__
-
+
/* Copy to include
#include "UMicroseconds.h"
*/
@@ -87,15 +87,15 @@ class UMicrosecondsAccumulator
{
public:
UMicrosecondsAccumulator() : m_start_time(0), m_accumulator(0) {}
-
+
void Start();
void Stop();
void Clear();
-
+
UMicroseconds GetAccumulatedTime() const;
-
+
UMicrosecondsAccumulator& operator+=(const UMicrosecondsAccumulator&);
-
+
protected:
UMicroseconds m_start_time;
UMicroseconds m_accumulator;
@@ -119,6 +119,6 @@ inline void MicrosecondDelay(double amt)
now.ReadTime();
} while ((now.MicroSeconds() - than.MicroSeconds()) < amt);
}
-
+
} // namespace wvNS {
#endif //#ifndef __UMicroseconds_h__
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h b/libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h
index 5d2cc88beb..d127e0116a 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/WCFixedString.h
@@ -58,7 +58,7 @@ public:
typedef intptr_t spos_t; // signed position, defined to intptr_t because Windows does not have ssize_t
static const pos_t npos = UINTPTR_MAX; // Same as size_max
- WCFixedStringBase(char* const in_begin, const size_t in_MaxFixedStringLength) :
+ WCFixedStringBase(char* const in_begin, const size_t in_MaxFixedStringLength) :
m_begin(in_begin),
m_MaxFixedStringLength(in_MaxFixedStringLength),
m_end(in_begin)
@@ -280,10 +280,10 @@ public:
#endif
#ifdef __APPLE__
std::snprintf(buf, tempBufSize, "%.*f", in_precision, in_double);
- #endif
- #ifdef __linux__
+ #endif
+ #ifdef __linux__
snprintf(buf, tempBufSize, "%.*f", in_precision, in_double);
- #endif
+ #endif
operator<<(buf);
}
@@ -383,17 +383,17 @@ public:
// WCFixedStringBase& operator<<(const unsigned char in_uint) {
// return operator<<(static_cast<const unsigned long long>(in_uint));
// }
-//
+//
// WCFixedStringBase& operator<<(const size_t in_uint) {
// return operator<<(static_cast<const uint64_t>(in_uint));
// }
-//
+//
#if defined(__APPLE__) || defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
WCFixedStringBase& operator<<(const unsigned int in_uint) {
return operator<<(static_cast<uint64_t>(in_uint));
}
#endif
-//
+//
#if defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
WCFixedStringBase& operator<<(const unsigned long in_uint) {
return operator<<(static_cast<uint64_t>(in_uint));
@@ -473,7 +473,7 @@ public:
ptrdiff_t compare(const WCFixedStringBase& in_to_compare) const
{
- ptrdiff_t retVal = compare(in_to_compare.c_str());
+ ptrdiff_t retVal = compare(in_to_compare.c_str());
return retVal;
}
@@ -496,7 +496,7 @@ public:
ptrdiff_t case_insensitive_compare(const WCFixedStringBase& in_to_compare) const
{
- ptrdiff_t retVal = case_insensitive_compare(in_to_compare.c_str());
+ ptrdiff_t retVal = case_insensitive_compare(in_to_compare.c_str());
return retVal;
}
@@ -690,7 +690,7 @@ public:
bool retVal = (0 == where) || (0 == ::strlen(in_begin_text));
return retVal;
}
-
+
// return true if in_end_text is found at th end OR if in_end_text is empty
bool ends_with(const char* in_end_text) const
{
@@ -775,7 +775,7 @@ public:
}
}
-protected:
+protected:
~WCFixedStringBase() {}
char* const m_begin;
@@ -853,12 +853,12 @@ public:
return retVal;
}
-protected:
+protected:
char m_fixedString[kMaxFixedStringLength + 1]; // the "+ 1" is so that *m_end is always valid, and we can put the '\0' there};
};
-inline bool operator==(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
+inline bool operator==(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
{
return 0 == in_left.compare(in_right.c_str());
}
@@ -868,7 +868,7 @@ inline bool operator==(const WCFixedStringBase& in_left, const char* const in_ri
return 0 == in_left.compare(in_right);
}
-inline bool operator!=(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
+inline bool operator!=(const WCFixedStringBase& in_left, const WCFixedStringBase& in_right)
{
return 0 != in_left.compare(in_right.c_str());
}
@@ -893,11 +893,11 @@ template<size_t kSizeOfFirst, size_t kSizeOfSecond>
class WCFixedStringPair : public std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >
{
public:
- WCFixedStringPair(const char* const in_firstStr = 0, const char* const in_secondStr = 0) :
+ WCFixedStringPair(const char* const in_firstStr = 0, const char* const in_secondStr = 0) :
std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
- WCFixedStringPair(const WCFixedStringBase& in_firstStr, const char* const in_secondStr = 0) :
+ WCFixedStringPair(const WCFixedStringBase& in_firstStr, const char* const in_secondStr = 0) :
std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
- WCFixedStringPair(const WCFixedStringBase& in_firstStr, const WCFixedStringBase& in_secondStr) :
+ WCFixedStringPair(const WCFixedStringBase& in_firstStr, const WCFixedStringBase& in_secondStr) :
std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >(in_firstStr, in_secondStr) {}
};
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h b/libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h
index 294ef0905f..007d32f433 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/WUErrors.h
@@ -280,34 +280,34 @@ const WTErr eIPC_ParseArgsFailed = -14207;
const WTErr eIPC_OpenPipeFailed = -14208;
const WTErr eIPC_SendMsgFailed = -14209;
const WTErr eIPC_SendCommandInvalid = -14210;
-const WTErr eIPC_QtTestMode = -14211;
-const WTErr eIPC_ChangePermissionOnPipe = -14212;
-const WTErr eIPC_ConnectionLost = -14213;
+const WTErr eIPC_QtTestMode = -14211;
+const WTErr eIPC_ChangePermissionOnPipe = -14212;
+const WTErr eIPC_ConnectionLost = -14213;
-const WTErr eIPC_InvalidRole = -14213;
+const WTErr eIPC_InvalidRole = -14213;
const WTErr eIPC_CreateNamedPipeM2SFailed = -14214;
const WTErr eIPC_CreateNamedPipeS2MFailed = -14215;
-const WTErr eIPC_ChangePermissionOnPipeM2S = -14216;
-const WTErr eIPC_ChangePermissionOnPipeS2M = -14217;
-const WTErr eIPC_OpenReadPipeFailed = -14218;
-const WTErr eIPC_OpenReadPipeDIsableSigPipe = -14219;
-const WTErr eIPC_OpenWritePipeFailed = -14220;
-const WTErr eIPC_WritePipeFailed = -14221;
-const WTErr eIPC_WritePipeNotOpen = -14222;
-const WTErr eIPC_WriteBufferResizeFailed = -14223;
-const WTErr eIPC_NotConnectedSendMsgFailed = -14224;
-const WTErr eIPC_OpenWritePipeWorkerStoping = -14225;
-const WTErr eIPC_SoketSendFailed = -14226;
-const WTErr eIPC_PtonFailed = -14227;
-const WTErr eIPC_SocketFailed = -14228;
-const WTErr eIPC_BindFailed = -14229;
-const WTErr eIPC_ListenFailed = -14230;
-const WTErr eIPC_ConnectFailed = -14231;
+const WTErr eIPC_ChangePermissionOnPipeM2S = -14216;
+const WTErr eIPC_ChangePermissionOnPipeS2M = -14217;
+const WTErr eIPC_OpenReadPipeFailed = -14218;
+const WTErr eIPC_OpenReadPipeDIsableSigPipe = -14219;
+const WTErr eIPC_OpenWritePipeFailed = -14220;
+const WTErr eIPC_WritePipeFailed = -14221;
+const WTErr eIPC_WritePipeNotOpen = -14222;
+const WTErr eIPC_WriteBufferResizeFailed = -14223;
+const WTErr eIPC_NotConnectedSendMsgFailed = -14224;
+const WTErr eIPC_OpenWritePipeWorkerStoping = -14225;
+const WTErr eIPC_SoketSendFailed = -14226;
+const WTErr eIPC_PtonFailed = -14227;
+const WTErr eIPC_SocketFailed = -14228;
+const WTErr eIPC_BindFailed = -14229;
+const WTErr eIPC_ListenFailed = -14230;
+const WTErr eIPC_ConnectFailed = -14231;
const WTErr eIPC_WsaStartupFailed = -14232;
const WTErr eIPC_UdpSocketCreateFailed = -14233;
const WTErr eIPC_UdpSocketConnectFailed = -14234;
const WTErr eIPC_UdpSocketBinFailed = -14235;
-const WTErr eIPC_SetBufferPreambleFailed = -14226;
+const WTErr eIPC_SetBufferPreambleFailed = -14226;
// Database errors
const WTErr eDB_BatchRollback = -15501;
diff --git a/libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h b/libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h
index 830ac436e8..0537d1591b 100644
--- a/libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h
+++ b/libs/backends/wavesaudio/wavesapi/MiscUtils/safe_delete.h
@@ -19,7 +19,7 @@
#ifndef __safe_delete_h__
#define __safe_delete_h__
-
+
/* Copy to include:
#include "safe_delete.h"
diff --git a/libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h b/libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h
index 4a24eab05d..eb8d91c696 100644
--- a/libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h
+++ b/libs/backends/wavesaudio/wavesapi/Threads/WCThreadSafe.h
@@ -191,7 +191,7 @@ namespace wvThread
void obtain();
bool tryobtain();
void release();
-
+
private:
ThreadMutexInited(const ThreadMutexInited&); // cannot be copied
ThreadMutexInited& operator=(const ThreadMutexInited&); // cannot be copied
@@ -224,7 +224,7 @@ namespace wvThread
public:
ThreadMutex() {init();}
};
-
+
//--------------------------------------------------------
class DllExport ThreadConditionSignal : public noncopyableobject
{
diff --git a/libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h b/libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h
index 71ef9bfe92..46869c40ae 100644
--- a/libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h
+++ b/libs/backends/wavesaudio/wavesapi/WavesPublicAPI/wstdint.h
@@ -33,7 +33,7 @@
#if ! defined(__STDC_LIMIT_MACROS)
#define __STDC_LIMIT_MACROS
#endif
-
+
#include <stddef.h>
#include </usr/include/stdint.h>
#endif
diff --git a/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp b/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp
index 45d29955c7..33808ede8d 100644
--- a/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp
+++ b/libs/backends/wavesaudio/wavesapi/akupara/basics.hpp
@@ -21,7 +21,7 @@ namespace Akupara
null_type(const null_type *) {} // this allows 0 to be implicitly converted to null_type
};
inline null_type null() { return null_type(); }
-
+
// This is a byte, guaranteed to be unsigned regardless of your compiler's char signedness
typedef uint8_t byte_type;
diff --git a/libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp b/libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp
index 9c146dcebf..14c5f96523 100644
--- a/libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp
+++ b/libs/backends/wavesaudio/wavesapi/akupara/compiletime_functions.hpp
@@ -147,7 +147,7 @@ namespace Akupara
AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(1, char )
AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(2, short )
AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(3, int )
-
+
//AKUPARA_SIGNED_UNSIGNED_INTEGER_PAIR(4, int32_t )// 64BitConversion
template<>
struct
diff --git a/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp b/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp
index b5010eaff9..2111026d0b 100644
--- a/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp
+++ b/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops.hpp
@@ -378,7 +378,7 @@ _byte_count :
public:
pad_to_cache_line() {}
template<typename _arg_type> pad_to_cache_line(_arg_type arg) : base_type(arg) {}
- };
+ };
//---------------------------------------------------------------------
} // namespace atomic
diff --git a/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp b/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp
index 148c297552..74d73106f8 100644
--- a/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp
+++ b/libs/backends/wavesaudio/wavesapi/akupara/threading/atomic_ops_gcc_x86.hpp
@@ -19,7 +19,7 @@ namespace Akupara
namespace machine
{
const unsigned int k_bytes_per_cache_line = 64; // this is true for P4 & K8
-
+
// Flags for operations supported by this machine
//-------------------------------------
@@ -30,7 +30,7 @@ namespace Akupara
template<> struct implements_add <4> : public true_type {};
template<> struct implements_fetch_and_add<4> : public true_type {};
//-------------------------------------
-
+
// CAS
@@ -162,10 +162,10 @@ namespace Akupara
return fetch_and_add(operand_address, -subtrahend);
}
//--------------------------------------------------------------------------------
-
-
+
+
// Memory barriers
//--------------------------------------------------------------------------------
inline void memory_barrier_readwrite()
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp
index 481aa2d860..7c4a3e9962 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.cpp
@@ -77,7 +77,7 @@ WCMRAudioDevice::~WCMRAudioDevice ()
const std::string& WCMRAudioDevice::DeviceName () const
{
return (m_DeviceName);
-
+
}
@@ -95,7 +95,7 @@ const std::string& WCMRAudioDevice::DeviceName () const
const std::vector<std::string>& WCMRAudioDevice::InputChannels ()
{
return (m_InputChannels);
-
+
}
@@ -263,7 +263,7 @@ WTErr WCMRAudioDevice::SetCurrentBufferSize (int newSize)
WCMRAudioDevice::ConnectionStates WCMRAudioDevice::ConnectionStatus ()
{
return (m_ConnectionStatus);
-
+
}
@@ -282,7 +282,7 @@ WCMRAudioDevice::ConnectionStates WCMRAudioDevice::ConnectionStatus ()
bool WCMRAudioDevice::Active ()
{
return (m_IsActive);
-
+
}
@@ -344,7 +344,7 @@ WTErr WCMRAudioDevice::SetStreaming (bool newState)
if (newState) {
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::DeviceStartsStreaming);
}
-
+
//This will most likely be overridden, the base class simply
//changes the member.
m_IsStreaming = newState;
@@ -359,7 +359,7 @@ WTErr WCMRAudioDevice::ResetDevice ()
bool wasActive = Active();
WTErr err = SetStreaming(false);
-
+
if (err == eNoErr)
err = SetActive(false);
@@ -461,11 +461,11 @@ void WCMRAudioDevice::GetMonitorInfo (int *pLeftChannel, int *pRightChannel, flo
{
if (pLeftChannel)
*pLeftChannel = m_LeftMonitorChannel;
- if (pRightChannel)
+ if (pRightChannel)
*pRightChannel = m_RightMonitorChannel;
- if (pGain)
+ if (pGain)
*pGain = m_MonitorGain;
- return;
+ return;
}
@@ -688,5 +688,5 @@ void WCMRAudioDeviceManager::NotifyClient (WCMRAudioDeviceManagerClient::Notific
{
if (m_pTheClient)
m_pTheClient->AudioDeviceManagerNotification (forReason, pParam);
- return;
+ return;
}
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h
index 4dae8abab6..b22e35263d 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRAudioDeviceManager.h
@@ -166,24 +166,24 @@ public:
virtual bool Active();///<Active status - mainly significant for ASIO, as certain ops can only be performed on active devices!
virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
-
+
virtual bool Streaming();///<Streaming Status?
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
virtual WTErr ResetDevice ();
virtual bool IsProcessActive();
-
+
virtual WTErr DoIdle();///<Do Idle Processing
-
+
virtual const std::vector<float>& InputLevels();///<Retrieve Input Levels (for VU display)?
-
+
virtual const std::vector<float>& OutputLevels();///<Retrieve Output Levels (for VU display)?
void GetMonitorInfo (int *pLeftChannel = NULL, int *pRightChannel = NULL, float *pGain = NULL);///<Retrieve current monitor channel pair and gain - optional, will not be available with AG
virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-
+
virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
virtual WTErr SendCustomCommand (int customCommand, void *pCommandParam); ///< Send a custom command to the audiodevice...
@@ -193,13 +193,13 @@ public:
protected:
WCMRAudioDeviceManager *m_pMyManager; ///< The manager who's managing this device, can be used for sending notifications!
-
+
std::string m_DeviceName; ///< Name of the device.
std::vector<std::string> m_InputChannels; ///< List of input channel names.
std::vector<std::string> m_OutputChannels; ///< List of output channel names.
std::vector<int> m_SamplingRates; ///< List of available sampling rates.
std::vector<int> m_BufferSizes; ///< List of available buffer sizes.
-
+
int m_CurrentSamplingRate; ///< Currently selected sampling rate.
int m_CurrentBufferSize; ///< Currently selected buffer size.
@@ -208,7 +208,7 @@ protected:
bool m_IsStreaming; ///< Flag for streaming status.
std::vector<float> m_InputLevels; ///< List of input levels.
std::vector<float> m_OutputLevels; ///< List of output levels.
-
+
int m_LeftMonitorChannel; ///< The device channel to use for monitoring left channel data.
int m_RightMonitorChannel; ///< The device channel to use for monitoring right channel data.
float m_MonitorGain; ///< Amount of gain to apply for monitoring signal.
@@ -251,7 +251,7 @@ protected:
mutable wvNS::wvThread::ThreadMutex m_AudioDeviceInfoVecMutex; // mutex to lock device info list
DeviceInfoVec m_DeviceInfoVec;
-
+
eAudioDeviceFilter m_eAudioDeviceFilter;
WCMRAudioDevice* m_CurrentDevice;
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h
index e630a7d1a9..0d92493b51 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.h
@@ -81,14 +81,14 @@ public:
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
virtual WTErr DoIdle();///<Do Idle Processing
-
+
virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-
+
virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
virtual int AudioCallback (float *pOutputBuffer, unsigned long framesPerBuffer, int64_t inSampleTime, uint64_t inCycleStartTime);
-
+
AudioDeviceID DeviceID () {return m_DeviceID;}
virtual uint32_t GetLatency (bool isInput); ///< Get latency.
@@ -110,7 +110,7 @@ protected:
// int m_CurrentIOCycle; ///< The location in m_IOCyclesTymesTaken array, where the next cycle's value will go.
// int m_CyclesToAccumulate; ///< The number of cycles to accumulate the values for - maximum for last one second.
// unsigned int m_CyclePeriod; ///< The number of host time units for a cycle period - determined by buffer size and sampling rate
-
+
AudioUnit m_AUHALAudioUnit;///< The AUHAL AudioUnit
@@ -136,7 +136,7 @@ protected:
uint32_t m_ToneDataSamples;
uint32_t m_NextSampleToUse;
#endif //WV_USE_TONE_GEN
-
+
WTErr UpdateDeviceInfo ();
WTErr UpdateDeviceId ();
WTErr UpdateDeviceName();
@@ -157,14 +157,14 @@ protected:
#if WV_USE_TONE_GEN
void SetupToneGenerator ();
#endif //WV_USE_TONE_GEN
-
+
static OSStatus StaticAudioIOProc(void *inRefCon, AudioUnitRenderActionFlags * ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
AudioBufferList *ioData);
OSStatus AudioIOProc(AudioUnitRenderActionFlags * ioActionFlags,
const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames,
AudioBufferList *ioData);
-
+
static OSStatus StaticPropertyChangeProc (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput,
AudioDevicePropertyID inPropertyID, void *inClientData);
void PropertyChangeProc (AudioDevicePropertyID inPropertyID);
@@ -196,7 +196,7 @@ protected:
bool m_UseMultithreading; ///< Flag indicates whether to use multi-threading for audio processing.
bool m_bNoCopyAudioBuffer;
-
+
private:
// helper functions for this class only
WTErr getDeviceAvailableSampleRates(DeviceID deviceId, std::vector<int>& sampleRates);
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp
index 0bce97423c..bf5e4fbb90 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRNativeAudio.cpp
@@ -106,7 +106,7 @@ WTErr WCMRNativeAudioNoneDevice::SetCurrentBufferSize (int newSize)
//same size, nothing to do.
if (oldSize == newSize)
return eNoErr;
-
+
//see if this is one of our supported rates...
std::vector<int>::iterator intIter = find(m_BufferSizes.begin(), m_BufferSizes.end(), newSize);
if (intIter == m_BufferSizes.end())
@@ -114,14 +114,14 @@ WTErr WCMRNativeAudioNoneDevice::SetCurrentBufferSize (int newSize)
//Can't change, perhaps use an "invalid param" type of error
return eCommandLineParameter;
}
-
+
if (Streaming())
{
//Can't change, perhaps use an "in use" type of error
return eGenericErr;
}
-
+
return WCMRAudioDevice::SetCurrentBufferSize(newSize);
}
@@ -211,15 +211,15 @@ void WCMRNativeAudioNoneDevice::_SilenceThread()
// VERY ROUGH IMPLEMENTATION:
while(Streaming()) {
-
+
uint64_t cycleEndTimeNanos = audioCallbackData.acdCycleStartTimeNanos + cyclePeriodNanos;
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::AudioCallback, (void *)&audioCallbackData);
-
+
audioCallbackData.acdSampleTime += buffer_size;
-
+
int64_t timeToSleepUsecs = ((int64_t)cycleEndTimeNanos - (int64_t)__get_time_nanos())/1000;
-
+
if (timeToSleepUsecs > 0) {
_usleep (timeToSleepUsecs);
}
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp
index c039b49c0b..8e63887d37 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp
@@ -38,7 +38,7 @@ static const int gAllBufferSizes[] =
{
32, 64, 96, 128, 192, 256, 512, 1024, 2048
};
-
+
///< The default SR.
static const int DEFAULT_SR = 44100;
@@ -50,7 +50,7 @@ static const int NONE_DEVICE_ID = -1;
///< Number of stalls to wait before notifying user...
static const int NUM_STALLS_FOR_NOTIFICATION = 100; // 100 corresponds to 100 x 42 ms idle timer - about 4 seconds.
static const int CHANGE_CHECK_COUNTER_PERIOD = 100; // 120 corresponds to 120 x 42 ms idle timer - about 4 seconds.
-
+
#define HUNDRED_NANO_TO_MILLI_CONSTANT 10000
#define CONSUMPTION_CALCULATION_INTERVAL 500 // Milli Seconds
@@ -165,7 +165,7 @@ void WCMRPortAudioDevice::initDevice()
}
else
std::cout << "API::Device " << m_DeviceName << " Device does not support any sample rate of ours" << std::endl;
-
+
//should use a valid current buffer size
if (m_BufferSizes.size())
{
@@ -177,7 +177,7 @@ void WCMRPortAudioDevice::initDevice()
m_CurrentBufferSize = m_BufferSizes[0];
}
}
-
+
//build our input/output level lists
for (unsigned int currentChannel = 0; currentChannel < m_InputChannels.size(); currentChannel++)
{
@@ -215,7 +215,7 @@ void WCMRPortAudioDevice::terminateDevice()
{
stopStreaming();
}
-
+
//If device is active (meaning stream is open) we need to close it.
if (Active())
{
@@ -285,7 +285,7 @@ WCMRPortAudioDevice::~WCMRPortAudioDevice ()
WTErr WCMRPortAudioDevice::UpdateDeviceInfo ()
{
std::cout << "API::Device (ID:)" << m_DeviceID << " Updating device info" << std::endl;
-
+
SignalObjectAndWait(m_hUpdateDeviceInfoRequestedEvent, m_hUpdateDeviceInfoDone, INFINITE, false);
return eNoErr;
@@ -307,7 +307,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
//get device info
const PaDeviceInfo *pDeviceInfo = Pa_GetDeviceInfo(m_DeviceID);
-
+
//update name.
m_DeviceName = pDeviceInfo->name;
@@ -336,7 +336,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
////////////////////////////////////////////////////////////////////////////////////
//update list of supported SRs...
m_SamplingRates.clear();
-
+
// now iterate through our standard SRs and check if they are supported by device
// store them for this device
for(int sr=0; gAllSampleRates[sr] > 0; sr++)
@@ -356,11 +356,11 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
// In ASIO Windows, the buffer size is set from the sound device manufacturer's control panel
long minSize, maxSize, preferredSize, granularity;
PaError err = PaAsio_GetAvailableBufferSizes(m_DeviceID, &minSize, &maxSize, &preferredSize, &granularity);
-
+
if (err == paNoError)
{
std::cout << "API::Device " << m_DeviceName << " Buffers: " << minSize << " " << maxSize << " " << preferredSize << std::endl;
-
+
m_BufferSizes.push_back (preferredSize);
useDefaultBuffers = false;
}
@@ -368,7 +368,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
{
std::cout << "API::Device" << m_DeviceName << " Preffered buffer size is not supported" << std::endl;
}
-
+
if (useDefaultBuffers)
{
std::cout << "API::Device" << m_DeviceName << " Using default buffer sizes " <<std::endl;
@@ -404,17 +404,17 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
m_InputChannels.push_back (chNameStream.str());
}
-
-
+
+
//Update output channels
m_OutputChannels.clear();
for (int channel = 0; channel < maxOutputChannels; channel++)
{
const char* channelName[32]; // 32 is max leth declared by PortAudio for this operation
std::stringstream chNameStream;
-
+
PaError error = PaAsio_GetOutputChannelName(m_DeviceID, channel, channelName);
-
+
chNameStream << (channel+1) << " - ";
if (error == paNoError)
@@ -425,7 +425,7 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/)
{
chNameStream << "Output " << (channel+1);
}
-
+
m_OutputChannels.push_back (chNameStream.str());
}
}
@@ -467,13 +467,13 @@ PaError WCMRPortAudioDevice::testStateValidness(int sampleRate, int bufferSize)
pOutS = &outputParameters;
PaStream *portAudioStream = NULL;
-
+
//sometimes devices change buffer size if sample rate changes
//it updates buffer size during stream opening
//we need to find out how device would behave with current sample rate
//try opening test stream to load device driver for current sample rate and buffer size
paErr = Pa_OpenStream (&portAudioStream, pInS, pOutS, sampleRate, bufferSize, paDitherOff, NULL, NULL);
-
+
if (portAudioStream)
{
// close test stream
@@ -500,7 +500,7 @@ int WCMRPortAudioDevice::CurrentSamplingRate ()
{
AUTO_FUNC_DEBUG;
//ToDo: Perhaps for ASIO devices that are active, we should retrive the SR from the device...
-
+
return (m_CurrentSamplingRate);
}
@@ -548,7 +548,7 @@ WTErr WCMRPortAudioDevice::SetStreaming (bool newState)
WTErr WCMRPortAudioDevice::ResetDevice()
{
std::cout << "API::Device: " << m_DeviceName << " Reseting device" << std::endl;
-
+
SignalObjectAndWait(m_hResetRequestedEvent, m_hResetDone, INFINITE, false);
if (ConnectionStatus() == DeviceErrors)
@@ -579,7 +579,7 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
//changes the status.
int oldRate = CurrentSamplingRate();
bool oldActive = Active();
-
+
//no change, nothing to do
if (oldRate == newRate)
return (retVal);
@@ -593,14 +593,14 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
retVal = eCommandLineParameter;
return (retVal);
}
-
+
if (Streaming())
{
//Can't change, perhaps use an "in use" type of error
retVal = eGenericErr;
return (retVal);
}
-
+
//make the change...
m_CurrentSamplingRate = newRate;
PaError paErr = PaAsio_SetStreamSampleRate (m_PortAudioStream, m_CurrentSamplingRate);
@@ -614,7 +614,7 @@ WTErr WCMRPortAudioDevice::SetCurrentSamplingRate (int newRate)
retVal = eWrongObjectState;
}
-
+
return (retVal);
}
@@ -693,7 +693,7 @@ WCMRPortAudioDevice::ConnectionStates WCMRPortAudioDevice::ConnectionStatus ()
AUTO_FUNC_DEBUG;
//ToDo: May want to do something more to extract the actual status!
return (m_ConnectionStatus);
-
+
}
@@ -710,7 +710,7 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
AUTO_FUNC_DEBUG;
PaError paErr = paNoError;
-
+
// if device is not active activate it
if (!Active() )
{
@@ -748,11 +748,11 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
paDitherOff,
WCMRPortAudioDevice::TheCallback,
this);
-
+
if(paErr != paNoError)
{
std::cout << "Cannot open streamm with buffer: "<< m_CurrentBufferSize << " Error: " << Pa_GetErrorText (paErr) << std::endl;
-
+
if (paErr == paUnanticipatedHostError)
std::cout << "Error details: "<< Pa_GetLastHostErrorInfo ()->errorText << "; code: " << Pa_GetLastHostErrorInfo ()->errorCode << std::endl;
}
@@ -803,7 +803,7 @@ void WCMRPortAudioDevice::activateDevice (bool callerIsWaiting/*=false*/)
m_lastErr = eAsioFailed;
}
-
+
}
std::cout << "Activation is DONE "<< std::endl;
@@ -825,14 +825,14 @@ void WCMRPortAudioDevice::deactivateDevice (bool callerIsWaiting/*=false*/)
AUTO_FUNC_DEBUG;
PaError paErr = paNoError;
-
+
if (Active() )
{
if (Streaming())
{
stopStreaming ();
}
-
+
if (m_PortAudioStream)
{
//close the stream first
@@ -892,13 +892,13 @@ void WCMRPortAudioDevice::startStreaming (bool callerIsWaiting/*=false*/)
m_SampleCounter = 0;
std::cout << "API::Device" << m_DeviceName << " Starting device stream" << std::endl;
-
+
//get device info
const PaDeviceInfo *pDeviceInfo = Pa_GetDeviceInfo(m_DeviceID);
-
+
unsigned int inChannelCount = pDeviceInfo->maxInputChannels;
unsigned int outChannelCount = pDeviceInfo->maxOutputChannels;
-
+
// Prepare for streaming - tell Engine to do the initialization for process callback
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::DeviceStartsStreaming);
@@ -917,7 +917,7 @@ void WCMRPortAudioDevice::startStreaming (bool callerIsWaiting/*=false*/)
m_lastErr = eGenericErr;
}
}
-
+
if (callerIsWaiting)
SetEvent(m_hStartStreamingDone);
}
@@ -995,7 +995,7 @@ void WCMRPortAudioDevice::resetDevice (bool callerIsWaiting /*=false*/ )
// Reinitialize PA
Pa_Terminate();
Pa_Initialize();
-
+
std::cout << "Updating device state... " << std::endl;
// update device info
updateDeviceInfo();
@@ -1145,7 +1145,7 @@ WTErr WCMRPortAudioDevice::DoIdle ()
};
const size_t hEventsSize = sizeof(hEvents)/sizeof(hEvents[0]);
-
+
initDevice();
for(;;)
@@ -1255,7 +1255,7 @@ WTErr WCMRPortAudioDevice::SetMonitorGain (float newGain)
AUTO_FUNC_DEBUG;
//This will most likely be overridden, the base class simply
//changes the member.
-
+
m_MonitorGain = newGain;
return (eNoErr);
}
@@ -1278,7 +1278,7 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
{
AUTO_FUNC_DEBUG;
WTErr retVal = eNoErr;
-
+
if (Active() && !m_ResetRequested )
{
#ifdef PLATFORM_WINDOWS
@@ -1291,7 +1291,7 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
// show control panel for the device
if (PaAsio_ShowControlPanel (m_DeviceID, pParam) != paNoError)
retVal = eGenericErr;
-
+
// restore previous state for the device
SetActive(true);
if (wasStreaming)
@@ -1305,9 +1305,9 @@ WTErr WCMRPortAudioDevice::ShowConfigPanel (void *pParam)
}
#else
pParam = pParam;
-#endif //_windows
+#endif //_windows
}
-
+
return (retVal);
}
@@ -1336,7 +1336,7 @@ int WCMRPortAudioDevice::TheCallback (const void *pInputBuffer, void *pOutputBuf
(statusFlags & (paInputOverflow | paOutputUnderflow)) != 0);
else
return (true);
-
+
}
@@ -1388,7 +1388,7 @@ int WCMRPortAudioDevice::AudioCallback( const float *pInputBuffer, float *pOutpu
//Don't try to access after this call returns!
m_pInputData = NULL;
- m_SampleCounter += framesPerBuffer;
+ m_SampleCounter += framesPerBuffer;
return m_StopRequested;
}
@@ -1417,7 +1417,7 @@ WCMRPortAudioDeviceManager::WCMRPortAudioDeviceManager (WCMRAudioDeviceManagerCl
{
AUTO_FUNC_DEBUG;
std::cout << "API::PortAudioDeviceManager::PA Device manager constructor" << std::endl;
-
+
//Always create the None device first...
m_NoneDevice = new WCMRNativeAudioNoneDevice(this);
@@ -1443,7 +1443,7 @@ WCMRPortAudioDeviceManager::WCMRPortAudioDeviceManager (WCMRAudioDeviceManagerCl
WCMRPortAudioDeviceManager::~WCMRPortAudioDeviceManager()
{
AUTO_FUNC_DEBUG;
-
+
std::cout << "API::Destroying PortAudioDeviceManager " << std::endl;
try
@@ -1480,7 +1480,7 @@ WCMRAudioDevice* WCMRPortAudioDeviceManager::initNewCurrentDeviceImpl(const std:
{
std::cout << "API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName << std::endl;
TRACE_MSG ("API::PortAudioDeviceManager::Creating PA device: " << devInfo.m_DeviceId << ", Device Name: " << devInfo.m_DeviceName);
-
+
m_CurrentDevice = new WCMRPortAudioDevice (this, devInfo.m_DeviceId, m_UseMultithreading, m_bNoCopyAudioBuffer);
}
catch (...)
@@ -1548,7 +1548,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceAvailableSampleRates(DeviceID deviceI
WTErr WCMRPortAudioDeviceManager::getDeviceAvailableBufferSizes(DeviceID deviceId, std::vector<int>& buffers)
{
WTErr retVal = eNoErr;
-
+
buffers.clear();
//make PA request to get actual device buffer sizes
@@ -1574,7 +1574,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceAvailableBufferSizes(DeviceID deviceI
WTErr WCMRPortAudioDeviceManager::generateDeviceListImpl()
{
std::cout << "API::PortAudioDeviceManager::Generating device list" << std::endl;
-
+
WTErr retVal = eNoErr;
//Initialize PortAudio and ASIO first
@@ -1605,7 +1605,7 @@ WTErr WCMRPortAudioDeviceManager::generateDeviceListImpl()
{
//if it's of the required type...
const PaDeviceInfo *pPaDeviceInfo = Pa_GetDeviceInfo(thisDeviceID);
-
+
if (Pa_GetHostApiInfo(pPaDeviceInfo->hostApi)->type == paASIO)
{
//build a device object...
@@ -1749,7 +1749,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceSampleRatesImpl(const std::string & d
WTErr WCMRPortAudioDeviceManager::getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& buffers) const
{
WTErr retVal = eNoErr;
-
+
buffers.clear();
//first check if the request has been made for None device
@@ -1758,7 +1758,7 @@ WTErr WCMRPortAudioDeviceManager::getDeviceBufferSizesImpl(const std::string & d
buffers=m_NoneDevice->BufferSizes();
return retVal;
}
-
+
if (m_CurrentDevice && deviceName == m_CurrentDevice->DeviceName() )
{
buffers=m_CurrentDevice->BufferSizes();
diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h
index 7579bfd2ff..c028d09511 100644
--- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h
+++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.h
@@ -53,12 +53,12 @@ public:
virtual ConnectionStates ConnectionStatus();///< Connection Status - device available, gone, disconnected
virtual WTErr SetActive (bool newState);///<Prepare/Activate device.
-
+
virtual WTErr SetStreaming (bool newState);///<Start/Stop Streaming - should reconnect connections when streaming starts!
virtual WTErr SetMonitorChannels (int leftChannel, int rightChannel);///<Set monitor channels. - optional, will not be available with AG
virtual WTErr SetMonitorGain (float newGain);///<Set monitor gain. - optional, will not be available with AG
-
+
virtual WTErr ShowConfigPanel (void *pParam);///< Show Control Panel - in case of ASIO this will work only with Active device!
virtual int AudioCallback (const float *pInputBuffer, float *pOutputBuffer, unsigned long framesPerBuffe, bool dropsDetectedr);
@@ -71,7 +71,7 @@ public:
static long StaticASIOMessageHook (void *pRefCon, long selector, long value, void* message, double* opt);
long ASIOMessageHook (long selector, long value, void* message, double* opt);
#endif //PLATFORM_WINDOWS
-
+
protected:
static DWORD WINAPI __DoIdle__(LPVOID lpThreadParameter);
@@ -88,7 +88,7 @@ protected:
PaError testStateValidness(int sampleRate, int bufferSize);
///////////////////////////////////////////////////////////
-
+
static int TheCallback (const void *pInputBuffer, void *pOutputBuffer, unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo* /*pTimeInfo*/, PaStreamCallbackFlags /*statusFlags*/, void *pUserData );
@@ -154,7 +154,7 @@ class WCMRPortAudioDeviceManager : public WCMRAudioDeviceManager
public:
WCMRPortAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter,
bool useMultithreading = true, bool bNocopy = false); ///< constructor
-
+
virtual ~WCMRPortAudioDeviceManager(void); ///< destructor
protected: