~ubuntu-branches/ubuntu/jaunty/swfdec0.8/jaunty

« back to all changes in this revision

Viewing changes to test/sound/README

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2008-10-10 19:15:24 UTC
  • Revision ID: package-import@ubuntu.com-20081010191524-5z85qiky1d4bvgfa
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This directory contains tests thting the sound output of Swfdec
 
2
 
 
3
What tests belong here?
 
4
 
 
5
If you want to make sure the audio produced by Swfdec is correct, this is the 
 
6
place to start.
 
7
 
 
8
 
 
9
How does it work?
 
10
 
 
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 
 
25
output.
 
26
 
 
27
 
 
28
How do I run my new test?
 
29
 
 
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 
 
32
your file, like this:
 
33
  ./sound test.swf
 
34
You may need to build the sound application if you haven't run make check 
 
35
before, just run make sound.
 
36
 
 
37
 
 
38
How do I create expected raw output?
 
39
 
 
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.
 
43
 
 
44
 
 
45
How do I add a test to the testsuite?
 
46
 
 
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 
 
50
much random.)