build system and minor code changes to work with new mixercoresg framework

git-svn-id: svn://localhost/ardour2/branches/3.0-SG@13104 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-08-02 00:02:32 +00:00
parent 6e824e7797
commit 576f73e032
6 changed files with 44 additions and 20 deletions

View file

@ -29,7 +29,7 @@
#include <boost/function.hpp>
#include <WavesPublicAPI/WTErr.h>
#include <WavesPublicAPI/WavesMixerAPI/1.0/WavesMixerAPI.h>
#include <WavesMixerAPI/1.0/WavesMixerAPI.h>
#include "pbd/signals.h"
@ -104,8 +104,8 @@ class SoundGrid : public boost::noncopyable
void _finalize (void* ecc, int state);
void event_completed (int);
static WTErr _sg_callback (const WSControlID* pControlID);
static WTErr sg_callback (const WSControlID* pControlID);
static WTErr _sg_callback (void*, const WSControlID* pControlID);
WTErr sg_callback (const WSControlID* pControlID);
WTErr get (WSControlID*, WSControlInfo*);
WTErr set (WSEvent*, const std::string&);

View file

@ -22,7 +22,7 @@
#include <dlfcn.h>
#include <iostream>
#include <WavesPublicAPI/WCMixerCore_API.h>
#include <WavesMixerCore/API/WCMixerCore_API.h>
#include "pbd/compose.h"
#include "pbd/stacktrace.h"
@ -59,6 +59,9 @@ SoundGrid::SoundGrid ()
, _host_handle (0)
, _pool (0)
{
#if 0
/* we link against the framework now */
const char *s;
string path;
@ -83,6 +86,8 @@ SoundGrid::SoundGrid ()
DEBUG_TRACE (DEBUG::SoundGrid, "\tfailed\n");
return;
}
#endif
}
SoundGrid::~SoundGrid()
@ -116,7 +121,20 @@ SoundGrid::initialize (void* window_handle)
if (!_sg) {
WTErr ret;
DEBUG_TRACE (DEBUG::SoundGrid, "Initializing SG core...\n");
if ((ret = InitializeMixerCoreDLL (window_handle, sg_callback, &_sg)) != eNoErr) {
WSMixerConfig mixer_limits;
Init_WSMixerConfig (&mixer_limits);
//the following two are for physical input and output representations
mixer_limits.m_clusterConfigs[eClusterType_Inputs].m_uiIndexNum = 1;
mixer_limits.m_clusterConfigs[eClusterType_Outputs].m_uiIndexNum = 1;
//the following is for the tracks that this app will create.
//This will probably be changed to eClusterType_Group in future.
mixer_limits.m_clusterConfigs[eClusterType_Input].m_uiIndexNum = 64;
string driver_path = "build/libs/soundgrid/SurfaceDriverApp.bundle";
if ((ret = InitializeMixerCoreDLL (&mixer_limits, driver_path.c_str(), window_handle, _sg_callback, this, &_sg)) != eNoErr) {
DEBUG_TRACE (DEBUG::SoundGrid, string_compose ("Initialized SG core, ret = %1 core handle %2\n", ret, _sg));
return -1;
}
@ -367,9 +385,9 @@ SoundGrid::current_network_buffer_size ()
/* callback */
WTErr
SoundGrid::_sg_callback (const WSControlID* cid)
SoundGrid::_sg_callback (void* arg, const WSControlID* cid)
{
return SoundGrid::instance().sg_callback (cid);
return ((SoundGrid*) arg)->sg_callback (cid);
}
WTErr

View file

@ -367,7 +367,7 @@ def build(bld):
'libvampplugin','libtaglib','librubberband',
'libaudiographer']
if bld.is_defined ('HAVE_SOUNDGRID'):
obj.uselib += [ 'SOUNDGRID' ]
obj.uselib += [ 'SOUNDGRID' ]
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.defines = [

View file

@ -1,6 +1,6 @@
#include <stdio.h>
#include <WavesPublicAPI/WavesMixerAPI/1.0/WavesMixerAPI.h>
#include <WavesMixerAPI/1.0/WavesMixerAPI.h>
#include <WavesPublicAPI/WTErr.h>
#include <pbd/compose.h>
@ -22,7 +22,7 @@ struct WSCoreCallbackTable
/* This API is really a C API, but we want to be able to use C++ objects within it, so ... */
extern "C" {
static const char* surface_type = "ArdourSurface";
static const char* surface_type = PROGRAM_NAME;
uint32_t
WMSD_QueryInterfaceVersion()
@ -118,9 +118,6 @@ WMSD_SurfaceDisplayUpdate (const WSDSurfaceHandle /*surfaceHandle*/,
case eClusterType_Global_RequestTimeout:
DEBUG_TRACE (DEBUG::SGSurface, "RequestTimeout\n");
break;
case eClusterType_Global_NetworkLatency:
DEBUG_TRACE (DEBUG::SGSurface, "NetworkLatency\n");
break;
case eClusterType_Global_SurfacesSetup:
DEBUG_TRACE (DEBUG::SGSurface, "SurfacesSetup\n");
break;

View file

@ -35,7 +35,9 @@ def build(bld):
linkflags = '-bundle',
use = [ 'libardour' ],
install_path = os.path.join(bld.env['LIBDIR'], 'ardour3'),
defines = ['PACKAGE="' + I18N_PACKAGE + '"']
defines = ['PACKAGE="' + I18N_PACKAGE + '"',
'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
]
)
bld (rule='mkdir -p ${TGT}',
target=bld.path.get_bld().make_node ('SurfaceDriver_App.bundle/Contents/MacOS'))

19
wscript
View file

@ -227,7 +227,7 @@ def set_compiler_flags (conf,opt):
if sys.platform == 'darwin':
optimization_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
debug_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS");
conf.env.append_value('LINKFLAGS', "-framework Accelerate")
conf.env.append_value('LINKFLAGS', [ '-framework', 'Accelerate' ])
elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
optimization_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
debug_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
@ -544,18 +544,25 @@ def configure(conf):
conf.env.append_value ('CXXFLAGS_SOUNDGRID',
[ '-D__MACOS__',
'-DUSE_SOUNDGRID',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/WavesMixerAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPIs/',
])
conf.env.append_value ('CFLAGS_SOUNDGRID',
[ '-D__MACOS__',
'-DUSE_SOUNDGRID',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/WavesMixerAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPI/1.0',
'-I/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesPublicAPIs/',
])
conf.check_cxx (header_name='WavesPublicAPI/WavesMixerAPI/1.0/WavesMixerAPI.h',
conf.env.append_value ('LINKFLAGS_SOUNDGRID',
[ '-Xlinker', '-rpath', '-Xlinker', '/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerCore',
'-F/Volumes/Work/paul/ardour/3.0-SG/soundgrid/WavesMixerCore',
'-framework', 'MixerCoreSG'
])
conf.check_cxx (header_name='WavesMixerAPI/1.0/WavesMixerAPI.h',
mandatory=True, use='SOUNDGRID')
conf.define('HAVE_SOUNDGRID', 1)