[Scummvm-git-logs] scummvm master -> 17e604d97d7942ebd8626324e9468e9f4ea7c9c2
bluegr
noreply at scummvm.org
Sun Aug 17 16:04:52 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
17e604d97d AUDIO: Fix linking errors in some setups with older compilers
Commit: 17e604d97d7942ebd8626324e9468e9f4ea7c9c2
https://github.com/scummvm/scummvm/commit/17e604d97d7942ebd8626324e9468e9f4ea7c9c2
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-08-17T19:04:49+03:00
Commit Message:
AUDIO: Fix linking errors in some setups with older compilers
I'd get "undefined reference" errors in RISC OS builds (which currently
use GCC 4.7), when building with 'plumbers' as the only dynamic plugin,
for example.
I remember hitting the adlib_ms.cpp error with GCC 4.2.1, back when we
still supported C++98. So I guess this is related to GCC 4.7 having
C++11 support that was still quite rough back then. Don't ask me why
the error didn't show in full builds...
See earlier commit 7027be781ba39dbe4aa28eec632670dcfb82eb5c, and the
comments on the related commit page, for more information.
Changed paths:
audio/adlib_ms.cpp
audio/mt32gm.cpp
diff --git a/audio/adlib_ms.cpp b/audio/adlib_ms.cpp
index 689707dcc86..7249e28a5e2 100644
--- a/audio/adlib_ms.cpp
+++ b/audio/adlib_ms.cpp
@@ -23,6 +23,11 @@
#include "common/debug.h"
+// The initialization of the static const integral data members is done in the class definition,
+// but we still need to provide a definition if they are odr-used (e.g. GCC 4.7 wants this).
+const uint8 MidiDriver_ADLIB_Multisource::OPL2_NUM_CHANNELS;
+const uint8 MidiDriver_ADLIB_Multisource::OPL3_NUM_CHANNELS;
+
bool OplInstrumentOperatorDefinition::isEmpty() const {
return freqMultMisc == 0 && level == 0 && decayAttack == 0 &&
releaseSustain == 0 && waveformSelect == 0;
diff --git a/audio/mt32gm.cpp b/audio/mt32gm.cpp
index b8ee9aac58e..12ebe27d868 100644
--- a/audio/mt32gm.cpp
+++ b/audio/mt32gm.cpp
@@ -28,11 +28,13 @@
#include "common/debug.h"
// The initialization of the static const integral data members is done in the class definition,
-// but we still need to provide a definition if they are odr-used.
+// but we still need to provide a definition if they are odr-used (e.g. GCC 4.7 wants this).
const uint8 MidiDriver_MT32GM::MT32_DEFAULT_CHANNEL_VOLUME;
const uint8 MidiDriver_MT32GM::GM_DEFAULT_CHANNEL_VOLUME;
const uint8 MidiDriver_MT32GM::MAXIMUM_MT32_ACTIVE_NOTES;
const uint8 MidiDriver_MT32GM::MAXIMUM_GM_ACTIVE_NOTES;
+const uint8 MidiDriver_BASE::MT32_PITCH_BEND_SENSITIVITY_DEFAULT;
+const uint8 MidiDriver_BASE::GM_PITCH_BEND_SENSITIVITY_DEFAULT;
// These are the power-on default instruments of the Roland MT-32 family.
const byte MidiDriver_MT32GM::MT32_DEFAULT_INSTRUMENTS[8] = {
More information about the Scummvm-git-logs
mailing list