Chris@4
|
1 README for PortAudio Loopback Test
|
Chris@4
|
2
|
Chris@4
|
3 Copyright (c) 1999-2010 Phil Burk and Ross Bencina
|
Chris@4
|
4 See complete license at end of file.
|
Chris@4
|
5
|
Chris@4
|
6 This folder contains code for a single executable that does a standalone test of PortAudio.
|
Chris@4
|
7 It does not require a human to listen to the result. Instead it listens to itself using
|
Chris@4
|
8 a loopback cable connected between the audio output and the audio input. Special pop detectors
|
Chris@4
|
9 and phase analysers can detect errors in the audio stream.
|
Chris@4
|
10
|
Chris@4
|
11 This test can be run from a script as part of a nightly build and test.
|
Chris@4
|
12
|
Chris@4
|
13 --- How To Run Test ---
|
Chris@4
|
14
|
Chris@4
|
15 Connect stereo cables from one or more output audio devices to audio input devices.
|
Chris@4
|
16 The test will scan all the ports and find the cables.
|
Chris@4
|
17
|
Chris@4
|
18 Adjust the volume levels of the hardware so you get a decent signal that will not clip.
|
Chris@4
|
19
|
Chris@4
|
20 Run the test from the command line with the following options:
|
Chris@4
|
21
|
Chris@4
|
22 -i# Input device ID. Will scan for loopback if not specified.
|
Chris@4
|
23 -o# Output device ID. Will scan for loopback if not specified.
|
Chris@4
|
24 -r# Sample Rate in Hz. Will use multiple common rates if not specified.
|
Chris@4
|
25 -s# Size of callback buffer in frames, framesPerBuffer.
|
Chris@4
|
26 -w Save bad recordings in a WAV file.
|
Chris@4
|
27 -dDir Path for Directory for WAV files. Default is current directory.
|
Chris@4
|
28 -m Just test the DSP Math code and not the audio devices.
|
Chris@4
|
29
|
Chris@4
|
30 If the -w option is set then any tests that fail will save the recording of the broken
|
Chris@4
|
31 channel in a WAV file. The files will be numbered and shown in the report.
|
Chris@4
|
32
|
Chris@4
|
33 --- ToDo ---
|
Chris@4
|
34
|
Chris@4
|
35 * Add check for harmonic and enharmonic distortion.
|
Chris@4
|
36 * Measure min/max peak values.
|
Chris@4
|
37 * Detect DC bias.
|
Chris@4
|
38 * Test against matrix of devices/APIs and settings.
|
Chris@4
|
39 * Detect mono vs stereo loopback.
|
Chris@4
|
40 * More command line options
|
Chris@4
|
41 --quick
|
Chris@4
|
42 --latency
|
Chris@4
|
43 --duration
|
Chris@4
|
44 * Automated build and test script with cron job.
|
Chris@4
|
45 * Test on Windows.
|
Chris@4
|
46
|
Chris@4
|
47
|
Chris@4
|
48 /*
|
Chris@4
|
49 * PortAudio Portable Real-Time Audio Library
|
Chris@4
|
50 * Latest Version at: http://www.portaudio.com
|
Chris@4
|
51 *
|
Chris@4
|
52 * Copyright (c) 1999-2008 Phil Burk and Ross Bencina
|
Chris@4
|
53 *
|
Chris@4
|
54 * Permission is hereby granted, free of charge, to any person obtaining
|
Chris@4
|
55 * a copy of this software and associated documentation files
|
Chris@4
|
56 * (the "Software"), to deal in the Software without restriction,
|
Chris@4
|
57 * including without limitation the rights to use, copy, modify, merge,
|
Chris@4
|
58 * publish, distribute, sublicense, and/or sell copies of the Software,
|
Chris@4
|
59 * and to permit persons to whom the Software is furnished to do so,
|
Chris@4
|
60 * subject to the following conditions:
|
Chris@4
|
61 *
|
Chris@4
|
62 * The above copyright notice and this permission notice shall be
|
Chris@4
|
63 * included in all copies or substantial portions of the Software.
|
Chris@4
|
64 *
|
Chris@4
|
65 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
Chris@4
|
66 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
Chris@4
|
67 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
Chris@4
|
68 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
Chris@4
|
69 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
Chris@4
|
70 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
Chris@4
|
71 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Chris@4
|
72 */
|
Chris@4
|
73
|
Chris@4
|
74 /*
|
Chris@4
|
75 * The text above constitutes the entire PortAudio license; however,
|
Chris@4
|
76 * the PortAudio community also makes the following non-binding requests:
|
Chris@4
|
77 *
|
Chris@4
|
78 * Any person wishing to distribute modifications to the Software is
|
Chris@4
|
79 * requested to send the modifications to the original developer so that
|
Chris@4
|
80 * they can be incorporated into the canonical version. It is also
|
Chris@4
|
81 * requested that these non-binding requests be included along with the
|
Chris@4
|
82 * license above.
|
Chris@4
|
83 */
|