aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2022-06-20 21:56:12 +0200
committerGitHub <noreply@github.com>2022-06-20 21:56:12 +0200
commita463620edbe57071a7101297d33226507567ca73 (patch)
tree342d433ca55f4e3d1826508c303f2e6229d503f1 /src/gui
parent0b41533763bc9f104a2da2e4191f4654b8d8dab4 (diff)
downloadminetest-a463620edbe57071a7101297d33226507567ca73.tar.gz
minetest-a463620edbe57071a7101297d33226507567ca73.tar.bz2
minetest-a463620edbe57071a7101297d33226507567ca73.zip
Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated 'fade' and 'pitch' values on server-side where only one was used anyway. SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included. Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the future. Per-type version numbers are kept for now as a safety rope in a special case.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/guiEngine.cpp4
-rw-r--r--src/gui/guiEngine.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp
index b65b31304..01f3f8fd5 100644
--- a/src/gui/guiEngine.cpp
+++ b/src/gui/guiEngine.cpp
@@ -622,9 +622,9 @@ void GUIEngine::updateTopLeftTextSize()
}
/******************************************************************************/
-s32 GUIEngine::playSound(const SimpleSoundSpec &spec, bool looped)
+s32 GUIEngine::playSound(const SimpleSoundSpec &spec)
{
- s32 handle = m_sound_manager->playSound(spec, looped);
+ s32 handle = m_sound_manager->playSound(spec);
return handle;
}
diff --git a/src/gui/guiEngine.h b/src/gui/guiEngine.h
index d7e6485ef..2f182ca81 100644
--- a/src/gui/guiEngine.h
+++ b/src/gui/guiEngine.h
@@ -296,7 +296,7 @@ private:
clouddata m_cloud;
/** start playing a sound and return handle */
- s32 playSound(const SimpleSoundSpec &spec, bool looped);
+ s32 playSound(const SimpleSoundSpec &spec);
/** stop playing a sound started with playSound() */
void stopSound(s32 handle);