summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/audiographer/broadcast_info.h4
-rw-r--r--libs/audiographer/audiographer/debug_utils.h4
-rw-r--r--libs/audiographer/audiographer/debuggable.h14
-rw-r--r--libs/audiographer/audiographer/exception.h5
-rw-r--r--libs/audiographer/audiographer/flag_debuggable.h3
-rw-r--r--libs/audiographer/audiographer/flag_field.h6
-rw-r--r--libs/audiographer/audiographer/general/chunker.h3
-rw-r--r--libs/audiographer/audiographer/general/deinterleaver.h3
-rw-r--r--libs/audiographer/audiographer/general/interleaver.h3
-rw-r--r--libs/audiographer/audiographer/general/normalizer.h3
-rw-r--r--libs/audiographer/audiographer/general/peak_reader.h3
-rw-r--r--libs/audiographer/audiographer/general/sample_format_converter.h5
-rw-r--r--libs/audiographer/audiographer/general/silence_trimmer.h3
-rw-r--r--libs/audiographer/audiographer/general/sr_converter.h3
-rw-r--r--libs/audiographer/audiographer/general/threader.h5
-rw-r--r--libs/audiographer/audiographer/process_context.h7
-rw-r--r--libs/audiographer/audiographer/routines.h4
-rw-r--r--libs/audiographer/audiographer/sink.h4
-rw-r--r--libs/audiographer/audiographer/source.h4
-rw-r--r--libs/audiographer/audiographer/throwing.h6
-rw-r--r--libs/audiographer/audiographer/type_utils.h8
-rw-r--r--libs/audiographer/audiographer/types.h2
-rw-r--r--libs/audiographer/audiographer/utils/identity_vertex.h4
-rw-r--r--libs/audiographer/audiographer/utils/listed_source.h4
-rw-r--r--libs/audiographer/audiographer/visibility.h45
-rw-r--r--libs/audiographer/wscript32
26 files changed, 138 insertions, 49 deletions
diff --git a/libs/audiographer/audiographer/broadcast_info.h b/libs/audiographer/audiographer/broadcast_info.h
index c111156c82..cdc0aaac3a 100644
--- a/libs/audiographer/audiographer/broadcast_info.h
+++ b/libs/audiographer/audiographer/broadcast_info.h
@@ -26,12 +26,14 @@
#include <sndfile.h>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
class SndfileHandle;
-class BroadcastInfo
+class LIBAUDIOGRAPHER_API BroadcastInfo
{
public:
diff --git a/libs/audiographer/audiographer/debug_utils.h b/libs/audiographer/audiographer/debug_utils.h
index a1dad22eaf..b11f065b42 100644
--- a/libs/audiographer/audiographer/debug_utils.h
+++ b/libs/audiographer/audiographer/debug_utils.h
@@ -10,11 +10,13 @@
#include <cxxabi.h>
#endif
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
/// Utilities for debugging
-struct DebugUtils
+struct LIBAUDIOGRAPHER_API DebugUtils
{
/// Returns the demangled name of the object passed as the parameter
template<typename T>
diff --git a/libs/audiographer/audiographer/debuggable.h b/libs/audiographer/audiographer/debuggable.h
index 79e0f80dd3..6fda36c735 100644
--- a/libs/audiographer/audiographer/debuggable.h
+++ b/libs/audiographer/audiographer/debuggable.h
@@ -7,11 +7,13 @@
#include <iostream>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
/// Compile time defined debug level
-enum DebugLevel
+enum LIBAUDIOGRAPHER_API DebugLevel
{
DebugNone, ///< Disabled
DebugObject, ///< Object level stuff, ctors, initalizers etc.
@@ -36,19 +38,19 @@ enum DebugLevel
* logical and (short-circuiting).
*/
template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
-class Debuggable
+class LIBAUDIOGRAPHER_API Debuggable
{
protected:
Debuggable(std::ostream & debug_stream = std::cerr)
: stream (debug_stream) {}
bool debug_level (DebugLevel level) {
- #ifdef NDEBUG
- level = DEFAULT_DEBUG_LEVEL; /* stop pedantic gcc complaints about unused parameter */
+#ifndef NDEBUG
+ (void) level; /* stop pedantic gcc complaints about unused parameter */
return false;
- #else
+#else
return L >= level;
- #endif
+#endif
}
std::ostream & debug_stream() { return stream; }
diff --git a/libs/audiographer/audiographer/exception.h b/libs/audiographer/audiographer/exception.h
index 5583a2620b..b5141cb4c2 100644
--- a/libs/audiographer/audiographer/exception.h
+++ b/libs/audiographer/audiographer/exception.h
@@ -6,6 +6,7 @@
#include <boost/format.hpp>
+#include "audiographer/visibility.h"
#include "audiographer/debug_utils.h"
namespace AudioGrapher
@@ -14,7 +15,7 @@ namespace AudioGrapher
/** AudioGrapher Exception class.
* Automatically tells which class an exception was thrown from.
*/
-class Exception : public std::exception
+class LIBAUDIOGRAPHER_API Exception : public std::exception
{
public:
template<typename T>
@@ -38,4 +39,4 @@ class Exception : public std::exception
} // namespace AudioGrapher
-#endif // AUDIOGRAPHER_EXCEPTION_H \ No newline at end of file
+#endif // AUDIOGRAPHER_EXCEPTION_H
diff --git a/libs/audiographer/audiographer/flag_debuggable.h b/libs/audiographer/audiographer/flag_debuggable.h
index b70480cd91..5cb948a3d0 100644
--- a/libs/audiographer/audiographer/flag_debuggable.h
+++ b/libs/audiographer/audiographer/flag_debuggable.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_FLAG_DEBUGGABLE_H
#define AUDIOGRAPHER_FLAG_DEBUGGABLE_H
+#include "audiographer/visibility.h"
#include "debuggable.h"
#include "debug_utils.h"
#include "process_context.h"
@@ -13,7 +14,7 @@ namespace AudioGrapher
/// A debugging class for nodes that support a certain set of flags.
template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
-class FlagDebuggable : public Debuggable<L>
+class LIBAUDIOGRAPHER_API FlagDebuggable : public Debuggable<L>
{
public:
typedef FlagField::Flag Flag;
diff --git a/libs/audiographer/audiographer/flag_field.h b/libs/audiographer/audiographer/flag_field.h
index df81aa1766..34ab5efdd6 100644
--- a/libs/audiographer/audiographer/flag_field.h
+++ b/libs/audiographer/audiographer/flag_field.h
@@ -7,12 +7,14 @@
#include <boost/operators.hpp>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher {
/** Flag field capable of holding 32 flags.
* Easily grown in size to 64 flags by changing storage_type.
*/
-class FlagField
+class LIBAUDIOGRAPHER_API FlagField
: public boost::less_than_comparable<FlagField>
, boost::equivalent<FlagField>
, boost::equality_comparable<FlagField>
@@ -103,4 +105,4 @@ class FlagField
} // namespace
-#endif // AUDIOGRAPHER_FLAG_FIELD_H \ No newline at end of file
+#endif // AUDIOGRAPHER_FLAG_FIELD_H
diff --git a/libs/audiographer/audiographer/general/chunker.h b/libs/audiographer/audiographer/general/chunker.h
index cc46aa4575..2ff766fef3 100644
--- a/libs/audiographer/audiographer/general/chunker.h
+++ b/libs/audiographer/audiographer/general/chunker.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_CHUNKER_H
#define AUDIOGRAPHER_CHUNKER_H
+#include "audiographer/visibility.h"
#include "audiographer/flag_debuggable.h"
#include "audiographer/sink.h"
#include "audiographer/type_utils.h"
@@ -11,7 +12,7 @@ namespace AudioGrapher
/// A class that chunks process cycles into equal sized frames
template<typename T = DefaultSampleType>
-class Chunker
+class LIBAUDIOGRAPHER_API Chunker
: public ListedSource<T>
, public Sink<T>
, public FlagDebuggable<>
diff --git a/libs/audiographer/audiographer/general/deinterleaver.h b/libs/audiographer/audiographer/general/deinterleaver.h
index 96d77b1f7b..f9374b67ad 100644
--- a/libs/audiographer/audiographer/general/deinterleaver.h
+++ b/libs/audiographer/audiographer/general/deinterleaver.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_DEINTERLEAVER_H
#define AUDIOGRAPHER_DEINTERLEAVER_H
+#include "audiographer/visibility.h"
#include "audiographer/types.h"
#include "audiographer/source.h"
#include "audiographer/sink.h"
@@ -14,7 +15,7 @@ namespace AudioGrapher
/// Converts on stream of interleaved data to many streams of uninterleaved data.
template<typename T = DefaultSampleType>
-class DeInterleaver
+class LIBAUDIOGRAPHER_API DeInterleaver
: public Sink<T>
, public Throwing<>
{
diff --git a/libs/audiographer/audiographer/general/interleaver.h b/libs/audiographer/audiographer/general/interleaver.h
index 924c1d04a5..b0f0efdc66 100644
--- a/libs/audiographer/audiographer/general/interleaver.h
+++ b/libs/audiographer/audiographer/general/interleaver.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_INTERLEAVER_H
#define AUDIOGRAPHER_INTERLEAVER_H
+#include "audiographer/visibility.h"
#include "audiographer/types.h"
#include "audiographer/sink.h"
#include "audiographer/exception.h"
@@ -15,7 +16,7 @@ namespace AudioGrapher
/// Interleaves many streams of non-interleaved data into one interleaved stream
template<typename T = DefaultSampleType>
-class Interleaver
+class LIBAUDIOGRAPHER_API Interleaver
: public ListedSource<T>
, public Throwing<>
{
diff --git a/libs/audiographer/audiographer/general/normalizer.h b/libs/audiographer/audiographer/general/normalizer.h
index 48d0fe8b0b..86fe26b790 100644
--- a/libs/audiographer/audiographer/general/normalizer.h
+++ b/libs/audiographer/audiographer/general/normalizer.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_NORMALIZER_H
#define AUDIOGRAPHER_NORMALIZER_H
+#include "audiographer/visibility.h"
#include "audiographer/sink.h"
#include "audiographer/routines.h"
#include "audiographer/utils/listed_source.h"
@@ -11,7 +12,7 @@ namespace AudioGrapher
{
/// A class for normalizing to a specified target in dB
-class Normalizer
+class LIBAUDIOGRAPHER_API Normalizer
: public ListedSource<float>
, public Sink<float>
, public Throwing<>
diff --git a/libs/audiographer/audiographer/general/peak_reader.h b/libs/audiographer/audiographer/general/peak_reader.h
index a257621cde..208a8989df 100644
--- a/libs/audiographer/audiographer/general/peak_reader.h
+++ b/libs/audiographer/audiographer/general/peak_reader.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_PEAK_READER_H
#define AUDIOGRAPHER_PEAK_READER_H
+#include "audiographer/visibility.h"
#include "audiographer/sink.h"
#include "audiographer/routines.h"
#include "audiographer/utils/listed_source.h"
@@ -9,7 +10,7 @@ namespace AudioGrapher
{
/// A class that reads the maximum value from a stream
-class PeakReader : public ListedSource<float>, public Sink<float>
+class LIBAUDIOGRAPHER_API PeakReader : public ListedSource<float>, public Sink<float>
{
public:
/// Constructor \n RT safe
diff --git a/libs/audiographer/audiographer/general/sample_format_converter.h b/libs/audiographer/audiographer/general/sample_format_converter.h
index a200f37825..62500d42dc 100644
--- a/libs/audiographer/audiographer/general/sample_format_converter.h
+++ b/libs/audiographer/audiographer/general/sample_format_converter.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_SAMPLE_FORMAT_CONVERTER_H
#define AUDIOGRAPHER_SAMPLE_FORMAT_CONVERTER_H
+#include "audiographer/visibility.h"
#include "audiographer/sink.h"
#include "audiographer/utils/listed_source.h"
#include "private/gdither/gdither_types.h"
@@ -9,7 +10,7 @@ namespace AudioGrapher
{
/// Dither types from the gdither library
-enum DitherType
+enum LIBAUDIOGRAPHER_API DitherType
{
D_None = GDitherNone, ///< No didtering
D_Rect = GDitherRect, ///< Rectangular dithering, i.e. white noise
@@ -21,7 +22,7 @@ enum DitherType
* This class can only convert floats to either \a float, \a int32_t, \a int16_t, or \a uint8_t
*/
template <typename TOut>
-class SampleFormatConverter
+class LIBAUDIOGRAPHER_API SampleFormatConverter
: public Sink<float>
, public ListedSource<TOut>
, public Throwing<>
diff --git a/libs/audiographer/audiographer/general/silence_trimmer.h b/libs/audiographer/audiographer/general/silence_trimmer.h
index d292515eb8..4cb9f9a5d9 100644
--- a/libs/audiographer/audiographer/general/silence_trimmer.h
+++ b/libs/audiographer/audiographer/general/silence_trimmer.h
@@ -1,6 +1,7 @@
#ifndef AUDIOGRAPHER_SILENCE_TRIMMER_H
#define AUDIOGRAPHER_SILENCE_TRIMMER_H
+#include "audiographer/visibility.h"
#include "audiographer/debug_utils.h"
#include "audiographer/flag_debuggable.h"
#include "audiographer/sink.h"
@@ -13,7 +14,7 @@ namespace AudioGrapher {
/// Removes and adds silent frames to beginning and/or end of stream
template<typename T = DefaultSampleType>
-class SilenceTrimmer
+class LIBAUDIOGRAPHER_API SilenceTrimmer
: public ListedSource<T>
, public Sink<T>
, public FlagDebuggable<>
diff --git a/libs/audiographer/audiographer/general/sr_converter.h b/libs/audiographer/audiographer/general/sr_converter.h
index a3298bbf97..0cbe3bd294 100644
--- a/libs/audiographer/audiographer/general/sr_converter.h
+++ b/libs/audiographer/audiographer/general/sr_converter.h
@@ -3,6 +3,7 @@
#include <samplerate.h>
+#include "audiographer/visibility.h"
#include "audiographer/flag_debuggable.h"
#include "audiographer/sink.h"
#include "audiographer/throwing.h"
@@ -13,7 +14,7 @@ namespace AudioGrapher
{
/// Samplerate converter
-class SampleRateConverter
+class LIBAUDIOGRAPHER_API SampleRateConverter
: public ListedSource<float>
, public Sink<float>
, public FlagDebuggable<>
diff --git a/libs/audiographer/audiographer/general/threader.h b/libs/audiographer/audiographer/general/threader.h
index d1e11c00e1..98c6145ee9 100644
--- a/libs/audiographer/audiographer/general/threader.h
+++ b/libs/audiographer/audiographer/general/threader.h
@@ -10,6 +10,7 @@
#include <vector>
#include <algorithm>
+#include "audiographer/visibility.h"
#include "audiographer/source.h"
#include "audiographer/sink.h"
#include "audiographer/exception.h"
@@ -18,7 +19,7 @@ namespace AudioGrapher
{
/// Class that stores exceptions thrown from different threads
-class ThreaderException : public Exception
+class LIBAUDIOGRAPHER_API ThreaderException : public Exception
{
public:
template<typename T>
@@ -32,7 +33,7 @@ class ThreaderException : public Exception
/// Class for distributing processing across several threads
template <typename T = DefaultSampleType>
-class Threader : public Source<T>, public Sink<T>
+class LIBAUDIOGRAPHER_API Threader : public Source<T>, public Sink<T>
{
private:
typedef std::vector<typename Source<T>::SinkPtr> OutputVec;
diff --git a/libs/audiographer/audiographer/process_context.h b/libs/audiographer/audiographer/process_context.h
index 15128ab4ea..61b95a2aa4 100644
--- a/libs/audiographer/audiographer/process_context.h
+++ b/libs/audiographer/audiographer/process_context.h
@@ -5,6 +5,7 @@
#include <boost/type_traits.hpp>
#include <boost/format.hpp>
+#include "audiographer/visibility.h"
#include "exception.h"
#include "debug_utils.h"
#include "types.h"
@@ -21,7 +22,7 @@ namespace AudioGrapher
*/
template <typename T = DefaultSampleType>
-class ProcessContext
+class LIBAUDIOGRAPHER_API ProcessContext
: public Throwing<>
{
// Support older compilers that don't support template base class initialization without template parameters
@@ -125,7 +126,7 @@ protected:
/// A process context that allocates and owns it's data buffer
template <typename T = DefaultSampleType>
-class AllocatingProcessContext : public ProcessContext<T>
+class LIBAUDIOGRAPHER_API AllocatingProcessContext : public ProcessContext<T>
{
public:
/// Allocates uninitialized memory
@@ -162,7 +163,7 @@ public:
/// A wrapper for a const ProcesContext which can be created from const data
template <typename T = DefaultSampleType>
-class ConstProcessContext
+class LIBAUDIOGRAPHER_API ConstProcessContext
{
public:
/// Basic constructor with data, frame and channel count
diff --git a/libs/audiographer/audiographer/routines.h b/libs/audiographer/audiographer/routines.h
index b3b7f0921b..4ab3bc5fb5 100644
--- a/libs/audiographer/audiographer/routines.h
+++ b/libs/audiographer/audiographer/routines.h
@@ -5,11 +5,13 @@
#include <cmath>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
/// Allows overriding some routines with more efficient ones.
-class Routines
+class LIBAUDIOGRAPHER_API Routines
{
public:
typedef uint32_t uint_type;
diff --git a/libs/audiographer/audiographer/sink.h b/libs/audiographer/audiographer/sink.h
index 0a7004464e..84f7e12e40 100644
--- a/libs/audiographer/audiographer/sink.h
+++ b/libs/audiographer/audiographer/sink.h
@@ -5,6 +5,8 @@
#include "process_context.h"
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
@@ -12,7 +14,7 @@ namespace AudioGrapher
* This is a pure virtual interface for all data sinks in AudioGrapher
*/
template <typename T>
-class Sink {
+class LIBAUDIOGRAPHER_API Sink {
public:
virtual ~Sink () {}
diff --git a/libs/audiographer/audiographer/source.h b/libs/audiographer/audiographer/source.h
index deefb900ee..9a3f80719b 100644
--- a/libs/audiographer/audiographer/source.h
+++ b/libs/audiographer/audiographer/source.h
@@ -6,6 +6,8 @@
#include <boost/shared_ptr.hpp>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
@@ -13,7 +15,7 @@ namespace AudioGrapher
* This is a pure virtual interface for all data sources in AudioGrapher
*/
template<typename T>
-class Source
+class LIBAUDIOGRAPHER_API Source
{
public:
virtual ~Source () { }
diff --git a/libs/audiographer/audiographer/throwing.h b/libs/audiographer/audiographer/throwing.h
index eefade1db0..e02958a521 100644
--- a/libs/audiographer/audiographer/throwing.h
+++ b/libs/audiographer/audiographer/throwing.h
@@ -5,6 +5,8 @@
#define DEFAULT_THROW_LEVEL ThrowStrict
#endif
+#include "audiographer/visibility.h"
+
namespace AudioGrapher
{
@@ -14,7 +16,7 @@ namespace AudioGrapher
* However, if you want ultra-optimized code and/or don't care about handling
* error situations, feel free to use whatever you want.
*/
-enum ThrowLevel
+enum LIBAUDIOGRAPHER_API ThrowLevel
{
ThrowNone, ///< Not allowed to throw
ThrowObject, ///< Object level stuff, ctors, initalizers etc.
@@ -38,7 +40,7 @@ enum ThrowLevel
* logical and (short-circuiting).
*/
template<ThrowLevel L = DEFAULT_THROW_LEVEL>
-class Throwing
+class LIBAUDIOGRAPHER_API Throwing
{
protected:
Throwing() {}
diff --git a/libs/audiographer/audiographer/type_utils.h b/libs/audiographer/audiographer/type_utils.h
index 1d4754dee9..a7c38fc660 100644
--- a/libs/audiographer/audiographer/type_utils.h
+++ b/libs/audiographer/audiographer/type_utils.h
@@ -1,18 +1,20 @@
#ifndef AUDIOGRAPHER_TYPE_UTILS_H
#define AUDIOGRAPHER_TYPE_UTILS_H
-#include "audiographer/types.h"
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <memory>
#include <algorithm>
#include <cstring>
+#include "audiographer/visibility.h"
+#include "audiographer/types.h"
+
namespace AudioGrapher
{
/// Non-template base class for TypeUtils
-class TypeUtilsBase
+class LIBAUDIOGRAPHER_API TypeUtilsBase
{
protected:
@@ -27,7 +29,7 @@ class TypeUtilsBase
/// Utilities for initializing, copying, moving, etc. data
template<typename T = DefaultSampleType>
-class TypeUtils : private TypeUtilsBase
+class LIBAUDIOGRAPHER_API TypeUtils : private TypeUtilsBase
{
BOOST_STATIC_ASSERT (boost::has_trivial_destructor<T>::value);
diff --git a/libs/audiographer/audiographer/types.h b/libs/audiographer/audiographer/types.h
index ae98cde7bd..4288dce0c6 100644
--- a/libs/audiographer/audiographer/types.h
+++ b/libs/audiographer/audiographer/types.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#include "audiographer/visibility.h"
+
namespace AudioGrapher {
/* XXX: copied from libardour */
diff --git a/libs/audiographer/audiographer/utils/identity_vertex.h b/libs/audiographer/audiographer/utils/identity_vertex.h
index 147939a7c5..1d7ed80697 100644
--- a/libs/audiographer/audiographer/utils/identity_vertex.h
+++ b/libs/audiographer/audiographer/utils/identity_vertex.h
@@ -1,6 +1,8 @@
#ifndef AUDIOGRAPHER_IDENTITY_VERTEX_H
#define AUDIOGRAPHER_IDENTITY_VERTEX_H
+#include "audiographer/visibility.h"
+#include "audiographer/types.h"
#include "audiographer/utils/listed_source.h"
#include "audiographer/sink.h"
@@ -9,7 +11,7 @@ namespace AudioGrapher
/// Outputs its input directly to a number of Sinks
template<typename T = DefaultSampleType>
-class IdentityVertex : public ListedSource<T>, Sink<T>
+class LIBAUDIOGRAPHER_API IdentityVertex : public ListedSource<T>, Sink<T>
{
public:
void process (ProcessContext<T> const & c) { ListedSource<T>::output(c); }
diff --git a/libs/audiographer/audiographer/utils/listed_source.h b/libs/audiographer/audiographer/utils/listed_source.h
index b030281207..6ceab6b27f 100644
--- a/libs/audiographer/audiographer/utils/listed_source.h
+++ b/libs/audiographer/audiographer/utils/listed_source.h
@@ -1,6 +1,8 @@
#ifndef AUDIOGRAPHER_LISTED_SOURCE_H
#define AUDIOGRAPHER_LISTED_SOURCE_H
+#include "audiographer/visibility.h"
+#include "audiographer/types.h"
#include "audiographer/types.h"
#include "audiographer/source.h"
@@ -11,7 +13,7 @@ namespace AudioGrapher
/// An generic \a Source that uses a \a std::list for managing outputs
template<typename T = DefaultSampleType>
-class ListedSource : public Source<T>
+class LIBAUDIOGRAPHER_API ListedSource : public Source<T>
{
public:
void add_output (typename Source<T>::SinkPtr output) { outputs.push_back(output); }
diff --git a/libs/audiographer/audiographer/visibility.h b/libs/audiographer/audiographer/visibility.h
new file mode 100644
index 0000000000..31a7511f8b
--- /dev/null
+++ b/libs/audiographer/audiographer/visibility.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2013 Paul Davis
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __libaudiographer_visibility_h__
+#define __libaudiographer_visibility_h__
+
+#if defined(COMPILER_MSVC)
+ #define LIBAUDIOGRAPHER_DLL_IMPORT __declspec(dllimport)
+ #define LIBAUDIOGRAPHER_DLL_EXPORT __declspec(dllexport)
+ #define LIBAUDIOGRAPHER_DLL_LOCAL
+#else
+ #define LIBAUDIOGRAPHER_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #define LIBAUDIOGRAPHER_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define LIBAUDIOGRAPHER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
+#endif
+
+#ifdef LIBAUDIOGRAPHER_STATIC // libaudiographer is not a DLL
+ #define LIBAUDIOGRAPHER_API
+ #define LIBAUDIOGRAPHER_LOCAL
+#else
+ #ifdef LIBAUDIOGRAPHER_DLL_EXPORTS // defined if we are building the libaudiographer DLL (instead of using it)
+ #define LIBAUDIOGRAPHER_API LIBAUDIOGRAPHER_DLL_EXPORT
+ #else
+ #define LIBAUDIOGRAPHER_API LIBAUDIOGRAPHER_DLL_IMPORT
+ #endif
+ #define LIBAUDIOGRAPHER_LOCAL LIBAUDIOGRAPHER_DLL_LOCAL
+#endif
+
+#endif /* __libaudiographer_visibility_h__ */
diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript
index 66f4e80b72..183b272518 100644
--- a/libs/audiographer/wscript
+++ b/libs/audiographer/wscript
@@ -54,19 +54,27 @@ def build(bld):
and bld.is_defined('HAVE_GLIBMM')
and bld.is_defined('HAVE_GTHREAD'))
- audiographer = bld(features = 'cxx cxxshlib')
- audiographer.source = '''
- private/gdither/gdither.cc
- src/general/sample_format_converter.cc
- src/routines.cc
- src/debug_utils.cc
- src/general/broadcast_info.cc
- '''
-
+ audiographer_sources = [
+ 'private/gdither/gdither.cc',
+ 'src/general/sample_format_converter.cc',
+ 'src/routines.cc',
+ 'src/debug_utils.cc',
+ 'src/general/broadcast_info.cc'
+ ]
if bld.is_defined('HAVE_SAMPLERATE'):
- audiographer.source += '''
- src/general/sr_converter.cc
- '''
+ audiographer_sources += [ 'src/general/sr_converter.cc' ]
+
+ if bld.is_defined ('INTERNAL_SHARED_LIBS'):
+ audiographer = bld.shlib(features = 'c cxx cshlib cxxshlib', source=audiographer_sources)
+ # macros for this shared library
+ audiographer.defines = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ]
+ audiographer.cflags = [ '-fvisibility=hidden' ]
+ audiographer.cxxflags = [ '-fvisibility=hidden' ]
+ else:
+ audiographer = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
+ audiographer.cxxflags = [ '-fPIC' ]
+ audiographer.cflags = [ '-fPIC' ]
+ audiographer.defines = []
audiographer.name = 'libaudiographer'
audiographer.target = 'audiographer'