1
This directory contains tests thting the sound output of Swfdec
3
What tests belong here?
5
If you want to make sure the audio produced by Swfdec is correct, this is the
11
./sound [FILE1 [FILE2 [...]]]
12
The program sound in this directory takes all files on the command line or all
13
files in the current directory and runs them. Running consists of instancing a
14
SwfdecPlayer and iterating $FILE 10 times. Everytime an audio stream is
15
instanced by that player, its output is appended to a buffer until the audio
16
stream is removed or the 10 iterations have been done. After this the
17
captured output is compared to files $FILE-$FRAME-$NO.raw for every stream.
18
$FRAME is the frame the audio was added (0 for initializing, 1-10 for the 10
19
iterations), $NO just counts up from 0 for every frame, so that multiple
20
streams can be added. If the data matches for all given streams, the test is
21
successful, otherwise it failed. The return value is 0 if all tests passed,
22
or failure if at least one test failed.
23
If the environment variable SWFDEC_TEST_DUMP is set, for every failed test a
24
file $FILE-$FRAME-$NO.raw.dump will be created that contains the captured
28
How do I run my new test?
30
Create a file to test, say "test.swf", and put the expected output streams in
31
the corresponding raw files. After that, just call the sound application with
34
You may need to build the sound application if you haven't run make check
35
before, just run make sound.
38
How do I create expected raw output?
40
The most common method is to patch esound to dump raw audio streams to files.
41
After that he will run a standalone Flash player in Wine using esound as audio
42
output. Ask for the patches on the mailing list if you want to use this method.
45
How do I add a test to the testsuite?
47
Just put the file and its raw audio files into this directory and add them all
48
to EXTRA_DIST in Makefile.am. It should appear in the output when running
49
make check. (Note that the order of files tested during make check is pretty