2 Copyright (C) 2006 Grame
4 Portable Audio I/O Library for ASIO Drivers
6 Based on the Open Source API proposed by Ross Bencina
7 Copyright (c) 2000-2002 Stephane Letz, Phil Burk, Ross Bencina
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef __JackASIODriver__
26 #define __JackASIODriver__
28 #include "JackAudioDriver.h"
29 #include "portaudio.h"
35 \brief The ASIO driver.
38 class JackASIODriver
: public JackAudioDriver
45 float** fOutputBuffer
;
46 PaDeviceIndex fInputDevice
;
47 PaDeviceIndex fOutputDevice
;
49 static int Render(const void* inputBuffer
, void* outputBuffer
,
50 unsigned long framesPerBuffer
,
51 const PaStreamCallbackTimeInfo
* timeInfo
,
52 PaStreamCallbackFlags statusFlags
,
57 JackASIODriver(const char* name
, JackEngine
* engine
, JackSynchro
** table
)
58 : JackAudioDriver(name
, engine
, table
), fStream(NULL
), fInputBuffer(NULL
), fOutputBuffer(NULL
),
59 fInputDevice(paNoDevice
), fOutputDevice(paNoDevice
)
62 virtual ~JackASIODriver()
65 int Open(jack_nframes_t frames_per_cycle
,
72 const char* capture_driver_name
,
73 const char* playback_driver_name
,
74 jack_nframes_t capture_latency
,
75 jack_nframes_t playback_latency
);
85 int SetBufferSize(jack_nframes_t nframes
);