From 2e49e0e0db184295eb08e930a3ccdf10e80e40fe Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 16 Sep 2024 19:07:50 +0200 Subject: implement simple requirements dump --- glossary.bib | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'glossary.bib') diff --git a/glossary.bib b/glossary.bib index 4d02e4a..437db86 100644 --- a/glossary.bib +++ b/glossary.bib @@ -28,3 +28,8 @@ description = {Graphics library developed by \hbox{Microsoft}}, } +@acronym{api, + short = {API}, + long = {Application Programming Interface}, +} + -- cgit v1.2.3 From abab5051391b7f8a212539400433eb1db0bb4f06 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 18 Sep 2024 15:06:45 +0200 Subject: abbreviate requirement field labels after first occurrence on every page --- glossary.bib | 13 +++++++++++++ requirements.tex | 21 +++++++++++++++++++++ scripts/reqs2tex.py | 11 ++++++++--- 3 files changed, 42 insertions(+), 3 deletions(-) (limited to 'glossary.bib') diff --git a/glossary.bib b/glossary.bib index 437db86..8bf48ac 100644 --- a/glossary.bib +++ b/glossary.bib @@ -33,3 +33,16 @@ long = {Application Programming Interface}, } +@acronym{reqlabel-priority, + short = {pri}, + long = {priority}, +} +@acronym{reqlabel-description, + short = {req}, + long = {requirement}, +} +@acronym{reqlabel-done, + short = {DoD}, + long = {definition of done}, +} + diff --git a/requirements.tex b/requirements.tex index cbaba81..78496e8 100644 --- a/requirements.tex +++ b/requirements.tex @@ -8,6 +8,27 @@ \makeatother \setcounter{secnumdepth}{1} +\usepackage{bophook} +\makeatletter +\def\reqlabel#1{\csuse{reqlabel@#1}} +\def\reqlabelreset{% + \global\def\reqlabel@priority{% + \Glsdesc{reqlabel-priority}% + \global\def\reqlabel@priority{\Glstext{reqlabel-priority}}% + }% + \global\def\reqlabel@description{% + \Glsdesc{reqlabel-description}% + \global\def\reqlabel@description{\Glstext{reqlabel-description}}% + }% + \global\def\reqlabel@done{% + \Glsdesc{reqlabel-done}% + \global\def\reqlabel@done{\Glstext{reqlabel-done}}% + }% +} +% Abbreviate requirement field labels after first occurrence on every page +\AtBeginPage{\reqlabelreset} +\makeatother + \title{Requirements} \begin{document} diff --git a/scripts/reqs2tex.py b/scripts/reqs2tex.py index ff9f3bb..e5f063d 100755 --- a/scripts/reqs2tex.py +++ b/scripts/reqs2tex.py @@ -132,9 +132,14 @@ def fmt_tex(data): tex.cmd('label', ['requirement'], label2ref(item[KEY.LABEL])), tex.cmd('parbox', tex.cmd('linewidth'), tex.env('description', tex.join( - tex.cmd('item', ['Priority']) + item[KEY.PRIORITY].title(), - tex.cmd('item', ['Requirement']) + item[KEY.DESCRIPTION], - (tex.cmd('item', ['Definition of done']) + item[KEY.DONE] if item[KEY.DONE] is not None else ""), + tex.cmd('item', [tex.cmd('reqlabel', 'priority')]), + item[KEY.PRIORITY].title(), + tex.cmd('item', [tex.cmd('reqlabel', 'description')]), + item[KEY.DESCRIPTION], + *([ + tex.cmd('item', [tex.cmd('reqlabel', 'done')]), + item[KEY.DONE] + ] if item[KEY.DONE] is not None else []), )), ) ) -- cgit v1.2.3 From 46d07c2c9e68597f3f6af76b4f8e837786781029 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 22 Sep 2024 19:25:02 +0200 Subject: finish audio research --- glossary.bib | 6 +++++ research.tex | 72 +++++++++++++++++------------------------------------------- sources.bib | 4 ++-- 3 files changed, 28 insertions(+), 54 deletions(-) (limited to 'glossary.bib') diff --git a/glossary.bib b/glossary.bib index 8bf48ac..fda634f 100644 --- a/glossary.bib +++ b/glossary.bib @@ -46,3 +46,9 @@ long = {definition of done}, } +@abbreviation{poc, + short = {POC}, + long = {proof-of-concept}, +} + + diff --git a/research.tex b/research.tex index f3424c4..4ca3d3d 100644 --- a/research.tex +++ b/research.tex @@ -247,44 +247,14 @@ The game engine is required to have an audio system audio mixing engine is outside the scope of this project\mref, this section compares various standalone audio libraries for suitability in the engine. -\Cref{sec:audio:libs} details which libraries were considered, -\cref{sec:audio:benchmark} compares their performance, and -\cref{sec:audio:conclusion} concludes with a recommendation for most performant audio -library. - \subsection{Libraries} \label{sec:audio:libs} -\Cref{tab:audio:libs} lists the standalone audio engine libraries that fit -\cref{req:audio,req:lib:license}. - -\begin{table} - \centering - \begin{tabular}{llc} - \toprule - \textbf{Library} & \textbf{License} & \textbf{API}\\ - \midrule - miniaudio \autocite{lib:miniaudio} & MIT-0 & C\\ - YSE \autocite{lib:yse} & EPL & C++\\ - SoLoud \autocite{lib:soloud} & Zlip/LibPng & C++\\ - \bottomrule - \end{tabular} - \caption{Audio engine library comparison} - \label{tab:audio:libs} -\end{table} - -Other popular libraries that were researched but are unsuitable for this project -include:\noparbreak -\begin{description} - \item[FMOD \autocite{lib:fmod}] Is proprietary (violates \cref{req:lib:license}) - \item[PortAudio \autocite{lib:portaudio}] Does not handle mixing -\end{description} - -\subsection{Benchmarks} -\label{sec:audio:benchmark} - -The same benchmark application was written for each of the libraries listed in -\cref{tab:audio:libs}. The application does the following:\noparbreak +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) @@ -294,28 +264,26 @@ The same benchmark application was written for each of the libraries listed in \item Stop all audio and exit \end{enumerate} -Each benchmark was profiled using \emph{perf} \autocite{tool:perf} and compared based -on total CPU and memory utilization. The results of these benchmarks are listed in -\cref{tab:audio:benchmark}. +Of these libraries the following were determined to be unsuitable for use in this +project due to various reasons:\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}] With finished \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} -\begin{table} - \centering - \begin{tabular}{lr} - \toprule - \textbf{Library} & \textbf{???}\\ - \midrule - miniaudio &\\ - YSE &\\ - SoLoud &\\ - \bottomrule - \end{tabular} - \caption{Audio engine library benchmark results} - \label{tab:audio:benchmark} -\end{table} +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}. \subsection{Conclusion} \label{sec:audio:conclusion} +Due to a severe shortage of libraries that fit our requirements, SoLoud appears to be +the most suitable (and only) audio library for use in this project. \section{Physics} diff --git a/sources.bib b/sources.bib index bb68067..adcfdd5 100644 --- a/sources.bib +++ b/sources.bib @@ -56,8 +56,8 @@ @online{lib:miniaudio, title = {miniaudio - A single file audio playback and capture library.}, % author = {David Reid}, - url = {https://miniaud.io}, - urldate = {2024-09-18}, + url = {https://miniaud.io/docs/manual/index.html}, + urldate = {2024-09-22}, } @online{lib:yse, -- cgit v1.2.3