aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 17:57:47 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 17:57:47 +0200
commitf91594111d9af7082444cbd434d2d52e6bd40700 (patch)
treeb1eb879ea22df5827d594e3e2599acc2a320c1e5
parent44da8d4f03be549ddb8b56941e6ab7c3eaca5eca (diff)
rename SoundSystem to SoundContext
-rw-r--r--design.tex4
-rw-r--r--img/facade-audio.puml18
2 files changed, 11 insertions, 11 deletions
diff --git a/design.tex b/design.tex
index 9d5f999..1e42c03 100644
--- a/design.tex
+++ b/design.tex
@@ -45,12 +45,12 @@ workflows.
\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}
+ \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{SoundSystem} instance.
+ to get the \codeinline{SoundContext} 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}
diff --git a/img/facade-audio.puml b/img/facade-audio.puml
index b256f47..6749915 100644
--- a/img/facade-audio.puml
+++ b/img/facade-audio.puml
@@ -14,8 +14,8 @@ package crepe {
+pause()
+play()
+rewind()
- +set_volume(float)
- +set_looping(bool)
+ -volume : float <<+set>> <<+get>>
+ -looping : bool <<+set>> <<+get>>
--
-sample : SoLoud::Wav
-handle : SoLoud::handle
@@ -23,11 +23,11 @@ package crepe {
-load(resource)
}
- class SoundSystem <<Singleton>> {
- -instance() : SoundSystem& <<static>>
+ class SoundContext <<Singleton>> {
+ -instance() : SoundContext& <<static>>
--
- -SoundSystem()
- -~SoundSystem()
+ -SoundContext()
+ -~SoundContext()
--
-engine : SoLoud::Soloud
}
@@ -42,10 +42,10 @@ package SoLoud {
crepe -[hidden]down- SoLoud
crepe.Sound --> SoLoud.Wav
-crepe.SoundSystem --> SoLoud.Soloud
+crepe.SoundContext --> SoLoud.Soloud
-crepe.Sound .> crepe.SoundSystem
-crepe.SoundSystem .> crepe.Sound
+crepe.Sound .> crepe.SoundContext
+crepe.SoundContext .> crepe.Sound
crepe.Sound .> crepe.api.Resource