Skip to content

Commit

Permalink
Update libOPNMIDI library to 1.5.0
Browse files Browse the repository at this point in the history
## 1.5.0   2020-09-28
 * Drum note length expanding is now supported in real-time mode (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for OPNA chip with Neko Project II Kai YM2602 emulator usage (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added VGM file dumper which allows to output OPN2 commands into VGM file. (A new MIDI to VGM tool is now created with basing on libOPNMIDI)
 * Fixed an incorrect work of CC-121 (See Wohlstand/libADLMIDI#227 for details)
 * Internality has been refactored and improved
  • Loading branch information
Wohlstand authored and coelckers committed Oct 4, 2020
1 parent 1d4a016 commit 72c23d9
Show file tree
Hide file tree
Showing 81 changed files with 25,699 additions and 2,083 deletions.
36 changes: 27 additions & 9 deletions thirdparty/opnmidi/CMakeLists.txt
Expand Up @@ -10,16 +10,34 @@ add_definitions(-DOPNMIDI_DISABLE_MIDI_SEQUENCER)
add_definitions(-DOPNMIDI_DISABLE_GX_EMULATOR)

add_library( opn STATIC
chips/gens_opn2.cpp
chips/gens/Ym2612_Emu.cpp
chips/mame/mame_ym2612fm.c
chips/mame_opn2.cpp
chips/nuked_opn2.cpp
chips/nuked/ym3438.c
opnmidi.cpp
opnmidi_load.cpp
opnmidi_private.cpp
opnmidi.cpp
opnmidi_midiplay.cpp
opnmidi_opn2.cpp
opnmidi_private.cpp
wopn/wopn_file.c )
chips/np2/fmgen_fmgen.cpp
chips/np2/fmgen_opna.cpp
chips/np2/fmgen_fmtimer.cpp
chips/np2/fmgen_file.cpp
chips/np2/fmgen_psg.cpp
chips/mame_opn2.cpp
chips/gens_opn2.cpp
chips/mame_opna.cpp
chips/np2_opna.cpp
chips/mamefm/ymdeltat.cpp
chips/mamefm/resampler.cpp
chips/mamefm/fm.cpp
chips/nuked_opn2.cpp
chips/gens/Ym2612_Emu.cpp
chips/gx_opn2.cpp
chips/pmdwin_opna.cpp
chips/nuked/ym3438.c
chips/gx/gx_ym2612.c
chips/pmdwin/opna.c
chips/pmdwin/psg.c
chips/pmdwin/rhythmdata.c
chips/mamefm/emu2149.c
chips/mame/mame_ym2612fm.c
wopn/wopn_file.c
)
target_link_libraries( opn )
9 changes: 5 additions & 4 deletions thirdparty/opnmidi/chips/gens_opn2.cpp
@@ -1,7 +1,7 @@
/*
* Interfaces over Yamaha OPN2 (YM2612) chip emulators
*
* Copyright (C) 2017-2018 Vitaly Novichkov (Wohlstand)
* Copyright (c) 2017-2020 Vitaly Novichkov (Wohlstand)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -23,8 +23,9 @@

#include "gens/Ym2612_Emu.h"

GensOPN2::GensOPN2()
: chip(new Ym2612_Emu())
GensOPN2::GensOPN2(OPNFamily f)
: OPNChipBaseBufferedT(f),
chip(new Ym2612_Emu())
{
setRate(m_rate, m_clock);
}
Expand All @@ -37,7 +38,7 @@ GensOPN2::~GensOPN2()
void GensOPN2::setRate(uint32_t rate, uint32_t clock)
{
OPNChipBaseBufferedT::setRate(rate, clock);
uint32_t chipRate = isRunningAtPcmRate() ? rate : static_cast<uint32_t>(nativeRate);
uint32_t chipRate = isRunningAtPcmRate() ? rate : nativeRate();
chip->set_rate(chipRate, clock); // implies reset()
}

Expand Down
4 changes: 2 additions & 2 deletions thirdparty/opnmidi/chips/gens_opn2.h
@@ -1,7 +1,7 @@
/*
* Interfaces over Yamaha OPN2 (YM2612) chip emulators
*
* Copyright (C) 2017-2018 Vitaly Novichkov (Wohlstand)
* Copyright (c) 2017-2020 Vitaly Novichkov (Wohlstand)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -28,7 +28,7 @@ class GensOPN2 final : public OPNChipBaseBufferedT<GensOPN2>
{
Ym2612_Emu *chip;
public:
GensOPN2();
explicit GensOPN2(OPNFamily f);
~GensOPN2() override;

bool canRunAtPcmRate() const override { return true; }
Expand Down

0 comments on commit 72c23d9

Please sign in to comment.