Dmitry Baikov jackmp-time patch: add jack_get_time, jack_time_to_frames, jack_frames_...
[jack2.git] / common / JackServer.h
blob109557532ec0a1237970f9f7c34d42b3aa65b221
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004-2006 Grame
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __JackServer__
22 #define __JackServer__
24 #include "JackExports.h"
25 #include "driver_interface.h"
26 #include "JackDriverLoader.h"
27 #include "jslist.h"
29 namespace Jack
32 class JackGraphManager;
33 class JackConnectionManager;
34 class JackDriverClientInterface;
35 class JackServerChannelInterface;
36 class JackSyncInterface;
37 struct JackEngineControl;
38 class JackEngine;
40 /*!
41 \brief The Jack server.
44 class EXPORT JackServer
47 private:
49 jack_driver_info_t* fDriverInfo;
50 JackDriverClientInterface* fAudioDriver;
51 JackDriverClientInterface* fFreewheelDriver;
52 JackDriverClientInterface* fLoopbackDriver;
53 JackEngine* fEngine;
54 JackEngineControl* fEngineControl;
55 JackGraphManager* fGraphManager;
56 JackServerChannelInterface* fChannel;
57 JackConnectionManager* fState;
58 JackSynchro* fSynchroTable[CLIENT_NUM];
59 bool fFreewheel;
60 long fLoopback;
62 public:
64 JackServer(bool sync, long timeout, bool rt, long priority, long loopback, bool verbose);
65 virtual ~JackServer();
67 int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
68 int Close();
70 int Start();
71 int Stop();
73 int SetBufferSize(jack_nframes_t buffer_size);
74 int SetFreewheel(bool onoff);
75 void Notify(int refnum, int notify, int value);
77 JackEngine* GetEngine();
78 JackEngineControl* GetEngineControl();
79 JackSynchro** GetSynchroTable();
80 JackGraphManager* GetGraphManager();
82 void PrintState();
84 static JackServer* fInstance; // Unique instance
87 } // end of namespace
90 #endif