[Scummvm-git-logs] scummvm master -> e4887696a96003974adee1b544de1c985cafba39

NMIError 60350957+NMIError at users.noreply.github.com
Thu Nov 4 21:15:51 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e4887696a9 AUDIO: Fix ineffective version prop on Miles AdLib


Commit: e4887696a96003974adee1b544de1c985cafba39
    https://github.com/scummvm/scummvm/commit/e4887696a96003974adee1b544de1c985cafba39
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-11-04T22:15:38+01:00

Commit Message:
AUDIO: Fix ineffective version prop on Miles AdLib

Setting the Miles driver version property to 3 was meant to set the pitch bend
range to 2. In the AdLib driver, the pitch bend range was set during
construction, before the version property could be set, so this did not work
properly. This is fixed by moving the MIDI data initialization from the
constructor to the open function.

Changed paths:
    audio/miles_adlib.cpp


diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp
index daf4ab2500..cda306f87d 100644
--- a/audio/miles_adlib.cpp
+++ b/audio/miles_adlib.cpp
@@ -308,8 +308,6 @@ MidiDriver_Miles_AdLib::MidiDriver_Miles_AdLib(InstrumentEntry *instrumentTableP
 	circularPhysicalAssignment = true;
 	// this way the first circular physical FM-voice search will start at FM-voice 0
 	circularPhysicalAssignmentFmVoice = MILES_ADLIB_PHYSICAL_FMVOICES_COUNT_MAX;
-
-	resetData();
 }
 
 MidiDriver_Miles_AdLib::~MidiDriver_Miles_AdLib() {
@@ -347,6 +345,8 @@ int MidiDriver_Miles_AdLib::open() {
 
 	_isOpen = true;
 
+	resetData();
+
 	_timerRate = getBaseTempo();
 	_opl->start(new Common::Functor0Mem<void, MidiDriver_Miles_AdLib>(this, &MidiDriver_Miles_AdLib::onTimer));
 




More information about the Scummvm-git-logs mailing list