Browse Source

Misc

tags/1.9.4
falkTX 11 years ago
parent
commit
9d5b61c3bb
6 changed files with 23 additions and 23 deletions
  1. +3
    -3
      source/includes/CarlaDefines.h
  2. +1
    -1
      source/utils/CarlaLadspaUtils.hpp
  3. +4
    -4
      source/utils/CarlaLibUtils.hpp
  4. +2
    -7
      source/utils/CarlaMutex.hpp
  5. +1
    -1
      source/utils/CarlaThread.hpp
  6. +12
    -7
      source/utils/CarlaUtils.hpp

+ 3
- 3
source/includes/CarlaDefines.h View File

@@ -1,6 +1,6 @@
/*
* Carla common defines
* Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -24,8 +24,8 @@
#endif

/* Set Version */
#define CARLA_VERSION_HEX 0x01091
#define CARLA_VERSION_STRING "1.9.1"
#define CARLA_VERSION_HEX 0x01092
#define CARLA_VERSION_STRING "1.9.2"

/* Check OS */
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)


+ 1
- 1
source/utils/CarlaLadspaUtils.hpp View File

@@ -140,7 +140,7 @@ bool is_ladspa_rdf_descriptor_valid(const LADSPA_RDF_Descriptor* const rdfDescri
// Get default control port value

static inline
LADSPA_Data get_default_ladspa_port_value(const LADSPA_PortRangeHintDescriptor hintDescriptor, const LADSPA_Data min, const LADSPA_Data max) noexcept
LADSPA_Data get_default_ladspa_port_value(const LADSPA_PortRangeHintDescriptor hintDescriptor, const LADSPA_Data min, const LADSPA_Data max)
{
if (LADSPA_IS_HINT_HAS_DEFAULT(hintDescriptor))
{


+ 4
- 4
source/utils/CarlaLibUtils.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla library utils
* Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -34,7 +34,7 @@
static inline
void* lib_open(const char* const filename)
{
CARLA_SAFE_ASSERT_RETURN(filename != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(filename != nullptr && filename[0] != '\0', nullptr);

#ifdef CARLA_OS_WIN
return (void*)LoadLibraryA(filename);
@@ -67,7 +67,7 @@ static inline
void* lib_symbol(void* const lib, const char* const symbol)
{
CARLA_SAFE_ASSERT_RETURN(lib != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(symbol != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(symbol != nullptr && symbol[0] != '\0', nullptr);

#ifdef CARLA_OS_WIN
return (void*)GetProcAddress((HMODULE)lib, symbol);
@@ -82,7 +82,7 @@ void* lib_symbol(void* const lib, const char* const symbol)
static inline
const char* lib_error(const char* const filename)
{
CARLA_SAFE_ASSERT_RETURN(filename != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(filename != nullptr && filename[0] != '\0', nullptr);

#ifdef CARLA_OS_WIN
static char libError[2048+1];


+ 2
- 7
source/utils/CarlaMutex.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla Mutex
* Copyright (C) 2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -34,12 +34,7 @@ public:
CarlaMutex() noexcept
: fTryLockWasCalled(false)
{
//pthread_mutexattr_t atts;
//pthread_mutexattr_init(&atts);
//pthread_mutexattr_settype(&atts, PTHREAD_MUTEX_RECURSIVE);

pthread_mutex_init(&fMutex, nullptr /*&atts*/);
//pthread_mutexattr_destroy(&atts);
pthread_mutex_init(&fMutex, nullptr);
}

/*


+ 1
- 1
source/utils/CarlaThread.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla Thread
* Copyright (C) 2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as


+ 12
- 7
source/utils/CarlaUtils.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla common utils
* Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -325,8 +325,7 @@ void carla_copy(T* dataDst, T* dataSrc, const size_t size) noexcept
CARLA_SAFE_ASSERT_RETURN(dataSrc != nullptr,);
CARLA_SAFE_ASSERT_RETURN(size > 0,);

for (size_t i=0; i < size; ++i)
*dataDst++ = *dataSrc++;
std::memcpy(dataDst, dataSrc, size*sizeof(T));
}

/*
@@ -340,8 +339,7 @@ void carla_copy(T* dataDst, const T* dataSrc, const size_t size) noexcept
CARLA_SAFE_ASSERT_RETURN(dataSrc != nullptr,);
CARLA_SAFE_ASSERT_RETURN(size > 0,);

for (size_t i=0; i < size; ++i)
*dataDst++ = *dataSrc++;
std::memcpy(dataDst, dataSrc, size*sizeof(T));
}

/*
@@ -354,8 +352,15 @@ void carla_fill(T* data, const size_t size, const T v) noexcept
CARLA_SAFE_ASSERT_RETURN(data != nullptr,);
CARLA_SAFE_ASSERT_RETURN(size > 0,);

for (size_t i=0; i < size; ++i)
*data++ = v;
if (v == 0)
{
std::memset(data, 0, size*sizeof(T));
}
else
{
for (size_t i=0; i < size; ++i)
*data++ = v;
}
}

// -----------------------------------------------------------------------


Loading…
Cancel
Save