'libs/audiographer' - DLL visibility stuff and associated changes needed for building...
authorJohn Emmas <johne53@tiscali.co.uk>
Mon, 13 Jan 2014 14:58:04 +0000 (14:58 +0000)
committerJohn Emmas <johne53@tiscali.co.uk>
Mon, 13 Jan 2014 14:58:04 +0000 (14:58 +0000)
17 files changed:
libs/audiographer/audiographer/debuggable.h
libs/audiographer/audiographer/flag_debuggable.h
libs/audiographer/audiographer/general/chunker.h
libs/audiographer/audiographer/general/deinterleaver.h
libs/audiographer/audiographer/general/interleaver.h
libs/audiographer/audiographer/general/normalizer.h
libs/audiographer/audiographer/general/peak_reader.h
libs/audiographer/audiographer/general/sample_format_converter.h
libs/audiographer/audiographer/general/silence_trimmer.h
libs/audiographer/audiographer/general/threader.h
libs/audiographer/audiographer/process_context.h
libs/audiographer/audiographer/sink.h
libs/audiographer/audiographer/source.h
libs/audiographer/audiographer/throwing.h
libs/audiographer/audiographer/type_utils.h
libs/audiographer/audiographer/utils/identity_vertex.h
libs/audiographer/audiographer/utils/listed_source.h

index fc03d1e68defad29feb1598077417dcae51536a9..8fe48159de60a2a7eb5ef0d1e8c6c1a3215a3c2b 100644 (file)
@@ -38,7 +38,7 @@ enum LIBAUDIOGRAPHER_API DebugLevel
   * logical and (short-circuiting).
   */
 template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
-class LIBAUDIOGRAPHER_API Debuggable
+class /*LIBAUDIOGRAPHER_API*/ Debuggable
 {
   protected:
        Debuggable(std::ostream & debug_stream = std::cerr)
index 5cb948a3d082c566ad50c648bfde352a8429107c..7ff6a79ed16239d053f560e1a8a70d1a30bc045e 100644 (file)
@@ -14,7 +14,7 @@ namespace AudioGrapher
 
 /// A debugging class for nodes that support a certain set of flags.
 template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
-class LIBAUDIOGRAPHER_API FlagDebuggable : public Debuggable<L>
+class /*LIBAUDIOGRAPHER_API*/ FlagDebuggable : public Debuggable<L>
 {
   public:
        typedef FlagField::Flag Flag;
index 2ff766fef3497c2839e8d566d226a0bbb58fbc67..0ee0c20b208152b80c2bd1df8241cd635fb9f592 100644 (file)
@@ -12,7 +12,7 @@ namespace AudioGrapher
 
 /// A class that chunks process cycles into equal sized frames
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API Chunker
+class /*LIBAUDIOGRAPHER_API*/ Chunker
   : public ListedSource<T>
   , public Sink<T>
   , public FlagDebuggable<>
index f9374b67ad71d572bd07c367e798f61f71916be7..fac38912d773245e17ee1ba3271d0e64f3431394 100644 (file)
@@ -15,7 +15,7 @@ namespace AudioGrapher
 
 /// Converts on stream of interleaved data to many streams of uninterleaved data.
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API DeInterleaver
+class /*LIBAUDIOGRAPHER_API*/ DeInterleaver
   : public Sink<T>
   , public Throwing<>
 {
index b0f0efdc662de83ad0c3a8f2e2200c3d37c42bce..fe174c9fcbe75364473c0851ee832898c2fc9bc3 100644 (file)
@@ -16,7 +16,7 @@ namespace AudioGrapher
 
 /// Interleaves many streams of non-interleaved data into one interleaved stream
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API Interleaver
+class /*LIBAUDIOGRAPHER_API*/ Interleaver
   : public ListedSource<T>
   , public Throwing<>
 {
index 86fe26b790ca2b0fd4cd5bb80e67335c361df379..e95f0e385229429abfec02d417de244bc7d1e181 100644 (file)
@@ -6,8 +6,6 @@
 #include "audiographer/routines.h"
 #include "audiographer/utils/listed_source.h"
 
-#include <cstring>
-
 namespace AudioGrapher
 {
 
@@ -17,71 +15,28 @@ class LIBAUDIOGRAPHER_API Normalizer
   , public Sink<float>
   , public Throwing<>
 {
-  public:
+public:
        /// Constructs a normalizer with a specific target in dB \n RT safe
-       Normalizer (float target_dB)
-         : enabled (false)
-         , buffer (0)
-         , buffer_size (0)
-       {
-               target = pow (10.0f, target_dB * 0.05f);
-       }
-       
-       ~Normalizer()
-       {
-               delete [] buffer;
-       }
+       Normalizer (float target_dB);
+       ~Normalizer();
 
        /// Sets the peak found in the material to be normalized \see PeakReader \n RT safe
-       void set_peak (float peak)
-       {
-               if (peak == 0.0f || peak == target) {
-                       /* don't even try */
-                       enabled = false;
-               } else {
-                       enabled = true;
-                       gain = target / peak;
-               }
-       }
+       void set_peak (float peak);
 
        /** Allocates a buffer for using with const ProcessContexts
          * This function does not need to be called if
          * non-const ProcessContexts are given to \a process() .
          * \n Not RT safe
          */
-       void alloc_buffer(framecnt_t frames)
-       {
-               delete [] buffer;
-               buffer = new float[frames];
-               buffer_size = frames;
-       }
+       void alloc_buffer(framecnt_t frames);
 
        /// Process a const ProcessContext \see alloc_buffer() \n RT safe
-       void process (ProcessContext<float> const & c)
-       {
-               if (throw_level (ThrowProcess) && c.frames() > buffer_size) {
-                       throw Exception (*this, "Too many frames given to process()");
-               }
-               
-               if (enabled) {
-                       memcpy (buffer, c.data(), c.frames() * sizeof(float));
-                       Routines::apply_gain_to_buffer (buffer, c.frames(), gain);
-               }
-               
-               ProcessContext<float> c_out (c, buffer);
-               ListedSource<float>::output (c_out);
-       }
+       void process (ProcessContext<float> const & c);
        
        /// Process a non-const ProcsesContext in-place \n RT safe
-       void process (ProcessContext<float> & c)
-       {
-               if (enabled) {
-                       Routines::apply_gain_to_buffer (c.data(), c.frames(), gain);
-               }
-               ListedSource<float>::output(c);
-       }
-       
-  private:
+       void process (ProcessContext<float> & c);
+
+private:
        bool      enabled;
        float     target;
        float     gain;
index 208a8989dfec2aa32daddafba081044a42f435df..dd5d65491c46824b6a889db90a4222a3b4fad4c3 100644 (file)
@@ -10,7 +10,7 @@ namespace AudioGrapher
 {
 
 /// A class that reads the maximum value from a stream
-class LIBAUDIOGRAPHER_API PeakReader : public ListedSource<float>, public Sink<float>
+class /*LIBAUDIOGRAPHER_API*/ PeakReader : public ListedSource<float>, public Sink<float>
 {
   public:
        /// Constructor \n RT safe
index 62500d42dcfa12c9adf59630d2b5432cf56217f3..b2efc69cabf2f03542c135223d8b7faa78d5c409 100644 (file)
@@ -10,7 +10,7 @@ namespace AudioGrapher
 {
 
 /// Dither types from the gdither library
-enum LIBAUDIOGRAPHER_API DitherType
+enum /*LIBAUDIOGRAPHER_API*/ DitherType
 {
        D_None   = GDitherNone,   ///< No didtering
        D_Rect   = GDitherRect,   ///< Rectangular dithering, i.e. white noise
index 8a8dd920f5295f9b7f1310b5bd2d7ac5536b2085..165b29d4d5e5c1fa1ad73af60faab91ebd0e0aee 100644 (file)
@@ -14,7 +14,7 @@ namespace AudioGrapher {
 
 /// Removes and adds silent frames to beginning and/or end of stream
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API SilenceTrimmer
+class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
   : public ListedSource<T>
   , public Sink<T>
   , public FlagDebuggable<>
index 98c6145ee97a8d348dd0091664bac9c7db3363a3..e9a953ce44cdef60c532ecf7014e664a4ad231d4 100644 (file)
@@ -19,7 +19,7 @@ namespace AudioGrapher
 {
 
 /// Class that stores exceptions thrown from different threads
-class LIBAUDIOGRAPHER_API ThreaderException : public Exception
+class /*LIBAUDIOGRAPHER_API*/ ThreaderException : public Exception
 {
   public:
        template<typename T>
@@ -33,7 +33,7 @@ class LIBAUDIOGRAPHER_API ThreaderException : public Exception
 
 /// Class for distributing processing across several threads
 template <typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API 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;
index 61b95a2aa4250d67a30e3f0d6383a52d72900b10..36abd4fba0ddd477728912efeeb9f31f872cd288 100644 (file)
@@ -22,7 +22,7 @@ namespace AudioGrapher
  */
 
 template <typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API ProcessContext
+class /*LIBAUDIOGRAPHER_API*/ ProcessContext
   : public Throwing<>
 {
        // Support older compilers that don't support template base class initialization without template parameters
@@ -126,7 +126,7 @@ protected:
 
 /// A process context that allocates and owns it's data buffer
 template <typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API AllocatingProcessContext : public ProcessContext<T>
+class /*LIBAUDIOGRAPHER_API*/ AllocatingProcessContext : public ProcessContext<T>
 {
 public:
        /// Allocates uninitialized memory
@@ -163,7 +163,7 @@ public:
 
 /// A wrapper for a const ProcesContext which can be created from const data
 template <typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API ConstProcessContext
+class /*LIBAUDIOGRAPHER_API*/ ConstProcessContext
 {
   public:
        /// Basic constructor with data, frame and channel count
index 84f7e12e4041d3dfdd8c9fb5930899c85cf2f164..e4248e8c33be80f605cd0d5d2cf84c3ed9123229 100644 (file)
@@ -14,7 +14,7 @@ namespace AudioGrapher
   * This is a pure virtual interface for all data sinks in AudioGrapher
   */
 template <typename T>
-class LIBAUDIOGRAPHER_API Sink  {
+class /*LIBAUDIOGRAPHER_API*/ Sink  {
   public:
        virtual ~Sink () {}
        
index 9a3f80719b2e0c3c5e83d16658b1a15848ed16de..945cb13298d404419a9c1eff61e16bcab479ce96 100644 (file)
@@ -15,7 +15,7 @@ namespace AudioGrapher
   * This is a pure virtual interface for all data sources in AudioGrapher
   */
 template<typename T>
-class LIBAUDIOGRAPHER_API Source
+class /*LIBAUDIOGRAPHER_API*/ Source
 {
   public:
        virtual ~Source () { }
index e02958a5214632ef0c6b3e8ad12e640c0f54cfe8..ecf7aecd4934f755b67def48c352fdfd8058344a 100644 (file)
@@ -16,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 LIBAUDIOGRAPHER_API ThrowLevel
+enum /*LIBAUDIOGRAPHER_API*/ ThrowLevel
 {
        ThrowNone,     ///< Not allowed to throw
        ThrowObject,   ///< Object level stuff, ctors, initalizers etc.
@@ -40,7 +40,7 @@ enum LIBAUDIOGRAPHER_API ThrowLevel
   * logical and (short-circuiting).
   */
 template<ThrowLevel L = DEFAULT_THROW_LEVEL>
-class LIBAUDIOGRAPHER_API Throwing
+class /*LIBAUDIOGRAPHER_API*/ Throwing
 {
   protected:
        Throwing() {}
index a7c38fc66085269528b9dc2ce34bbd8e39232229..7245822e2601e4ce72aad46804a76faab0fc9ce9 100644 (file)
@@ -29,7 +29,7 @@ class LIBAUDIOGRAPHER_API TypeUtilsBase
 
 /// Utilities for initializing, copying, moving, etc. data
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API TypeUtils : private TypeUtilsBase
+class /*LIBAUDIOGRAPHER_API*/ TypeUtils : private TypeUtilsBase
 {
        BOOST_STATIC_ASSERT (boost::has_trivial_destructor<T>::value);
        
index 1d7ed806978387de0a0410e2795fb82a06225c58..5c9cfc99341d5a79f65406b881dadf5e72b3421b 100644 (file)
@@ -11,7 +11,7 @@ namespace AudioGrapher
 
 /// Outputs its input directly to a number of Sinks
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API 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); }
index 6ceab6b27f2939e64c8c86f29e6f6f5fc483c3d6..b9bfbc65f887497acd63a14cd4850799f32191b1 100644 (file)
@@ -13,7 +13,7 @@ namespace AudioGrapher
 
 /// An generic \a Source that uses a \a std::list for managing outputs
 template<typename T = DefaultSampleType>
-class LIBAUDIOGRAPHER_API ListedSource : public Source<T>
+class /*LIBAUDIOGRAPHER_API*/ ListedSource : public Source<T>
 {
   public:
        void add_output (typename Source<T>::SinkPtr output) { outputs.push_back(output); }