From b1120575e4d0b7bc35082e35bd27814afeeffac8 Mon Sep 17 00:00:00 2001 From: Waldemar Pawlaszek Date: Tue, 22 Feb 2022 21:35:17 +0100 Subject: [PATCH] Proper device resetting --- src/engine/platform/lynx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/lynx.cpp b/src/engine/platform/lynx.cpp index 7545a9869..b49dd3620 100644 --- a/src/engine/platform/lynx.cpp +++ b/src/engine/platform/lynx.cpp @@ -285,6 +285,9 @@ int DivPlatformLynx::getRegisterPoolSize() } void DivPlatformLynx::reset() { + + mikey = std::make_unique( rate ); + for (int i=0; i<4; i++) { chan[i]= DivPlatformLynx::Channel(); } @@ -331,7 +334,6 @@ int DivPlatformLynx::init(DivEngine* p, int channels, int sugRate, unsigned int chipClock = 16000000; rate = chipClock/128; - mikey = std::make_unique(rate); reset(); return 4; }