aboutsummaryrefslogtreecommitdiff
path: root/design.tex
diff options
context:
space:
mode:
Diffstat (limited to 'design.tex')
-rw-r--r--design.tex22
1 files changed, 21 insertions, 1 deletions
diff --git a/design.tex b/design.tex
index dcde483..9d5f999 100644
--- a/design.tex
+++ b/design.tex
@@ -38,9 +38,29 @@ workflows.
\subsection{Audio}
+\subsubsection{Library}
+
\subsubsection{Fa\c{c}ade}
-\includepumldiag{img/facade-audio.puml}
+\Cref{fig:class-audio-facade} shows a class diagram of the audio fa\c{c}ade. It
+contains the following classes:
+\begin{description}
+ \item[SoundSystem] This is a wrapper around the \codeinline{SoLoud::soloud}
+ `engine' class, and is therefore implemented as a singleton. This ensures the
+ audio engine is initialized before \codeinline{Sound} is able to use it.
+
+ This class is friends with \codeinline{Sound}, so only \codeinline{Sound} is able
+ to get the \codeinline{SoundSystem} instance.
+ \item[Sound] This is a wrapper around the \codeinline{SoLoud::Wav} class, and uses
+ cr\^epe's \codeinline{api::Resource} class to load an audio sample instead.
+\end{description}
+
+\begin{figure}
+ \centering
+ \includepumldiag{img/facade-audio.puml}
+ \caption{Audio fa\c{c}ade class diagram}
+ \label{fig:class-audio-facade}
+\end{figure}
\subsection{Input}