JackServer.h

00001 /*
00002 Copyright (C) 2001 Paul Davis 
00003 Copyright (C) 2004-2008 Grame
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 */
00020 
00021 #ifndef __JackServer__
00022 #define __JackServer__
00023 
00024 #include "JackExports.h"
00025 #include "driver_interface.h"
00026 #include "JackDriverLoader.h"
00027 #include "JackConnectionManager.h"
00028 #include "jslist.h"
00029 
00030 namespace Jack
00031 {
00032 
00033 class JackGraphManager;
00034 class JackDriverClientInterface;
00035 class JackServerChannelInterface;
00036 class JackSyncInterface;
00037 struct JackEngineControl;
00038 class JackEngine;
00039 
00044 class EXPORT JackServer
00045 {
00046 
00047     private:
00048 
00049         jack_driver_info_t* fDriverInfo;
00050         JackDriverClientInterface* fAudioDriver;
00051         JackDriverClientInterface* fFreewheelDriver;
00052         JackDriverClientInterface* fLoopbackDriver;
00053         JackEngine* fEngine;
00054         JackEngineControl* fEngineControl;
00055         JackGraphManager* fGraphManager;
00056         JackServerChannelInterface* fChannel;
00057         //JackConnectionManager* fConnectionState;
00058                 JackConnectionManager fConnectionState;
00059         JackSynchro* fSynchroTable[CLIENT_NUM];        
00060         bool fFreewheel;
00061         long fLoopback;
00062 
00063     public:
00064 
00065         JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, long loopback, bool verbose, const char* server_name);
00066         virtual ~JackServer();
00067 
00068         int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
00069                 int Close();
00070 
00071         int Start();
00072         int Stop();
00073 
00074         int SetBufferSize(jack_nframes_t buffer_size);
00075         int SetFreewheel(bool onoff);
00076         void Notify(int refnum, int notify, int value);
00077                 
00078                 int InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int* status);
00079                 
00080                  // Transport management
00081         int ReleaseTimebase(int refnum);
00082         int SetTimebaseCallback(int refnum, int conditional);
00083         
00084                 // Object access
00085         JackEngine* GetEngine();
00086         JackEngineControl* GetEngineControl();
00087         JackSynchro** GetSynchroTable();
00088         JackGraphManager* GetGraphManager();
00089 
00090         static JackServer* fInstance; // Unique instance
00091 };
00092 
00093 } // end of namespace
00094 
00095 
00096 #endif

Generated on Thu Feb 14 11:16:02 2008 for Jackdmp by  doxygen 1.5.1