2 Copyright (C) 2003 Paul Davis
3 Copyright (C) 2004-2008 Grame
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __JackEngineTiming__
22 #define __JackEngineTiming__
25 #include "JackTypes.h"
26 #include "JackConstants.h"
31 #define TIME_POINTS 1000
34 \brief Timing stucture for a client.
37 struct JackTimingMeasureClient
40 jack_time_t fSignaledAt
;
42 jack_time_t fFinishedAt
;
43 jack_client_state_t fStatus
;
47 \brief Timing stucture for a table of clients.
50 struct JackTimingMeasure
52 unsigned int fAudioCycle
;
53 jack_time_t fEngineTime
;
54 JackTimingMeasureClient fClientTable
[CLIENT_NUM
];
61 class JackClientInterface
;
62 class JackGraphManager
;
64 class JackEngineTiming
69 JackTimingMeasure fMeasure
[TIME_POINTS
];
70 unsigned int fAudioCycle
;
71 jack_time_t fPrevCycleTime
;
72 jack_time_t fCurCycleTime
;
76 JackEngineTiming():fAudioCycle(0),fPrevCycleTime(0),fCurCycleTime(0)
81 void GetTimeMeasure(JackClientInterface
** table
, JackGraphManager
* manager
, jack_time_t cur_cycle_begin
, jack_time_t prev_cycle_end
);
82 void ClearTimeMeasures();