From 105c5db749836ff25c03ae7abf3b2348ecb72c86 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Tue, 19 Jun 2018 22:53:45 +0300 Subject: Apply same DJGPP build fix as here https://github.com/Wohlstand/libADLMIDI/commit/96f407668feb79b883e294d1ce3f7fc5bbf823ed [ :warning: A conflict with "poly-portamento2" is possible!!! :warning:. Need to me resolve it on receiving the push ] --- src/adlmidi_opl3.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/adlmidi_opl3.cpp') diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 3de70e3..49e2e76 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -486,18 +486,22 @@ void OPL3::ClearChips() void OPL3::Reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler) { - #ifndef ADLMIDI_HW_OPL +#ifndef ADLMIDI_HW_OPL ClearChips(); - #endif +#else (void)emulator; (void)PCM_RATE; +#endif +#if !defined(ADLMIDI_AUDIO_TICK_HANDLER) + (void)audioTickHandler; +#endif ins.clear(); pit.clear(); regBD.clear(); - #ifndef ADLMIDI_HW_OPL +#ifndef ADLMIDI_HW_OPL cardsOP2.resize(NumCards, AdlMIDI_SPtr()); - #endif +#endif NumChannels = NumCards * 23; ins.resize(NumChannels, adl[adlDefaultNumber]); @@ -521,9 +525,8 @@ void OPL3::Reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler) for(size_t i = 0; i < NumCards; ++i) { - OPLChipBase *chip; - #ifndef ADLMIDI_HW_OPL + OPLChipBase *chip; switch(emulator) { default: @@ -546,7 +549,9 @@ void OPL3::Reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler) chip->setRate((uint32_t)PCM_RATE); if(runAtPcmRate) chip->setRunningAtPcmRate(true); +# if defined(ADLMIDI_AUDIO_TICK_HANDLER) chip->setAudioTickHandlerInstance(audioTickHandler); +# endif #endif // ADLMIDI_HW_OPL for(unsigned a = 0; a < 18; ++a) Poke(i, 0xB0 + Channels[a], 0x00); -- cgit v1.2.3