From 7a06c937cb422570f1199a5df2dec3d181d7c0d7 Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 9 Feb 2022 01:55:15 +0100 Subject: adlib: increase default sample rate to 49716 --- Adlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adlib.cpp b/Adlib.cpp index ef70055..c2045c6 100644 --- a/Adlib.cpp +++ b/Adlib.cpp @@ -78,7 +78,7 @@ typedef PCMOutWin PCMOutBackend; #define ADLIB_DEFAULT_IO_BASE 0x388 #define ADLIB_DEFAULT_OUT_DEVICE "default" -#define ADLIB_DEFAULT_SAMPLE_RATE 22050 /* Hz */ +#define ADLIB_DEFAULT_SAMPLE_RATE 49716 /* Hz */ #define ADLIB_NUM_CHANNELS 2 /* as we are actually supporting OPL3 */ enum { @@ -175,7 +175,7 @@ static inline size_t adlibCalculateBytesFromFrames(PADLIBSTATE pThis, uint64_t f static uint64_t adlibCalculateTimerExpire(PPDMDEVINS pDevIns, uint8_t value, uint64_t period) { uint64_t delay_usec = (0x100 - value) * period; - if (delay_usec < 100) delay_usec = 0; // short delay: Likely just checking for OPL precense; fire timer now. + if (delay_usec < 100) delay_usec = 0; // short delay: Likely just checking for OPL presence; fire timer now. uint64_t freq = PDMDevHlpTMTimeVirtGetFreq(pDevIns); uint64_t delay_ticks = (delay_usec * freq) / 1000000UL /*1usec in hz*/; uint64_t now_ticks = PDMDevHlpTMTimeVirtGet(pDevIns); -- cgit v1.2.3