globally remove all trailing whitespace from ardour code base.

Paul Davis was responsible for introducing almost all of this.
This commit is contained in:
Paul Davis 2015-10-04 14:51:05 -04:00
parent 297e80e020
commit 4dc63966f0
774 changed files with 7919 additions and 7919 deletions

View file

@ -52,7 +52,7 @@ typedef uint32_t WTFourCharCode;
class WCFourCC
{
private:
template<class _iter>
template<class _iter>
static WTFourCharCode stored_from_iter(_iter& i)
{
return s_stored_byte_order==wvNS::wvBO::byte_order_big_endian ? FOURCC_BIG(i[0], i[1], i[2], i[3]) : FOURCC_LITTLE(i[0], i[1], i[2], i[3]);
@ -67,7 +67,7 @@ public:
// change this line will change the byte order in which WCFourCC keeps the four char code
static const wvNS::wvBO::byte_order_type s_stored_byte_order = wvNS::wvBO::compiler_byte_order;
WCFourCC(const char a, const char b, const char c, const char d) :
WCFourCC(const char a, const char b, const char c, const char d) :
m_stored_value(s_stored_byte_order==wvNS::wvBO::compiler_byte_order ? FOURCC_BIG(a,b,c,d) : FOURCC_LITTLE(a,b,c,d))
{
#if kEnableWCFourCCDebug == 1
@ -141,7 +141,7 @@ public:
{
return reinterpret_cast<char*>(&m_stored_value)[s_stored_byte_order==wvNS::wvBO::byte_order_little_endian ? 3-in_character_index : in_character_index];
}
static size_t size()
{
return sizeof(WTFourCharCode);
@ -151,12 +151,12 @@ public:
{
return size();
}
static size_t capacity()
{
return size();
}
WCFixedString4 GetString() const
{
WCFixedString4 retVal;

View file

@ -51,7 +51,7 @@
#define _BYTEORDER_BIG_ENDIAN 0
#endif // big/little switch
#else // if the compiler proparly has NOT set either __BIG_ENDIAN__ or __LITTLE_ENDIAN__
// http://msdn.microsoft.com/en-us/library/b0084kay.aspx for all preprocessor defs. _M_X64: 64 bit. _M_IA64: Itanium 64bit
// http://msdn.microsoft.com/en-us/library/b0084kay.aspx for all preprocessor defs. _M_X64: 64 bit. _M_IA64: Itanium 64bit
#if defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(__INTEL__) || defined(__x86_64__) || defined(_M_X64) || defined(_M_IA64)
#define _BYTEORDER_BIG_ENDIAN 0
#elif defined(_M_PPC) || defined(__POWERPC__ ) || defined(__ppc__)
@ -86,7 +86,7 @@ namespace wvBO // namespace Waves::ByteOrder
// We try to use this static const rather than preprocessor symbols in our code wherever possible.
#if _BYTEORDER_BIG_ENDIAN == 1
static const byte_order_type compiler_byte_order = byte_order_big_endian;
#else
#else
static const byte_order_type compiler_byte_order = byte_order_little_endian;
#endif
@ -113,8 +113,8 @@ namespace wvBO // namespace Waves::ByteOrder
return x;
}
inline uint64_t swap64(uint64_t x) // TODO: To be replaced
{
return
{
return
((x>>7*8)&0xFF)<<0*8 | ((x>>6*8)&0xFF)<<1*8 | ((x>>5*8)&0xFF)<<2*8 | ((x>>4*8)&0xFF)<<3*8 |
((x>>3*8)&0xFF)<<4*8 | ((x>>2*8)&0xFF)<<5*8 | ((x>>1*8)&0xFF)<<6*8 | ((x>>0*8)&0xFF)<<7*8 ;
}
@ -144,12 +144,12 @@ namespace wvBO // namespace Waves::ByteOrder
// TODO
#endif // _BYTEORDER_ASM_GNUC_PPC
#if _BYTEORDER_ASM_NONE
#if _BYTEORDER_ASM_NONE
inline uint16_t swap16(uint16_t x) { return (x>>8) | ((x&0xFF)<<8); }
inline uint32_t swap32(uint32_t x) { return (x&0xFF)<<24 | (x&0xFF00)<<8 | (x&0xFF0000)>>8 | (x&0xFF000000)>>24; }
inline uint64_t swap64(uint64_t x)
{
return
{
return
((x>>7*8)&0xFF)<<0*8 | ((x>>6*8)&0xFF)<<1*8 | ((x>>5*8)&0xFF)<<2*8 | ((x>>4*8)&0xFF)<<3*8 |
((x>>3*8)&0xFF)<<4*8 | ((x>>2*8)&0xFF)<<5*8 | ((x>>1*8)&0xFF)<<6*8 | ((x>>0*8)&0xFF)<<7*8 ;
}
@ -161,7 +161,7 @@ namespace wvBO // namespace Waves::ByteOrder
//---------------------------------------------------------------------------------
// order conversion functions
// may want to overload for float and double as well.
// may want to overload for float and double as well.
// overload for signed ints is ambiguous and should be done only if no other choice exists.
// - - - - - - - - - - - - - - - - - - - -
inline uint16_t compiler_to_big_16(uint16_t x)

View file

@ -26,7 +26,7 @@
#include "WavesPublicAPI/wstdint.h"
typedef int32_t wvComPtr[2];
typedef int32_t wvComPtr[2];
// ConvertDPtr has the exact format of a vfp callback function, but it is a local function, native only.
// It converts a pointer in either 32 bits or 64 bits to a place-holder of 64 bits in coefs/states/external memory.
@ -102,7 +102,7 @@ inline uint32_t ComPtr_to_DSP( const intptr_t PtrToConvert, char* pDataStruct )
//////////////////////////////////////////////////////////////////////////
inline uint32_t DSP_to_ComPtr( const char* pDataStruct, intptr_t *ThePtr)
// pDataStruct is pointing to wvComPtr in the Coefs/States
// the function reconstruct the pointer into ThePtr
// the function reconstruct the pointer into ThePtr
{
*ThePtr = UnpackComPtr(*(reinterpret_cast<const wvComPtr *>(pDataStruct)));

View file

@ -28,7 +28,7 @@
// When changing wvNS value also do the same change in Objective_C_MangledNames.h
// because CWSAUCocoaViewFactoryAsString is hard coded there
#define wvNS wvWavesV9_3
#define wvNS wvWavesV9_3
#ifdef __APPLE__
#define ObjCNameSpace(__className__) wvWavesV9_3_ ## __className__
#endif
@ -36,7 +36,7 @@
#ifdef INSIDE_NETSHELL
#define DllExport
#else
#define DllExport WPAPI_DllExport
#define DllExport WPAPI_DllExport
#endif
#define __CDECL __WPAPI_CDECL
@ -62,32 +62,32 @@
#define WIN_ONLY(__Something_only_for_windows__)
#define MAC_ONLY(__Something_only_for_mac__) __Something_only_for_mac__
#if defined(i386) || defined(__i386) || defined(__i386__)
#define kNumArchBits 32
#endif
#if defined(__x86_64) || defined(__x86_64__)
#define kNumArchBits 64
#endif
#endif
#if (__i386 || __x86_64) && !defined(__LITTLE_ENDIAN__)
#define __LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__
#endif
#if !(__i386 || __x86_64) && !defined(__BIG_ENDIAN__)
#define __BIG_ENDIAN__
#endif
#ifdef __GNUC__
#define STD_EXCEPT_WIN std
#define FAR
#define PASCAL
#define FAR
#define PASCAL
// #define HINSTANCE void*
#define WINAPI
#else
#define DllExport_WinOnly
#define STD_EXCEPT_WIN std
#define FAR
#define FAR
#define PASCAL // windows' pascal
#define HINSTANCE void*
#define WINAPI
@ -125,7 +125,7 @@
#define WUNUSED_PARAM_ON_MAC(__SOME_UNUSED_PARAM__)
#define WUNUSED_PARAM_ON_WIN(__SOME_UNUSED_PARAM__) WUNUSED_PARAM(__SOME_UNUSED_PARAM__)
#endif
#endif
#ifdef __linux__
const char* const OS_NAME = "Linux";
@ -135,18 +135,18 @@
#define DllExport_WinOnly
#define STD_EXCEPT_WIN std
#define FAR
#define PASCAL
#define FAR
#define PASCAL
// #define HINSTANCE void*
#define WINAPI
#if __i386 && !defined(__LITTLE_ENDIAN__)
#define __LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__
#endif
#if !__i386 && !defined(__BIG_ENDIAN__)
#define __BIG_ENDIAN__
#endif
#define THROW_SPEC(THROW_OBJ) throw (THROW_OBJ)
#if defined(__x86_64) || defined(__LP64__)
#error "64 bit not suported yet on linux"
#else
@ -155,11 +155,11 @@
#endif
#ifndef _WU_DECL
#define _WU_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
#define _WU_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
#endif
#ifndef _XML_DECL
#define _XML_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
#define _XML_DECL __CDECL // the default is calling model is cdecl, but you can also set this macro from the outside to something different
#endif
#ifndef kNumArchBits

View file

@ -36,16 +36,16 @@
Atoms
*********************************************************************************/
#define WTSInt64 "WTSInt64 is obsolete, please use int64_t instead";
#define WTUInt64 "WTUInt64 is obsolete, please use uint64_t instead";
#define WTSInt32 "WTSInt32 is obsolete, please use int32_t instead";
#define WTUInt32 "WTUInt32 is obsolete, please use uint32_t instead";
#define WTSInt16 "WTSInt16 is obsolete, please use int16_t instead";
#define WTUInt16 "WTUInt16 is obsolete, please use uint16_t instead";
#define WTSInt8 "WTSInt8 is obsolete, please use int8_t instead";
#define WTUInt8 "WTUInt8 is obsolete, please use uint8_t instead";
#define WTFloat32 "WTFloat32 is obsolete, please use float instead";
#define WTByte "WTByte is obsolete, please use uint8_t instead";
#define WTSInt64 "WTSInt64 is obsolete, please use int64_t instead";
#define WTUInt64 "WTUInt64 is obsolete, please use uint64_t instead";
#define WTSInt32 "WTSInt32 is obsolete, please use int32_t instead";
#define WTUInt32 "WTUInt32 is obsolete, please use uint32_t instead";
#define WTSInt16 "WTSInt16 is obsolete, please use int16_t instead";
#define WTUInt16 "WTUInt16 is obsolete, please use uint16_t instead";
#define WTSInt8 "WTSInt8 is obsolete, please use int8_t instead";
#define WTUInt8 "WTUInt8 is obsolete, please use uint8_t instead";
#define WTFloat32 "WTFloat32 is obsolete, please use float instead";
#define WTByte "WTByte is obsolete, please use uint8_t instead";
/********************************************************************************
Consts
@ -122,7 +122,7 @@ enum WESystemFolders{
eCurrentFolder,
eRootFolder,
eLibrariesFolder,
eAudioComponentsFolder, // MacOS only
eAudioComponentsFolder, // MacOS only
eCacheFolder,
eWavesCacheFolder,
eAppDataFolder,
@ -184,7 +184,7 @@ enum WEManagerInitOptions
//********************************************************************************
// Files
const uint32_t kMaxPathLength = 1023; // maximum length of a path
const uint32_t kMaxPathLength = 1023; // maximum length of a path
const uint32_t kMaxFileNameLength = 255; // maximum length of a file name including extension
typedef WCFixedString<kMaxPathLength> WTPathString;
typedef WCFixedString<kMaxFileNameLength> WTFileNameString;
@ -242,7 +242,7 @@ const WCOGLTextureRef kIllegalOGLTextureRef = 0;
const WCPluginViewRef kIllegalPluginViewRef = 0;
const WCMenuRef kIllegalWCMenuRef = 0;
const intptr_t kIllegalTexturesMaster = -1;
const intptr_t kIllegalTexturesMaster = -1;
typedef unsigned int WTTextureRef;

View file

@ -58,7 +58,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
#include <math.h>
#ifndef __GNUC__
#define __abs(x) abs(x)
#define __abs(x) abs(x)
#define __labs(x) labs(x)
#define __fabs(x) fabs(x)
#endif
@ -87,8 +87,8 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
// log2: on Windows there's no proper definition for log2, whereas on other platform there is.
#ifndef WUlog2
#if defined(PLATFORM_WINDOWS)
#define WUlog2(x) (kdOneOverLog2 * log10((x)))
#else
#define WUlog2(x) (kdOneOverLog2 * log10((x)))
#else
#define WUlog2(x) log2(x)
#endif
#endif

View file

@ -29,7 +29,7 @@
#include "BasicTypes/WUDefines.h"
#include "BasicTypes/WUTypes.h"
namespace wvNS {
namespace wvNS {
// a wraper for Microseconds function from Timer.h
class DllExport UMicroseconds
{
@ -62,7 +62,7 @@ public:
UMicroseconds& operator+=(const TimeKeeper in_timeToAdd) {theTime += in_timeToAdd; return *this;}
UMicroseconds& ReadTime();
TimeKeeper GetNativeTime() const {return theTime;}
operator uint64_t () {return static_cast<uint64_t>(theTime);}
operator double () const {return static_cast<const double>(theTime);}
@ -120,5 +120,5 @@ inline void MicrosecondDelay(double amt)
} while ((now.MicroSeconds() - than.MicroSeconds()) < amt);
}
} // namespace wvNS {
} // namespace wvNS {
#endif //#ifndef __UMicroseconds_h__

View file

@ -98,7 +98,7 @@ public:
if (in_index < m_MaxFixedStringLength)
return m_begin[in_index];
else
return m_begin[m_MaxFixedStringLength]; // in_index was too big
return m_begin[m_MaxFixedStringLength]; // in_index was too big
}
char& operator[](const pos_t in_index)
@ -106,7 +106,7 @@ public:
if (in_index < m_MaxFixedStringLength)
return m_begin[in_index];
else
return m_begin[m_MaxFixedStringLength]; // in_index was too big
return m_begin[m_MaxFixedStringLength]; // in_index was too big
}
inline size_t resize(const size_t in_newSize)
@ -236,7 +236,7 @@ public:
*m_end++ = *curr_char++;
#if kEnableDebug == 1
if (curr_char < in_chars_end) // if there wasn't enough room for some appended chars
if (curr_char < in_chars_end) // if there wasn't enough room for some appended chars
{
m_begin[0] = '@'; // mark the string as overflowed
}
@ -244,20 +244,20 @@ public:
*m_end = '\0';
}
// append from a char* in_count chars, (no \0 is required to terminate the input string)
// append from a char* in_count chars, (no \0 is required to terminate the input string)
inline void append(const char* in_chars_begin, const size_t in_count)
{
append(in_chars_begin, in_chars_begin + in_count);
}
// assign from a char* in_count chars, (no \0 is required to terminate the input string)
// assign from a char* in_count chars, (no \0 is required to terminate the input string)
inline void assign(const char* in_chars_begin, const size_t in_count)
{
clear();
append(in_chars_begin, in_chars_begin + in_count);
}
// assign from a char* , (a \0 is required to terminate the input string)
// assign from a char* , (a \0 is required to terminate the input string)
inline void assign(const char* in_chars_ptr)
{
clear();
@ -349,7 +349,7 @@ public:
*m_end++ = *pSource++;
#if kEnableDebug == 1
if (*pSource != '\0') // if there wasn't enough room for some appended chars
if (*pSource != '\0') // if there wasn't enough room for some appended chars
{
m_begin[0] = '@'; // mark the string as overflowed
}
@ -379,7 +379,7 @@ public:
WCFixedStringBase& operator<<(const size_t in_uint) {
return operator<<(static_cast<unsigned long long>(in_uint));
}
#endif
#endif
// WCFixedStringBase& operator<<(const unsigned char in_uint) {
// return operator<<(static_cast<const unsigned long long>(in_uint));
// }
@ -392,13 +392,13 @@ public:
WCFixedStringBase& operator<<(const unsigned int in_uint) {
return operator<<(static_cast<uint64_t>(in_uint));
}
#endif
#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));
}
#endif
#endif
WCFixedStringBase& operator<<(const long long in_int)
{
@ -514,7 +514,7 @@ public:
pos_t retVal = npos;
const char* pCurrChar = m_end;
while (pCurrChar != m_begin)
while (pCurrChar != m_begin)
{
--pCurrChar;
if (*pCurrChar == in_char_to_find)
@ -523,15 +523,15 @@ public:
break;
}
}
return retVal;
}
pos_t find(const char* in_chars_to_find, const pos_t in_start_from = 0) const
{
pos_t retVal = npos;
size_t to_find_size = ::strlen(in_chars_to_find);
if (to_find_size > 0 && to_find_size <= size() && in_start_from < size())
{
const char* pCurrChar = m_begin + in_start_from;
@ -543,19 +543,19 @@ public:
retVal = (pCurrChar - m_begin);
break;
}
++pCurrChar;
}
}
return retVal;
}
pos_t rfind(const char* in_chars_to_find) const
{
pos_t retVal = npos;
size_t to_find_size = ::strlen(in_chars_to_find);
if (to_find_size > 0 && to_find_size <= size())
{
const char* pCurrChar = m_end - to_find_size;
@ -567,19 +567,19 @@ public:
retVal = (pCurrChar - m_begin);
break;
}
--pCurrChar;
}
}
return retVal;
}
pos_t find_case_insensitive(const char* in_chars_to_find, const pos_t in_start_from = 0) const
{
pos_t retVal = npos;
size_t to_find_size = ::strlen(in_chars_to_find);
if (to_find_size > 0 && to_find_size <= size() && in_start_from < size())
{
const char* pCurrChar = m_begin + in_start_from;
@ -591,20 +591,20 @@ public:
if (tolower(*(pCurrChar+i)) != tolower(in_chars_to_find[i]))
break;
}
if (i == to_find_size)
{
retVal = (pCurrChar - m_begin);
break;
}
++pCurrChar;
}
}
return retVal;
}
pos_t find_first_of(const char* in_possibe_chars_to_find, const pos_t in_start_from = 0) const
{
pos_t retVal = npos;
@ -698,7 +698,7 @@ public:
bool retVal = ((size() - strlen(in_end_text)) == where) || (0 == ::strlen(in_end_text));
return retVal;
}
size_t replace(const char in_look_for, const char in_replace_with)
{
size_t retVal = 0;
@ -770,11 +770,11 @@ public:
const char* end_buffer = out_buffer + (WUMin<size_t>(in_buffer_size - 1, m_end - m_begin));
while (cur_buffer < end_buffer)
*cur_buffer++ = *cur_fixed++;
*cur_buffer = '\0';
}
}
protected:
~WCFixedStringBase() {}
@ -799,7 +799,7 @@ template<size_t kMaxFixedStringLength> class DllExport WCFixedString : public WC
{
public:
inline WCFixedString() :
inline WCFixedString() :
WCFixedStringBase(m_fixedString, kMaxFixedStringLength)
{
}
@ -889,7 +889,7 @@ typedef WCFixedString<511> WCFixedString511;
typedef WCFixedString<1023> WCFixedString1023;
typedef WCFixedString<2047> WCFixedString2047;
template<size_t kSizeOfFirst, size_t kSizeOfSecond>
template<size_t kSizeOfFirst, size_t kSizeOfSecond>
class WCFixedStringPair : public std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >
{
public:

View file

@ -44,11 +44,11 @@ const WTErr eNotJustANumber = -13; //!< expected a number and found one but
const WTErr eNegativeNumber = -14; //!< expected a positive number and found a negative
const WTErr eTimeOut = -15; //!< something timed out
const WTErr eCoreAudioFailed = -16; //!< Error in a core audio call
const WTErr eSomeThingInitailzedTwice = -17;
const WTErr eGenerateHelpInfo = -18;
const WTErr eOutOfRangeNumber = -19;
const WTErr eMacOnlyCode = -20;
const WTErr eWinOnlyCode = -21;
const WTErr eSomeThingInitailzedTwice = -17;
const WTErr eGenerateHelpInfo = -18;
const WTErr eOutOfRangeNumber = -19;
const WTErr eMacOnlyCode = -20;
const WTErr eWinOnlyCode = -21;
const WTErr eAppLaunchFailed = -22; //!< failed to launch an application
const WTErr eAppTerminateFailed = -23; //!< failed to terminate an application
const WTErr eAppReturnedError = -24; //!< Non zero exit code from application
@ -57,7 +57,7 @@ const WTErr eNotEmpty = -26; //!< Something was expected to be
const WTErr eAsioFailed = -27;
// File Manager errors
const WTErr eFMNoSuchVolume = -1001;
const WTErr eFMNoSuchVolume = -1001;
const WTErr eFMFileNotFound = -1002;
const WTErr eFMFileAllreadyExists = -1003;
const WTErr eFMAllreadyOpenWithWritePerm = -1004;
@ -71,8 +71,8 @@ const WTErr eFMReadFailed = -1011;
const WTErr eFMIllegalPathRef = -1012;
const WTErr eFMFileNotOpened = -1013;
const WTErr eFMFileSizeTooBig = -1014;
const WTErr eFMNoSuchDomain = -1015;
const WTErr eFMNoSuchSystemFolder = -1016;
const WTErr eFMNoSuchDomain = -1015;
const WTErr eFMNoSuchSystemFolder = -1016;
const WTErr eFMWrongParameters = -1017;
const WTErr eFMIsNotAFolder = -1018;
const WTErr eFMIsAFolder = -1019;
@ -113,7 +113,7 @@ const WTErr eNotAValidApplication = -2012;
// Resource Manager errors
const WTErr eRMResNotFound = -3000;
const WTErr eRMResExists = -3001; //!< a resource exist even though it's not expected to
const WTErr eRMResExists = -3001; //!< a resource exist even though it's not expected to
const WTErr eRMContainerNotFound = -3002; //!< The container was not found in the list of containers
const WTErr eRMResRefNotFound = -3003; //!< The resRef was not found in container's resource list
const WTErr eRMInvalidResRef = -3004;
@ -155,8 +155,8 @@ const WTErr eMemObjNotInitialized = -4004;
const WTErr eMemBuffTooShort = -4005; //!< the buffer in question did not have enough space for the operation
const WTErr eInstanciationFailed = -4006;
const WTErr eMemAddressSpaceError = -4007; //!< memory falls outside the legal address space
const WTErr eMemBadPointer = -4008;
const WTErr eMemOutOfMemory = -4009;
const WTErr eMemBadPointer = -4008;
const WTErr eMemOutOfMemory = -4009;
// XML Errors
const WTErr eXMLParserFailed = -6001;
@ -168,24 +168,24 @@ const WTErr eXMLElementIncomplete = -6006; //!< XML parser did not complete bu
const WTErr eXMLAttribMissing = -6007;
// Preset errors
const WTErr ePresetFileProblem = -7860;
const WTErr eInvalidFileFormatProblem = -7861;
const WTErr ePresetLockedProblem = -7862;
const WTErr ePresetInfoNotFound = -7863;
const WTErr eDuplicatePluginSpecificTag = -7959;
const WTErr ePluginSpecifcNotExisting = -7960;
const WTErr eBuffSizeToSmall = -7961;
const WTErr eCreatingPopupWhereAnItemExists = -7962;
const WTErr eDeletePluginSpecifcFailed = -7963;
const WTErr eFactoryPresetNumOutOfRange = -7964;
const WTErr eNoFactoryPresets = -7965;
const WTErr eLoadPresetToPlugin_vec_empty = -7966;
const WTErr eFactoryPresetNotFound = -7967;
const WTErr eCantCreateUserPrefFile = -7968;
const WTErr eDataFormatNotSupported = -7969;
const WTErr eCantLoadProcessFunction = -7970;
const WTErr eIllegalChunkIndex = -7971;
const WTErr eIllegalChunkID = -7972;
const WTErr ePresetFileProblem = -7860;
const WTErr eInvalidFileFormatProblem = -7861;
const WTErr ePresetLockedProblem = -7862;
const WTErr ePresetInfoNotFound = -7863;
const WTErr eDuplicatePluginSpecificTag = -7959;
const WTErr ePluginSpecifcNotExisting = -7960;
const WTErr eBuffSizeToSmall = -7961;
const WTErr eCreatingPopupWhereAnItemExists = -7962;
const WTErr eDeletePluginSpecifcFailed = -7963;
const WTErr eFactoryPresetNumOutOfRange = -7964;
const WTErr eNoFactoryPresets = -7965;
const WTErr eLoadPresetToPlugin_vec_empty = -7966;
const WTErr eFactoryPresetNotFound = -7967;
const WTErr eCantCreateUserPrefFile = -7968;
const WTErr eDataFormatNotSupported = -7969;
const WTErr eCantLoadProcessFunction = -7970;
const WTErr eIllegalChunkIndex = -7971;
const WTErr eIllegalChunkID = -7972;
const WTErr eIllegalChunkVersion = -7973;

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2014 John Emmas
Copyright (C) 2014 John Emmas
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -64,7 +64,7 @@ const WTThreadSafetyType kpthreadsmutexThreadSafety = 1;
namespace wvThread
{
//#include "BasicTypes/WavesAPISetAligment.h"
//Packing affects the layout of classes, and commonly, if packing changes across header files, there can be problems.
//Packing affects the layout of classes, and commonly, if packing changes across header files, there can be problems.
#ifdef PLATFORM_WINDOWS
#pragma pack(push)
#pragma pack(8)
@ -136,7 +136,7 @@ namespace wvThread
public:
static const ThreadHandle Invalid;
protected:
ThreadHandle(uintptr_t n) : m_oshandle(n) {}
ThreadHandle(uintptr_t n) : m_oshandle(n) {}
public:
ThreadHandle() : m_oshandle(Invalid.m_oshandle) {}
bool is_invalid() const { return !m_oshandle || m_oshandle==Invalid.m_oshandle; }
@ -160,7 +160,7 @@ namespace wvThread
//--------------------------------------------------------
class DllExport noncopyableobject
{
@ -219,7 +219,7 @@ namespace wvThread
//--------------------------------------------------------
// Thread Mutex class that is automatically initialized
class ThreadMutex : public ThreadMutexInited
class ThreadMutex : public ThreadMutexInited
{
public:
ThreadMutex() {init();}
@ -351,7 +351,7 @@ namespace wvThread
protected:
uintptr_t m_osThreadRef;
WCThreadRef(uintptr_t n) : m_osThreadRef(n) {}
WCThreadRef(uintptr_t n) : m_osThreadRef(n) {}
friend DllExport bool operator==(const WCThreadRef& first, const WCThreadRef& second);
friend DllExport bool operator!=(const WCThreadRef& first, const WCThreadRef& second);
@ -366,7 +366,7 @@ namespace wvThread
class DllExport WCAtomicLock
{
public:
public:
WCAtomicLock() : m_the_lock(0) {}
bool obtain(const uint32_t in_num_trys = 1);
void release();
@ -388,12 +388,12 @@ namespace wvThread
class WCStThreadMutexLocker
{
public:
WCStThreadMutexLocker(wvNS::wvThread::ThreadMutexInited& in_mutex) :
WCStThreadMutexLocker(wvNS::wvThread::ThreadMutexInited& in_mutex) :
m_mutex(in_mutex)
{
m_mutex.obtain();
}
~WCStThreadMutexLocker()
{
m_mutex.release();
@ -403,7 +403,7 @@ protected:
WCStThreadMutexLocker(const WCStThreadMutexLocker&);
WCStThreadMutexLocker& operator=(const WCStThreadMutexLocker&);
};
} // namespace wvThread

View file

@ -30,9 +30,9 @@
#define WPAPI_DllExport __attribute__ ((visibility("default")))
#define __WPAPI_CDECL
#define __WPAPI_STDCALL
#else
#define WPAPI_DllExport __declspec(export)
#define __WPAPI_CDECL
#define __WPAPI_STDCALL
@ -46,7 +46,7 @@
#define WPAPI_DllExport __declspec(dllexport)
#define __WPAPI_CDECL __cdecl
#define __WPAPI_STDCALL __stdcall
#endif
#endif
#ifdef __linux__

View file

@ -31,7 +31,7 @@
#endif
#ifdef __linux__
#if ! defined(__STDC_LIMIT_MACROS)
#define __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
#include <stddef.h>

View file

@ -45,6 +45,6 @@
#include <winsock2.h>
#include <windows.h>
#include <objbase.h>
#endif // #if PLATFORM_WINDOWS
#endif // #if PLATFORM_WINDOWS
#endif // #ifndef __IncludeWindows_h__

View file

@ -64,7 +64,7 @@ struct DeviceInfo
DeviceInfo():
m_DeviceId(-1), m_DeviceName("Unknown"), m_MaxInputChannels(0), m_MaxOutputChannels(0)
{};
DeviceInfo(unsigned int deviceID, const std::string & deviceName):
m_DeviceId(deviceID), m_DeviceName(deviceName), m_MaxInputChannels(0), m_MaxOutputChannels(0)
{};
@ -186,11 +186,11 @@ public:
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...
virtual uint32_t GetLatency (bool isInput); ///Get latency.
virtual WTErr UpdateDeviceInfo () = 0;
protected:
WCMRAudioDeviceManager *m_pMyManager; ///< The manager who's managing this device, can be used for sending notifications!
@ -230,7 +230,7 @@ typedef enum eAudioDeviceFilter
class WCMRAudioDeviceManager : public WCRefManager
{
public://< Public functions for the class.
WCMRAudioDeviceManager(WCMRAudioDeviceManagerClient *pTheClient, eAudioDeviceFilter eCurAudioDeviceFilter); ///< constructor
virtual ~WCMRAudioDeviceManager(void); ///< Destructor
@ -248,7 +248,7 @@ public://< Public functions for the class.
void NotifyClient (WCMRAudioDeviceManagerClient::NotificationReason forReason, void *pParam = NULL);
protected:
mutable wvNS::wvThread::ThreadMutex m_AudioDeviceInfoVecMutex; // mutex to lock device info list
DeviceInfoVec m_DeviceInfoVec;
@ -264,7 +264,7 @@ private:
virtual WTErr getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const = 0;
virtual WTErr generateDeviceListImpl() = 0;
virtual WTErr updateDeviceListImpl() = 0;
WCMRAudioDeviceManagerClient *m_pTheClient; ///< The device manager's client, used to send notifications.
};

View file

@ -37,7 +37,7 @@
#include <mach/mach.h>
#include <CoreAudio/CoreAudio.h>
#include <CoreAudio/CoreAudio.h>
//forward decl.
class WCMRCoreAudioDeviceManager;
@ -47,9 +47,9 @@ class WCMRCoreAudioDeviceManager;
// This enum is for choosing filter for audio devices scan
typedef enum eCABS_Method
{
eCABS_Simple = 0,
eCABS_Simple = 0,
eCABS_DestructiveCache,
eCABS_CacheOnDeviceSet,
eCABS_CacheOnDeviceSet,
eCABS_MethodNum // Must be last
} eCABS_Method;
@ -65,8 +65,8 @@ public:
virtual const std::string& DeviceName() const;///<Name?
virtual const std::vector<std::string>& InputChannels();///<Current Input Channel List? - note that this may change with change in sampling rate.
virtual const std::vector<std::string>& OutputChannels();///<Current Output Channel List? - note that this may change with change in sampling rate.
virtual const std::vector<int>& SamplingRates();///<Supported Sampling Rate List?
virtual int CurrentSamplingRate(); ///<Current Sampling rate.?
virtual WTErr SetCurrentSamplingRate(int newRate);///<Change Current Sampling Rate : This is a requset, might not be successful at run time!
@ -90,11 +90,11 @@ public:
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.
virtual OSStatus GetStreamLatency(AudioDeviceID deviceID, bool isInput, std::vector<int>& latencies);
protected:
AudioDeviceID m_DeviceID; ///< The CoreAudio device id
@ -186,23 +186,23 @@ public:
protected:
static OSStatus HardwarePropertyChangeCallback (AudioHardwarePropertyID inPropertyID, void* inClientData);
virtual WCMRAudioDevice* initNewCurrentDeviceImpl(const std::string & deviceName);
virtual void destroyCurrentDeviceImpl();
virtual WTErr generateDeviceListImpl();
virtual WTErr updateDeviceListImpl();
virtual WTErr getDeviceSampleRatesImpl(const std::string & deviceName, std::vector<int>& sampleRates) const;
virtual WTErr getDeviceBufferSizesImpl(const std::string & deviceName, std::vector<int>& bufferSizes) const;
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);
WTErr getDeviceMaxInputChannels(DeviceID deviceId, unsigned int& inputChannels);
WTErr getDeviceMaxOutputChannels(DeviceID deviceId, unsigned int& outputChannels);
WCMRAudioDevice* m_NoneDevice;
};

View file

@ -89,7 +89,7 @@ protected:
PaError testStateValidness(int sampleRate, int bufferSize);
///////////////////////////////////////////////////////////
static int TheCallback (const void *pInputBuffer, void *pOutputBuffer, unsigned long framesPerBuffer,
static int TheCallback (const void *pInputBuffer, void *pOutputBuffer, unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo* /*pTimeInfo*/, PaStreamCallbackFlags /*statusFlags*/, void *pUserData );
unsigned int m_DeviceID; ///< The PA device id