From 40ccbe12e018ad591cd17e77c767637e163d84b0 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 11 Oct 2020 00:18:20 +0300 Subject: [PATCH] Fixed an incorrect timer processing when using a real-time interface --- README.md | 3 +++ src/opnmidi.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ac3c85..ea90068 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,9 @@ To remove MIDI Sequencer, define `OPNMIDI_DISABLE_MIDI_SEQUENCER` macro and remo * [OPNMIDI Player for Android](https://github.com/Wohlstand/OPNMIDI-Player-Java/) - a little MIDI-player for Android which uses libOPNMIDI to play MIDI files and provides flexible GUI with ability to change bank, flags, number of emulated chips, etc. # Changelog +## 1.5.0.1 2020-10-11 + * Fixed an incorrect timer processing when using a real-time interface + ## 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!) diff --git a/src/opnmidi.cpp b/src/opnmidi.cpp index c5cf140..49c71e0 100644 --- a/src/opnmidi.cpp +++ b/src/opnmidi.cpp @@ -1134,7 +1134,7 @@ OPNMIDI_EXPORT int opn2_generateFormat(struct OPN2_MIDIPlayer *device, int sampl ssize_t n_periodCountStereo = 512; int left = sampleCount; - double delay = double(sampleCount) / double(setup.PCM_RATE); + double delay = double(sampleCount / 2) / double(setup.PCM_RATE); while(left > 0) {