aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2025-05-01 21:57:56 +0300
committerWohlstand <admin@wohlnet.ru>2025-05-01 21:57:56 +0300
commit53f261d26654dda2bfc82ae8ccc16abe2d261506 (patch)
tree2801b706b6927023a6478d4839009feb3f2b2e08
parent2f7b5c929753edfbf02b4ed7518364f63ccdf5ca (diff)
downloadlibADLMIDI-53f261d26654dda2bfc82ae8ccc16abe2d261506.tar.gz
libADLMIDI-53f261d26654dda2bfc82ae8ccc16abe2d261506.tar.bz2
libADLMIDI-53f261d26654dda2bfc82ae8ccc16abe2d261506.zip
MIDIPlay: Small timer tweak at the DOS player
-rw-r--r--utils/midiplay/adlmidiplay.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/utils/midiplay/adlmidiplay.cpp b/utils/midiplay/adlmidiplay.cpp
index 443327d..e7ff8ef 100644
--- a/utils/midiplay/adlmidiplay.cpp
+++ b/utils/midiplay/adlmidiplay.cpp
@@ -627,14 +627,14 @@ static struct TimeCounter
#endif
#ifdef ADLMIDI_ENABLE_HW_DOS
- unsigned newTimerFreq;
+ volatile unsigned newTimerFreq;
unsigned timerPeriod;
int haveYield;
int haveDosIdle;
- unsigned int ring;
- unsigned long BIOStimer_begin;
+ volatile unsigned int ring;
+ volatile unsigned long BIOStimer_begin;
- unsigned long timerNext;
+ volatile unsigned long timerNext;
enum wmethod
{
@@ -776,7 +776,10 @@ static struct TimeCounter
default:
case WM_NONE:
if(timerNext != 0)
- while(BIOStimer < timerNext);
+ {
+ while(BIOStimer < timerNext)
+ delay(1);
+ }
timerNext = BIOStimer + 1;
break;