From 5c20c659ec371957df08a6347fadfac9bf78a5a3 Mon Sep 17 00:00:00 2001
From: Loek Le Blansch <loek@pipeframe.xyz>
Date: Wed, 11 Sep 2024 15:10:03 +0200
Subject: add notes + callgrind profiling poc

---
 research.tex | 35 ++++++++++++++++++++++++++++++-----
 1 file changed, 30 insertions(+), 5 deletions(-)

(limited to 'research.tex')

diff --git a/research.tex b/research.tex
index ca2afed..16dcef4 100644
--- a/research.tex
+++ b/research.tex
@@ -176,15 +176,36 @@ for audio some options could be: FMOD, Wwise, or iirKlang
 
 \subsection{Conclusion}
 
-\section{Memory/debugging}
+% TODO: this entire section
+\section{Profiling and debugging}
+
+% Which profiling and debugging features are wanted?
+% How to provide those profiling and debugging features?
+% Can most of the profiling/debugging be handled by external tools?
+
+% Ideas:
+% - flame graph
+% - watchtable (combine w/ fps/speed control overlay?)
+% - debug printing utility functions
 
 \subsection{Introduction}
 
 \subsection{Findings}
 
+\subsubsection{Callgrind}
+
+\begin{comparison}
+	\pro{Source code does not need to be modified for profiling}
+	\con{Execution speed is severely impacted}
+\end{comparison}
+
 \subsection{Conclusion}
 
-\section{Physics/scripting}
+% TODO: this entire section
+\section{Audio}
+
+% should audio research be scoped down to SDL2 (if that's what we're going with) or
+% standalone libraries only (for modularity?).
 
 \subsection{Introduction}
 
@@ -192,7 +213,13 @@ for audio some options could be: FMOD, Wwise, or iirKlang
 
 \subsection{Conclusion}
 
-\section{Conclusion}
+\section{Physics/scripting}
+
+\subsection{Introduction}
+
+\subsection{Findings}
+
+\subsection{Conclusion}
 
 \section{Gameobjects/components}
 
@@ -202,6 +229,4 @@ for audio some options could be: FMOD, Wwise, or iirKlang
 
 \subsection{Conclusion}
 
-\section{Conclusion}
-
 \end{document}
-- 
cgit v1.2.3


From 188fbffafda0942014b12dd2e2313ad139bcd1cc Mon Sep 17 00:00:00 2001
From: Loek Le Blansch <loek@pipeframe.xyz>
Date: Thu, 12 Sep 2024 20:35:24 +0200
Subject: add some audio research

---
 research.tex | 34 ++++++++++++++++++++++++++++++++++
 time.txt     |  1 +
 2 files changed, 35 insertions(+)

(limited to 'research.tex')

diff --git a/research.tex b/research.tex
index 00b006d..ad33d10 100644
--- a/research.tex
+++ b/research.tex
@@ -207,6 +207,40 @@ for audio some options could be: FMOD, Wwise, or iirKlang
 % should audio research be scoped down to SDL2 (if that's what we're going with) or
 % standalone libraries only (for modularity?).
 
+The game engine is required to have an audio system with support for playing multiple
+audio streams (i.e.~tracks or samples) simultaniously. Since writing a custom live
+audio mixing engine is outside the scope of this project, this section compares
+various standalone audio engines that could be used in the engine.
+
+% TODO: requirements first!
+
+% REQ ~ is cross-platform
+% REQ ~ supports multiple audio formats (TODO: which)
+% REQ ~ supports simultanious playback / mixing
+% REQ ~ has an open-source license
+\begin{table}
+	\centering
+	\begin{tabular}{llc}
+		\toprule
+		\textbf{Library} & \textbf{License} & \textbf{API}\\
+		\midrule
+		miniaudio & MIT-0 & C\\
+		YSE & EPL & C++\\
+		SoLoud & Zlip/LibPng & C++\\
+		\bottomrule
+	\end{tabular}
+	\caption{Audio engine library comparison}
+	\label{tab:audio-engines}
+\end{table}
+% TODO: ref https://miniaud.io/
+% TODO: ref https://www.attr-x.net/yse/
+
+Not considered further:
+\begin{description}
+	\item[FMOD] is proprietary
+	\item[PortAudio] requires manual mixing
+\end{description}
+
 \section{Physics}
 
 \subsection{Introduction}
diff --git a/time.txt b/time.txt
index 3a8b547..d9190f5 100644
--- a/time.txt
+++ b/time.txt
@@ -20,6 +20,7 @@ loek: 2024-09-10 5m docs :: update readme
 loek: 2024-09-10 12m docs :: add comparison package and more example latex code
 loek: 2024-09-10 30m project meeting
 loek: 2024-09-11 1h40m research :: profiling and debugging
+loek: 2024-09-12 30m research :: audio
 
 max: 2024-09-02 1h project kickoff
 max: 2024-09-02 45m first project meeting
-- 
cgit v1.2.3

