Skip to content
Snippets Groups Projects
Commit fa49971a authored by sletz's avatar sletz
Browse files

Add JackAlsaIOAdapter class

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2612 0c269be4-1314-0410-8aa9-9f06e86f4224
parent cc25b993
No related branches found
No related tags found
No related merge requests found
......@@ -32,4 +32,4 @@ int JackIOAdapterInterface::Close()
return 0;
}
} // namespace
\ No newline at end of file
} // namespace
......@@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackError.h"
#include "JackExports.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
using namespace std;
......@@ -106,6 +107,10 @@ extern "C"
#include "JackCallbackNetIOAdapter.h"
#ifdef __linux__
#include "JackAlsaIOAdapter.h"
#endif
#ifdef __APPLE__
#include "JackCoreAudioIOAdapter.h"
#endif
......@@ -138,6 +143,11 @@ extern "C"
if (ports)
free(ports);
#ifdef __linux__
adapter = new Jack::JackCallbackNetIOAdapter(jack_client,
new Jack::JackAlsaIOAdapter(input, output, jack_get_buffer_size(jack_client), jack_get_sample_rate(jack_client)), input, output);
#endif
#ifdef WIN32
adapter = new Jack::JackCallbackNetIOAdapter(jack_client,
new Jack::JackPortAudioIOAdapter(input, output, jack_get_buffer_size(jack_client), jack_get_sample_rate(jack_client)), input, output);
......
......@@ -41,7 +41,7 @@ def subst_func(tsk):
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', '.', '../macosx','../windows']
process.includes = ['./jack', '.', '../macosx','../windows', '../linux/alsa']
process.name = target
process.target = target
process.source = sources
......@@ -198,7 +198,7 @@ def build(bld):
process = create_jack_process_obj(bld, 'netioadapter','JackResampler.cpp JackLibSampleRateResampler.cpp JackIOAdapter.cpp JackNetIOAdapter.cpp JackCallbackNetIOAdapter.cpp ../macosx/JackCoreAudioIOAdapter.cpp', serverlib)
if bld.env()['IS_LINUX']:
process = create_jack_process_obj(bld, 'netioadapter','JackResampler.cpp JackLibSampleRateResampler.cpp JackIOAdapter.cpp JackNetIOAdapter.cpp JackCallbackNetIOAdapter.cpp', serverlib)
process = create_jack_process_obj(bld, 'netioadapter','JackResampler.cpp JackLibSampleRateResampler.cpp JackIOAdapter.cpp JackNetIOAdapter.cpp JackCallbackNetIOAdapter.cpp ../linux/alsa/JackAlsaIOAdapter.cpp', serverlib)
#process = create_jack_process_obj(bld, 'netioadapter', 'JackResampler.cpp JackLibSampleRateResampler.cpp JackIOAdapter.cpp JackNetIOAdapter.cpp JackCallbackNetIOAdapter.cpp ../windows/JackPortAudioIOAdapter.cpp', serverlib)
......
/*
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 "JackAlsaIOAdapter.h"
namespace Jack
{
int JackAlsaIOAdapter::Open()
{
return 0;
}
int JackAlsaIOAdapter::Close()
{
return 0;
}
int JackAlsaIOAdapter::SetBufferSize(jack_nframes_t buffer_size)
{
return 0;
}
}
/*
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 __JackAlsaIOAdapter__
#define __JackAlsaIOAdapter__
#include "JackIOAdapter.h"
#include "jack.h"
namespace Jack
{
class JackAlsaIOAdapter : public JackIOAdapterInterface
{
private:
public:
JackAlsaIOAdapter(int input, int output, jack_nframes_t buffer_size, jack_nframes_t sample_rate)
:JackIOAdapterInterface(input, output, buffer_size, sample_rate)
{}
~JackAlsaIOAdapter()
{}
virtual int Open();
virtual int Close();
virtual int SetBufferSize(jack_nframes_t buffer_size);
};
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment