annotate docs/ProjectSpecificationDocument.tex @ 1692:a4be9ea53245

Updated the ProjectSpecificationDocument to reflect track sample rate detection
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 26 Mar 2015 10:35:29 +0000
parents 1e88d042624f
children c1d941d405f2
rev   line source
nickjillings@1690 1 \documentclass{article}
nickjillings@1690 2
nickjillings@1690 3 \usepackage[margin=2cm]{geometry}
nickjillings@1692 4 \usepackage{listings}
nickjillings@1690 5
nickjillings@1690 6 \begin{document}
nickjillings@1690 7
nickjillings@1690 8 \large APE Browser Tool - Project Specification Document
nickjillings@1690 9
nickjillings@1690 10 \section{Document}
nickjillings@1690 11
nickjillings@1690 12 An XML file containing all project information to load and execute the project on the client. Certain interfaces are optional, however others are mandatory. This guide should reflect the changes in the XML project and keep track of the versions. Hopwfully this can remain simple!
nickjillings@1690 13
nickjillings@1690 14 \section{Root}
nickjillings@1690 15
nickjillings@1690 16 The XML root must be \texttt{<BrowserEvalProjectDocument>}. This should be sufficiently identifiable in both itself and in the JavaScript decoding as it will create an object called the root name.
nickjillings@1690 17
nickjillings@1690 18 There must also be a \texttt{<version>} tag which has the attribute \texttt{id} containing a numerical representation of the version. Currently everything in this document can be assumed to be version 1. If future updates or corrections are made post delivery this should give the flexibility to ensure past projects still work.
nickjillings@1690 19
nickjillings@1690 20 The root will also contain the following tags: setup and tracks.
nickjillings@1690 21
nickjillings@1690 22 \section{Setup tag}
nickjillings@1690 23
nickjillings@1690 24 The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
nickjillings@1690 25
nickjillings@1690 26 An example of this tag could be:
nickjillings@1690 27
nickjillings@1690 28 \texttt{<setup interface="APE" projectReturn="http://project.return.url/goes/here" />}
nickjillings@1690 29
nickjillings@1690 30 The setup should not require an element or any children to run.
nickjillings@1690 31
nickjillings@1690 32 \subsection{Attributes}
nickjillings@1690 33 \begin{itemize}
nickjillings@1690 34 \item \texttt{interface} - Mandatory. Defaults to APE, otherwise use to load any of the available interfaces
nickjillings@1690 35 \item \texttt{projectReturn} - Mandatory. Specify the URL to return the test results. If null client will generate XML locally and prompt user to return the file.
nickjillings@1690 36 \end{itemize}
nickjillings@1690 37
nickjillings@1690 38 \subsection{Elements}
nickjillings@1690 39 None
nickjillings@1690 40
nickjillings@1690 41 \section{Tracks tag}
nickjillings@1690 42
nickjillings@1690 43 There should be one tracks tag, inside which each track is specified as children. The track tag can help to generalise certain objects.
nickjillings@1690 44
nickjillings@1690 45 \subsection{Attributes}
nickjillings@1690 46 \begin{itemize}
nickjillings@1690 47 \item \texttt{hostURL} - Optional. If all tracks are hosted from the same folder on a server, you can put in the lead here. For instance, if loading http://test.com/tracks/track1.wav and http://test.com/tracks/track2.wav, this could equal http://test.com/tracks/ and the url attribute in the track tag can be track1.wav or track2.wav. Equally http://test.com/ and then using tracks/track1.wav and tracks/track2.wav is valid.
nickjillings@1692 48 \item \texttt{sampleRate} - Optional. If your test requires a specific sample rate, this should be set to the desired sample rate in Hertz. This does not set the browser to the correct sample rate, but allows for checking if the sample rates match.
nickjillings@1692 49 \item \texttt{sampleRateExplicit} - Optional. A true/false to determine if the sample rate given in the attribute \texttt{sampleRate} must be matched by the system. If the web audio API does not match, a browser alert is called and the rest of the interface loading is discarded. Media files are also not downloaded until this check can be corrected.
nickjillings@1690 50 \end{itemize}
nickjillings@1690 51
nickjillings@1690 52 \subsection{Elements}
nickjillings@1690 53 Contain the track tags.
nickjillings@1690 54
nickjillings@1690 55 \section{Track tag}
nickjillings@1690 56
nickjillings@1690 57 This must reside as children in the tracks tag. There must be one track tag per track to load. The track tag must contain the URL to load.
nickjillings@1690 58
nickjillings@1690 59 \subsection{Attributes}
nickjillings@1690 60 \begin{itemize}
nickjillings@1690 61 \item \texttt{url} - Mandatory. Contain the full URL to the track. If the Tracks tag hostURL is set, concatenate this tag with the hostURL attribute to obtain the full URL.
nickjillings@1690 62 \end{itemize}
nickjillings@1690 63
nickjillings@1690 64 \section{Example}
nickjillings@1690 65
nickjillings@1692 66 Here is an example XML structure
nickjillings@1690 67
nickjillings@1692 68 \begin{lstlisting}
nickjillings@1692 69 <?xml version="1.0" encoding="utf-8"?>
nickjillings@1692 70 <BrowserEvalProjectDocument>
nickjillings@1692 71 <setup interface="APE" projectReturn="null" />
nickjillings@1692 72 <tracks hostURL="example_eval/" sampleRate="44100"
nickjillings@1692 73 sampleRateExplicit="true">
nickjillings@1692 74 <track url="0.wav"/>
nickjillings@1692 75 <track url="1.wav"/>
nickjillings@1692 76 <track url="2.wav"/>
nickjillings@1692 77 <track url="3.wav"/>
nickjillings@1692 78 <track url="4.wav"/>
nickjillings@1692 79 <track url="5.wav"/>
nickjillings@1692 80 <track url="6.wav"/>
nickjillings@1692 81 <track url="7.wav"/>
nickjillings@1692 82 <track url="8.wav"/>
nickjillings@1692 83 <track url="9.wav"/>
nickjillings@1692 84 <track url="10.wav"/>
nickjillings@1692 85 </tracks>
nickjillings@1690 86 </BrowserEvalProjectDocument>
nickjillings@1692 87 \end{lstlisting}
nickjillings@1692 88
nickjillings@1690 89
nickjillings@1690 90
nickjillings@1690 91 \end{document}