From f91594111d9af7082444cbd434d2d52e6bd40700 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 1 Oct 2024 17:57:47 +0200 Subject: rename SoundSystem to SoundContext --- design.tex | 4 ++-- img/facade-audio.puml | 18 +++++++++--------- 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 <> { - -instance() : SoundSystem& <> + class SoundContext <> { + -instance() : SoundContext& <> -- - -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 -- cgit v1.2.3