diff options
Diffstat (limited to 'design.tex')
-rw-r--r-- | design.tex | 42 |
1 files changed, 40 insertions, 2 deletions
@@ -122,9 +122,47 @@ contains the following classes:\noparbreak \subsection{Audio} -\subsubsection{Library} +Since writing a custom real-time audio mixing engine is outside the scope of this +project\mref and C++ does not provide a built-in cross-platform audio \gls{api}, the +audio system inside the cr\^epe engine is implemented as a fa\c{c}ade around an +existing audio library. + +\subsubsection{Libraries} +\label{sec:audio:libs} + +This subsection compares various standalone audio libraries for suitability. After +searching for libraries (search terms: `dynamic/adaptive audio', `real-time audio', +`audio library', `game audio engine'), several libraries were found. These libraries +were checked against the audio engine requirements \autocite{crepe:requirements} and +then tested by writing the same benchmark-style \gls{poc} using the remaining +qualifying libraries:\noparbreak +\begin{enumerate} + \item Load a background track (Ogg Vorbis) + \item Load three short samples (WAV) + \item Start the background track + \item Play each sample sequentially while pausing and resuming the background track + \item Play all samples simultaniously + \item Stop all audio and exit +\end{enumerate} + +Of these libraries the following were determined to be unsuitable for use in this +project:\noparbreak +\begin{description} + \item[FMOD \autocite{lib:fmod}] Is proprietary (violates \cref{req:lib:license}). + \item[PortAudio \autocite{lib:portaudio}] Does not handle mixing. + \item[miniaudio \autocite{lib:miniaudio}] Tested by implementing a \gls{poc}, but + dropped due to very limited codec support (WAV, MP3 and FLAC only); Also does not + have an \gls{api} reference (only programming manual). + \item[YSE \autocite{lib:yse}] Attempted to write \gls{poc}, but CMake configuration + in repository is broken; This project seems to have been abandoned. +\end{description} -\subsubsection{Fa\c{c}ade} +The only library that remained after these tests is SoLoud \autocite{lib:soloud}. It +is Zlib/LibPng licensed and provides a high-level object-oriented C++ \gls{api}. +\Cref{sec:audio:architecture} describes the fa\c{c}ade written for this library. + +\subsubsection{Architecture} +\label{sec:audio:architecture} \Cref{fig:class-audio-facade} shows a class diagram of the audio fa\c{c}ade. It contains the following classes: |