Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-audiodev/audiotest.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <[email protected]>
4 *
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.
9 *
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.
14 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #ifndef __PJMEDIA_AUDIODEV_AUDIOTEST_H__
20 #define __PJMEDIA_AUDIODEV_AUDIOTEST_H__
21
22 /**
23 * @file audiotest.h
24 * @brief Audio test utility.
25 */
26 #include <pjmedia-audiodev/audiodev.h>
27
28
29 PJ_BEGIN_DECL
30
31 /**
32 * @defgroup s30_audio_test_utility Audio tests utility.
33 * @ingroup audio_device_api
34 * @brief Audio test utility.
35 * @{
36 */
37
38 /**
39 * Statistic for each direction.
40 */
41 typedef struct pjmedia_aud_test_stat
42 {
43 /**
44 * Number of frames processed during the test.
45 */
46 unsigned frame_cnt;
47
48 /**
49 * Minimum inter-frame arrival time, in milliseconds
50 */
51 unsigned min_interval;
52
53 /**
54 * Maximum inter-frame arrival time, in milliseconds
55 */
56 unsigned max_interval;
57
58 /**
59 * Average inter-frame arrival time, in milliseconds
60 */
61 unsigned avg_interval;
62
63 /**
64 * Standard deviation of inter-frame arrival time, in milliseconds
65 */
66 unsigned dev_interval;
67
68 /**
69 * Maximum number of frame burst
70 */
71 unsigned max_burst;
72
73 } pjmedia_aud_test_stat;
74
75
76 /**
77 * Test results.
78 */
79 typedef struct pjmedia_aud_test_results
80 {
81 /**
82 * Recording statistic.
83 */
84 pjmedia_aud_test_stat rec;
85
86 /**
87 * Playback statistic.
88 */
89 pjmedia_aud_test_stat play;
90
91 /**
92 * Clock drifts per second, in samples. Positive number indicates rec
93 * device is running faster than playback device.
94 */
95 pj_int32_t rec_drift_per_sec;
96
97 } pjmedia_aud_test_results;
98
99
100 /**
101 * Perform audio device testing.
102 */
103 PJ_DECL(pj_status_t) pjmedia_aud_test(const pjmedia_aud_param *param,
104 pjmedia_aud_test_results *result);
105
106 /**
107 * @}
108 */
109
110 PJ_END_DECL
111
112
113 #endif /* __PJMEDIA_AUDIODEV_AUDIOTEST_H__ */
114
115