Switching to default dynamic lib build mode by changing base definition...

Switching to default dynamic lib build mode by changing base definition behavior. If you do not define anything, you will end up with a shared library, now.
parent a266439a
......@@ -172,16 +172,18 @@ if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
endif( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
# Windows DLL compiler flags
if( WIN32 )
add_definitions( -DITA_BASE_DLL -DITA_BASE_EXPORT )
else( WIN32 )
#add_definitions( -std=c++0x )
endif( WIN32)
# ITA defaults to shared library build mode, so extra definition is required if you want to build against a static library
if( NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS )
add_definitions( -DITA_BASE_EXPORT )
message( "Building shared ITABase library" )
else( NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS )
add_definitions( -DITA_BASE_STATIC )
message( "Building static ITABase library" )
endif( NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS )
# linker
add_library( ITABase SHARED ${ITABaseHeader} ${ITABaseSources} )
add_library( ITABase ${ITABaseHeader} ${ITABaseSources} )
target_link_libraries( ITABase ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -15,16 +15,15 @@
* ----------------------------------------------------------------
*
*/
// $Id: ITABaseDefinitions.h 2900 2012-09-17 08:42:42Z fwefers $
#ifndef INCLUDE_WATCHER_ITA_BASE_DEFINITIONS
#define INCLUDE_WATCHER_ITA_BASE_DEFINITIONS
#ifdef ITA_BASE_DLL
#if ( defined WIN32 ) && !( defined ITA_BASE_STATIC )
#ifdef ITA_BASE_EXPORT
#define ITA_BASE_API __declspec(dllexport)
#define ITA_BASE_API __declspec( dllexport )
#else
#define ITA_BASE_API __declspec(dllimport)
#define ITA_BASE_API __declspec( dllimport )
#endif
#else
#define ITA_BASE_API
......
......@@ -100,26 +100,26 @@ void libsndfileAudiofileWriter::write( int iLength, std::vector<const float*> vp
// Testen: Alle Zeiger im Vektor = Nullzeiger?
bool bNull = true;
for( unsigned int i = 0; i < vpfSource.size(); i++ )
for( size_t i = 0; i < vpfSource.size(); i++ )
if( vpfSource[ i ] ) bNull = false;
if( bNull ) return;
// Schreibpuffer mit den notwendigen Nullsamples fllen
for( unsigned int i = 0; i < vpfSource.size(); i++ )
for( size_t i = 0; i < vpfSource.size(); i++ )
if( !vpfSource[ i ] )
for( unsigned int j = 0; j < std::min( iLength, m_iWriteBufferSize ); j++ )
for( int j = 0; j < std::min( iLength, m_iWriteBufferSize ); j++ )
m_pfWriteBuffer[ j*m_props.iChannels + i ] = 0;
int n = 0; // Anzahl geschriebene Samples
while( n < iLength ) {
// Wieviele Samples werden in diesem Durchgang geschrieben?
unsigned int k = std::min( iLength - n, m_iWriteBufferSize );
int k = std::min( iLength - n, m_iWriteBufferSize );
// Daten zusammenstellen (interleaven)
for( unsigned int i = 0; i < vpfSource.size(); i++ )
for( size_t i = 0; i < vpfSource.size(); i++ )
if( vpfSource[ i ] ) {
const float* pfData = vpfSource[ i ];
for( unsigned int j = 0; j < k; j++ )
for( size_t j = 0; j < k; j++ )
m_pfWriteBuffer[ j*m_props.iChannels + i ] = pfData[ n + j ];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment