blob: 5713b3c1ba5f26c968938a89982d456c2bd94087 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
\documentclass{report}
\author{xengineering}
\title{soundbox documentation}
\usepackage{graphicx}
\graphicspath{ {./diagrams/} }
\usepackage{hyperref}
\usepackage{parskip}
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\listoffigures
\newpage
\chapter{Introduction}
\label{chap:introduction}
\texttt{soundbox} is a device to connect classic audio systems to the network.
\section{Versioning model}
This device is versioned with Semantic
Versioning\footnote{\href{https://semver.org}{https://semver.org}}. The
resulting version numbers have the format \texttt{<major>.<minor>.<patch>} like
e.g. \texttt{2.0.3}. While Semantic Versioning is usually targeted at software
only it is here used for the whole device. This includes mechanical, electronic
and software aspects as shown in figure \ref{diagram:device-semver-user}.
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{device-semver-user.pdf}
\caption{API for a device versioned with Semantic Versioning from a user perspective}
\label{diagram:device-semver-user}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{device-semver-developer.pdf}
\caption{API for a device versioned with Semantic Versioning from a developer perspective}
\label{diagram:device-semver-developer}
\end{figure}
This versioning makes sure that users do not have to care about the device
internals at all. Devices can be seen as atomic from a user's perspective. This
level of granularity is choosen because users are not expected to disassemble
devices or to care about the software internals.
%\section{Licensing}
\chapter{User guide}
In addition to \autoref{chap:introduction} `\nameref{chap:introduction}` the
following sections document everything required to use \texttt{soundbox}
devices..
%\section{Device setup}
\section{Playing audio}
For a simple audio streaming test the following commands from the FFmpeg
streaming
guide\footnote{\href{https://trac.ffmpeg.org/wiki/StreamingGuide\#StreamingasimpleRTPaudiostreamfromFFmpeg}{https://trac.ffmpeg.org/wiki/StreamingGuide\#StreamingasimpleRTPaudiostreamfromFFmpeg}}
can be used. The following command has to be executed on the soundbox to start
listening on port \texttt{5316} for incoming audio streams:
\begin{verbatim}
ffplay rtp://127.0.0.1:5316
\end{verbatim}
As soon as the soundbox is listening the stream can be send from another
computer in the same network with this command:
\begin{verbatim}
ffmpeg -re -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -f mulaw \
-f rtp rtp://<soundbox-ip>:5316
\end{verbatim}
It will send a simple sine wave with 400~Hz to the soundbox device.
Alternatively a mp3 file can be sent like this:
\begin{verbatim}
ffmpeg -re -i '/path/to/file.mp3' -acodec libmp3lame -ar 11025 \
-f rtp rtp://<soundbox-ip>:5316
\end{verbatim}
These commands allow to test the \texttt{soundbox} device setup.
%\chapter{Production}
%\section{Printing mechanical parts}
%\section{Install operating system to SD card}
%\section{Final assembly}
%\chapter{Device internals}
%\section{Mechanical design}
%\section{Electronics}
%\section{Operating system}
%\section{Software}
\end{document}
|