1 | //ltm.h: |
---|
2 | |
---|
3 | /* |
---|
4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2011 |
---|
5 | * |
---|
6 | * This file is part of RoarAudio, |
---|
7 | * a cross-platform sound system for both, home and professional use. |
---|
8 | * See README for details. |
---|
9 | * |
---|
10 | * This file is free software; you can redistribute it and/or modify |
---|
11 | * it under the terms of the GNU Lesser General Public License version 3 |
---|
12 | * as published by the Free Software Foundation. |
---|
13 | * |
---|
14 | * RoarAudio is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU Lesser General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU Lesser General Public License |
---|
20 | * along with this software; see the file COPYING. If not, write to |
---|
21 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
22 | * Boston, MA 02110-1301, USA. |
---|
23 | * |
---|
24 | * NOTE: Even though this file is LGPLed it (may) include GPLed files |
---|
25 | * so the license of this file is/may therefore downgraded to GPL. |
---|
26 | * See HACKING for details. |
---|
27 | */ |
---|
28 | |
---|
29 | #ifndef _ROARAUDIO_LTM_H_ |
---|
30 | #define _ROARAUDIO_LTM_H_ |
---|
31 | |
---|
32 | // monitoring targets: |
---|
33 | /* Vars used below: |
---|
34 | * t = time |
---|
35 | * w = window size |
---|
36 | * l = history size |
---|
37 | * S(t) = signal at time t |
---|
38 | * H{g}(n) = history of type g element n |
---|
39 | */ |
---|
40 | #define ROAR_LTM_MT_NONE 0x0000 /* const for init of lists */ |
---|
41 | #define ROAR_LTM_MT_INACT 0x0001 /* input activit */ |
---|
42 | #define ROAR_LTM_MT_OUTACT 0x0002 /* output activity */ |
---|
43 | #define ROAR_LTM_MT_ACT 0x0004 /* any (in+out+other) activity */ |
---|
44 | #define ROAR_LTM_MT_AVG 0x0008 /* signal avg: SUM{t-w->t}(S(t))/w */ |
---|
45 | #define ROAR_LTM_MT_PEAK 0x0010 /* signal min and max values: MIN(S(t-w..t)), MAX(S(t-w..t)) */ |
---|
46 | #define ROAR_LTM_MT_RMS 0x0020 /* signal RMS^2: SUM{t-w->t}(S(t)^2) */ |
---|
47 | #define ROAR_LTM_MT_RMSPEAK 0x0040 /* signal RMS^2 min and max: MIN(H{RMS}(0..l)), MAX(H{RMS}(0..l)) */ |
---|
48 | #define ROAR_LTM_MT_HISTORY 0x0080 /* request to hold a history */ |
---|
49 | |
---|
50 | #define ROAR_LTM_MTBITS 16 /* number of bits for MTs */ |
---|
51 | |
---|
52 | // pre-defined windows: |
---|
53 | #define ROAR_LTM_WIN_WORKBLOCK 0 /* The last block which the server worked on */ |
---|
54 | /* This block does not have any sub-block historys (H()) */ |
---|
55 | |
---|
56 | // command sub-sub-types: |
---|
57 | #define ROAR_LTM_SST_NOOP 0 |
---|
58 | #define ROAR_LTM_SST_REGISTER 1 |
---|
59 | #define ROAR_LTM_SST_UNREGISTER 2 |
---|
60 | #define ROAR_LTM_SST_GET_RAW 3 |
---|
61 | |
---|
62 | #endif |
---|
63 | |
---|
64 | //ll |
---|