Commit 4665934b authored by sletz's avatar sletz
Browse files

New JackNetAudioAdapter class


git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2568 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 7f0b56ad
/*
Copyright (C) 2008 Grame
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.
*/
#include "JackNetAudioAdapter.h"
#include "JackError.h"
#include "JackExports.h"
using namespace std;
namespace Jack
{
int JackNetAudioAdapter::Process()
{
return 0;
}
JackNetAudioAdapter::JackNetAudioAdapter()
{
}
JackNetAudioAdapter::~JackNetAudioAdapter()
{
}
} //namespace
static Jack::JackNetAudioAdapter* adapter = NULL;
#ifdef __cplusplus
extern "C"
{
#endif
EXPORT int jack_initialize (jack_client_t* jack_client, const char* load_init)
{
if (adapter) {
jack_error("NetAudio Adapter already loaded");
return 1;
} else {
jack_log("Loading NetAudio Adapter");
adapter = new Jack::JackNetAudioAdapter();
return (adapter) ? 0 : 1;
}
}
EXPORT void jack_finish(void* arg)
{
if (adapter) {
jack_log("Unloading NetAudio Adapter");
delete adapter;
adapter = NULL;
}
}
#ifdef __cplusplus
}
#endif
/*
Copyright (C) 2008 Grame
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 __JackNetAudioAdapter__
#define __JackNetAudioAdapter__
//#include "JackNetTool.h"
//#include "thread.h"
#include "jack.h"
#include <list>
namespace Jack
{
class JackNetAudioAdapter
{
private:
jack_client_t* fJackClient;
const char* fClientName;
static int Process();
public:
JackNetAudioAdapter();
~JackNetAudioAdapter();
};
}
#endif
......@@ -38,6 +38,24 @@ def subst_func(tsk):
return 0
def create_jack_process_obj(bld, target, sources, uselib = None):
process = bld.create_obj('cpp', 'shlib')
process.env['shlib_PATTERN'] = '%s.so'
process.includes = ['./jack', '.']
process.name = target
process.target = target
process.source = sources
process.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
process.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#process.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
process.env.append_value("LINKFLAGS", "")
process.inst_var = bld.env()['ADDON_DIR']
process.inst_dir = '/'
if bld.env()['IS_MACOSX']: # is this really macosx sepcific?
process.uselib_local = uselib.name
return process
def build(bld):
common_libsources = [
'JackActivationCount.cpp',
......@@ -172,21 +190,9 @@ def build(bld):
#clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module -arch i386 -arch ppc")
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
netmanagerlib = bld.create_obj('cpp', 'shlib')
netmanagerlib.env['shlib_PATTERN'] = '%s.so'
netmanagerlib.includes = ['./jack', '.']
netmanagerlib.name = 'netmanager'
netmanagerlib.target = 'netmanager'
netmanagerlib.source = 'JackNetManager.cpp'
netmanagerlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
netmanagerlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#netmanagerlib.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
netmanagerlib.env.append_value("LINKFLAGS", "")
netmanagerlib.inst_var = bld.env()['ADDON_DIR']
netmanagerlib.inst_dir = '/'
if bld.env()['IS_MACOSX']: # is this really macosx sepcific?
netmanagerlib.uselib_local = serverlib.name
create_jack_process_obj(bld, 'netmanager', 'JackNetManager.cpp', serverlib)
create_jack_process_obj(bld, 'netaudioadapter', 'JackNetAudioAdapter.cpp', serverlib)
install_files('PREFIX', 'include/jack', 'jack/*.h')
......
Supports Markdown
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