aboutsummaryrefslogtreecommitdiff
path: root/design.tex
diff options
context:
space:
mode:
authorJaro <jarorutjes07@gmail.com>2024-10-19 14:29:04 +0200
committerJaro <jarorutjes07@gmail.com>2024-10-19 14:29:04 +0200
commit314baff9cdc711eee2f307f22e1def778360d9e8 (patch)
tree5f66275b8e6d92ea4147da6349d36fbde0a8f367 /design.tex
parentd4fbaad4ad83e430b8a28436c63a8e0f34abc762 (diff)
parent4760be8c90297857ba5c9cf82e2478039fdc9365 (diff)
Merge branch 'master' of github.com:lonkaars/crepe-docs into jaro/research
Diffstat (limited to 'design.tex')
-rw-r--r--design.tex24
1 files changed, 24 insertions, 0 deletions
diff --git a/design.tex b/design.tex
index c5bd017..7b232fe 100644
--- a/design.tex
+++ b/design.tex
@@ -38,6 +38,30 @@ workflows.
\subsection{Audio}
+\subsubsection{Library}
+
+\subsubsection{Fa\c{c}ade}
+
+\Cref{fig:class-audio-facade} shows a class diagram of the audio fa\c{c}ade. It
+contains the following classes:
+\begin{description}
+ \item[SoundContext] 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{SoundContext} instance.
+ \item[Sound] This is a wrapper around the \codeinline{SoLoud::Wav} class, and uses
+ cr\^epe's \codeinline{Asset} 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}
\subsection{Physics}