JackServer.h

00001 /*
00002 Copyright (C) 2001 Paul Davis 
00003 Copyright (C) 2004-2006 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 "jslist.h"
00028 
00029 namespace Jack
00030 {
00031 
00032 class JackGraphManager;
00033 class JackConnectionManager;
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* fState;
00058         JackSynchro* fSynchroTable[CLIENT_NUM];
00059         JackSyncInterface* fSignal;
00060         bool fSyncMode;
00061         bool fFreewheel;
00062         long fLoopback;
00063 
00064     public:
00065 
00066         JackServer(bool sync, long timeout, bool rt, long priority, long loopback, bool verbose);
00067         virtual ~JackServer();
00068 
00069         int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
00070                 int Close();
00071 
00072         int Start();
00073         int Stop();
00074 
00075         int Activate(int refnum);
00076         int Deactivate(int refnum);
00077 
00078         int SetBufferSize(jack_nframes_t buffer_size);
00079         int SetFreewheel(bool onoff);
00080         void Notify(int refnum, int notify, int value);
00081 
00082         JackEngine* GetEngine();
00083         JackEngineControl* GetEngineControl();
00084         JackSynchro** GetSynchroTable();
00085         JackGraphManager* GetGraphManager();
00086 
00087         void PrintState();
00088 
00089         static JackServer* fInstance; // Unique instance
00090 };
00091 
00092 } // end of namespace
00093 
00094 
00095 #endif

Generated on Wed Jan 10 11:42:46 2007 for Jackdmp by  doxygen 1.4.5