1
/* $Id: audiotest.h 3553 2011-05-05 06:14:19Z nanang $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#ifndef __PJMEDIA_AUDIODEV_AUDIOTEST_H__
21
#define __PJMEDIA_AUDIODEV_AUDIOTEST_H__
25
* @brief Audio test utility.
27
#include <pjmedia-audiodev/audiodev.h>
33
* @defgroup s30_audio_test_utility Audio tests utility.
34
* @ingroup audio_device_api
35
* @brief Audio test utility.
40
* Statistic for each direction.
42
typedef struct pjmedia_aud_test_stat
45
* Number of frames processed during the test.
50
* Minimum inter-frame arrival time, in milliseconds
52
unsigned min_interval;
55
* Maximum inter-frame arrival time, in milliseconds
57
unsigned max_interval;
60
* Average inter-frame arrival time, in milliseconds
62
unsigned avg_interval;
65
* Standard deviation of inter-frame arrival time, in milliseconds
67
unsigned dev_interval;
70
* Maximum number of frame burst
74
} pjmedia_aud_test_stat;
80
typedef struct pjmedia_aud_test_results
83
* Recording statistic.
85
pjmedia_aud_test_stat rec;
90
pjmedia_aud_test_stat play;
93
* Clock drifts per second, in samples. Positive number indicates rec
94
* device is running faster than playback device.
96
pj_int32_t rec_drift_per_sec;
98
} pjmedia_aud_test_results;
102
* Perform audio device testing.
104
PJ_DECL(pj_status_t) pjmedia_aud_test(const pjmedia_aud_param *param,
105
pjmedia_aud_test_results *result);
114
#endif /* __PJMEDIA_AUDIODEV_AUDIOTEST_H__ */