From f2b47e8030fdfcd8c794d1e27ab1b35c7e87310c Mon Sep 17 00:00:00 2001
From: xengineering <me@xengineering.eu>
Date: Fri, 5 Jan 2024 11:48:23 +0100
Subject: doc: Add section 'Playing audio'

This documents a basic FFmpeg streaming example so that soundbox devices
can be tested.
---
 doc/documentation.tex | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

(limited to 'doc/documentation.tex')

diff --git a/doc/documentation.tex b/doc/documentation.tex
index f7c0fee..e4ec97c 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -20,6 +20,7 @@
 \newpage
 
 \chapter{Introduction}
+\label{chap:introduction}
 
 \texttt{soundbox} is a device to connect classic audio systems to the network.
 
@@ -46,9 +47,35 @@ devices or to care about the software internals.
 
 %\section{Licensing}
 
-%\chapter{User guide}
+\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}
+
+\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}{ffmpeg
+streaming guide}} can be used. The following command has to be executed on the
+soundbox to start listening on port \texttt{1234} for incoming audio streams:
+
+\begin{verbatim}
+	ffplay rtp://127.0.0.1:1234
+\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>:1234
+\end{verbatim}
+
+It will send a simple sine wave with 400~Hz to the soundbox device.
 
 %\chapter{Production}
 %\section{Printing mechanical parts}
-- 
cgit v1.2.3-70-g09d2

