mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-23 12:22:30 +00:00
libADLMIDI & libOPNMIDI: Apply the important fix
Fixed an incorrect timer processing when using a real-time interface. This bug does directly affect the case of ZMusic which does use of RealTime API of both libraries.
This commit is contained in:
parent
8c9f402c31
commit
8eff49f731
2 changed files with 2 additions and 2 deletions
2
thirdparty/adlmidi/adlmidi.cpp
vendored
2
thirdparty/adlmidi/adlmidi.cpp
vendored
|
@ -1414,7 +1414,7 @@ ADLMIDI_EXPORT int adl_generateFormat(struct ADL_MIDIPlayer *device, int sampleC
|
|||
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)
|
||||
{
|
||||
|
|
2
thirdparty/opnmidi/opnmidi.cpp
vendored
2
thirdparty/opnmidi/opnmidi.cpp
vendored
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue