Jack2
1.9.10
|
00001 /* 00002 Copyright (C) 2009 Grame 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 00018 */ 00019 00020 #ifndef __JackMidiDriver__ 00021 #define __JackMidiDriver__ 00022 00023 #include "JackDriver.h" 00024 #include "JackMidiPort.h" 00025 #include "JackLockedEngine.h" 00026 #include "ringbuffer.h" 00027 00028 namespace Jack 00029 { 00030 00039 class SERVER_EXPORT JackMidiDriver : public JackDriver 00040 { 00041 00042 protected: 00043 00044 JackMidiBuffer* GetInputBuffer(int port_index); 00045 JackMidiBuffer* GetOutputBuffer(int port_index); 00046 00047 virtual int ProcessReadSync(); 00048 virtual int ProcessWriteSync(); 00049 00050 virtual int ProcessReadAsync(); 00051 virtual int ProcessWriteAsync(); 00052 00053 virtual void UpdateLatencies(); 00054 00055 public: 00056 00057 JackMidiDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table); 00058 virtual ~JackMidiDriver(); 00059 00060 virtual int Open(bool capturing, 00061 bool playing, 00062 int inchannels, 00063 int outchannels, 00064 bool monitor, 00065 const char* capture_driver_name, 00066 const char* playback_driver_name, 00067 jack_nframes_t capture_latency, 00068 jack_nframes_t playback_latency); 00069 00070 virtual int SetBufferSize(jack_nframes_t buffer_size); 00071 00072 virtual int Attach(); 00073 virtual int Detach(); 00074 00075 }; 00076 00077 } // end of namespace 00078 00079 #endif